Fix responsive of edition of thirdparties

This commit is contained in:
Laurent Destailleur 2020-05-15 16:23:24 +02:00
parent 5fe9c45fb2
commit c43813ccbb

View File

@ -1396,7 +1396,7 @@ else
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
print '</td>';
if (($j % 2) == 1) print '</tr>';
if (($j % $NBCOLS) == ($NBCOLS - 1)) print '</tr>';
$j++;
}
$i++;
@ -1448,6 +1448,7 @@ else
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">';
print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1);
print '</td></tr>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">';
print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1);
print '</td></tr>';
@ -1848,6 +1849,7 @@ else
print '<td class="maxwidthonsmartphone">';
print $formcompany->selectProspectCustomerType($object->client);
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>';
print '<table class="nobordernopadding"><tr><td>';
@ -1879,15 +1881,18 @@ else
|| (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire)))
{
print '<tr>';
print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td class="maxwidthonsmartphone">';
print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td>';
print '<td class="maxwidthonsmartphone">';
print $form->selectyesno("fournisseur", $object->fournisseur, 1);
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>';
if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire))
{
print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0);
}
print '</td><td>';
print '</td>';
print '<td>';
print '<table class="nobordernopadding"><tr><td>';
if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto)
{
@ -1936,7 +1941,9 @@ else
// Zip / Town
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone');
print '</td><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent');
print '</td></tr>';
@ -1944,7 +1951,7 @@ else
// Country
print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td colspan="3">';
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id');
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>';
@ -1966,15 +1973,16 @@ else
// Phone / Fax
print '<tr><td>'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).'</td>';
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>';
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>';
print '<td>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>';
print '<td>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>';
// EMail / Web
print '<tr><td>'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>';
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" class="maxwidth100onsmartphone quatrevingtpercent" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td></tr>';
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" class="maxwidth200onsmartphone widthcentpercentminusx" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td></tr>';
print '<tr><td>'.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).'</td>';
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" class="maxwidth100onsmartphone quatrevingtpercent" value="'.(GETPOSTISSET('url') ?GETPOST('url', 'alpha') : $object->url).'"></td></tr>';
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" class="maxwidth200onsmartphone widthcentpercentminusx " value="'.(GETPOSTISSET('url') ?GETPOST('url', 'alpha') : $object->url).'"></td></tr>';
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
@ -1990,36 +1998,9 @@ else
}
}
}
// if (! empty($conf->socialnetworks->enabled))
// {
// // Skype
// if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
// {
// print '<tr><td>'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</td>';
// print '<td colspan="3"><input type="text" name="skype" id="skype" value="'.$object->skype.'"></td></tr>';
// }
// // Twitter
// if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
// {
// print '<tr><td>'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</td>';
// print '<td colspan="3"><input type="text" name="twitter" id="twitter" value="'.$object->twitter.'"></td></tr>';
// }
// // Facebook
// if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
// {
// print '<tr><td>'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</td>';
// print '<td colspan="3"><input type="text" name="facebook" id="facebook" value="'.$object->facebook.'"></td></tr>';
// }
// // LinkedIn
// if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN))
// {
// print '<tr><td>'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'</td>';
// print '<td colspan="3"><input type="text" name="linkedin" id="linkedin" value="'.$object->linkedin.'"></td></tr>';
// }
// }
// Prof ids
$i = 1; $j = 0;
$i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
while ($i <= 6)
{
$idprof = $langs->transcountry('ProfId'.$i, $object->country_code);
@ -2027,13 +2008,13 @@ else
{
$key = 'idprof'.$i;
if (($j % 2) == 0) print '<tr>';
if (($j % $NBCOLS) == 0) print '<tr>';
$idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY';
print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).'</td><td>';
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
print '</td>';
if (($j % 2) == 1) print '</tr>';
if (($j % $NBCOLS) == ($NBCOLS - 1)) print '</tr>';
$j++;
}
$i++;
@ -2058,7 +2039,7 @@ else
print '</span>';
}
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>';
print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1);
if (!isOnlyOneLocalTax(2))
@ -2132,6 +2113,7 @@ else
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);