colspan war
This commit is contained in:
parent
bfa531c724
commit
758c6a6263
@ -680,6 +680,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname", 'alpha') ?GETPOST("lastname", 'alpha') : $object->lastname).'" autofocus="autofocus"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr>';
|
||||
print '<td><label for="firstname">';
|
||||
print $form->textwithpicto($langs->trans("Firstname"), $langs->trans("KeepEmptyIfGenericAddress")).'</label></td>';
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
@ -42,6 +43,9 @@ if ($user->socid) {
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||
$object = new Contact($db);
|
||||
|
||||
$errors = array();
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
@ -123,6 +127,7 @@ $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
$object->fetch($id, $user);
|
||||
|
||||
@ -143,38 +148,13 @@ if ($action == 'edit') {
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td>';
|
||||
print $object->id;
|
||||
print '</td>';
|
||||
|
||||
// Photo
|
||||
print '<td class="center hideonsmartphone valignmiddle" rowspan="6">';
|
||||
print $form->showphoto('contact', $object)."\n";
|
||||
if ($object->photo) {
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
print '<table class="nobordernopadding">';
|
||||
|
||||
if ($object->photo) {
|
||||
print '<tr><td class="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||
print '<tr><td>';
|
||||
$maxfilesizearray = getMaxFileSizeArray();
|
||||
$maxmin = $maxfilesizearray['maxmin'];
|
||||
if ($maxmin > 0) {
|
||||
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
||||
}
|
||||
print '<input type="file" class="flat" name="photo" id="photoinput">';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td>'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td colspan="3">'.$object->lastname.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="3">'.$object->firstname.'</td>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td>'.$object->lastname.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td>'.$object->firstname.'</td>';
|
||||
|
||||
// Company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
|
||||
@ -182,31 +162,62 @@ if ($action == 'edit') {
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($object->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td>';
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>'.$objsoc->getNomUrl(1).'</td>';
|
||||
} else {
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
print $langs->trans("ContactNotLinkedToCompany");
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print '<tr><td><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td>';
|
||||
print $object->getCivilityLabel();
|
||||
//print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'alpha') : $object->civility_code, 'civility_code');
|
||||
print '</td></tr>';
|
||||
|
||||
// Photo
|
||||
print '<tr class="hideonsmartphone">';
|
||||
print '<td>'.$form->editfieldkey('PhotoFile', 'photoinput', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
if ($object->photo) {
|
||||
print $form->showphoto('contact', $object);
|
||||
}
|
||||
$caneditfield = 1;
|
||||
if ($caneditfield) {
|
||||
if ($object->photo) {
|
||||
print "<br>\n";
|
||||
}
|
||||
print '<table class="nobordernopadding">';
|
||||
if ($object->photo) {
|
||||
print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> <label for="photodelete">'.$langs->trans("Delete").'</photo><br><br></td></tr>';
|
||||
}
|
||||
//print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||
print '<tr><td>';
|
||||
$maxfilesizearray = getMaxFileSizeArray();
|
||||
$maxmin = $maxfilesizearray['maxmin'];
|
||||
if ($maxmin > 0) {
|
||||
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
||||
}
|
||||
print '<input type="file" class="flat" name="photo" id="photoinput">';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date To Birth
|
||||
print '<tr><td>'.$langs->trans("DateOfBirth").'</td><td>';
|
||||
$form = new Form($db);
|
||||
print $form->selectDate($object->birthday, 'birthday', 0, 0, 1, "perso", 1, 0);
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="2">'.$langs->trans("Alert").': ';
|
||||
print ' ';
|
||||
print '<label for="birthday_alert">'.$langs->trans("BirthdayAlert").':</label> ';
|
||||
if (!empty($object->birthday_alert)) {
|
||||
print '<input type="checkbox" name="birthday_alert" checked></td>';
|
||||
print '<input type="checkbox" id="birthday_alert" name="birthday_alert" checked>';
|
||||
} else {
|
||||
print '<input type="checkbox" name="birthday_alert"></td>';
|
||||
print '<input type="checkbox" id="birthday_alert" name="birthday_alert">';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -5,6 +5,7 @@ Tools=Tools
|
||||
TMenuTools=Tools
|
||||
ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu.
|
||||
Birthday=Birthday
|
||||
BirthdayAlert=Birthday alert
|
||||
BirthdayAlertOn=birthday alert active
|
||||
BirthdayAlertOff=birthday alert inactive
|
||||
TransKey=Translation of the key TransKey
|
||||
|
||||
@ -2618,7 +2618,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}
|
||||
print '<table class="nobordernopadding">';
|
||||
if ($object->logo) {
|
||||
print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
||||
print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> <label for="photodelete">'.$langs->trans("Delete").'</photo><br><br></td></tr>';
|
||||
}
|
||||
//print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||
print '<tr><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user