Skip to content

Commit

Permalink
Fix thirdparty Nature of thirdparty checkbox to make possible to clic…
Browse files Browse the repository at this point in the history
…k on label
  • Loading branch information
Hystepik committed Jul 1, 2024
1 parent f7c0253 commit 334deae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions htdocs/societe/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1382,17 +1382,17 @@ function formatCustomerSelection (selection) {
$selectedcustomer = (GETPOSTISSET('customer') ? GETPOSTINT('customer') : $selectedcustomer);
print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('NatureOfThirdParty', 'customerprospect', '', $object, 0, 'string', '', 0).'</td>';
print '<td class="maxwidthonsmartphone" colspan="3">';
print '<span class="customer-back opacitymedium">'.$langs->trans("Prospect").'</span><input id="prospect" class="flat checkforselect marginleftonly" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'>';
print '<span class="customer-back opacitymedium"><label for="prospectinput">'.$langs->trans("Prospect").'</label></span><input id="prospectinput" class="flat checkforselect marginleftonly" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

print '<span class="customer-back">'.$langs->trans("Customer").'</span><input id="customer" class="flat checkforselect marginleftonly" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'>';
print '<span class="customer-back"><label for="customerinput">'.$langs->trans("Customer").'</label></span><input id="customerinput" class="flat checkforselect marginleftonly" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

if ((isModEnabled("fournisseur") && $user->hasRight('fournisseur', 'lire') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire'))
|| (isModEnabled('supplier_proposal') && $user->hasRight('supplier_proposal', 'lire'))) {
// Supplier
$selected = (GETPOSTISSET('supplier') ? GETPOSTINT('supplier') : $object->fournisseur);
print '<span class="vendor-back">'.$langs->trans("Vendor").'</span><input id="supplier" class="flat checkforselect marginleftonly" type="checkbox" name="supplier" value="1"'.($selected ? ' checked="checked"' : '').'>';
print '<span class="vendor-back"><label for="supplierinput">'.$langs->trans("Vendor").'</label></span><input id="supplierinput" class="flat checkforselect marginleftonly" type="checkbox" name="supplier" value="1"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
print '</tr>';
Expand Down Expand Up @@ -2126,17 +2126,17 @@ function init_supplier_categ() {
$selectedcustomer = (GETPOSTISSET('customer') ? GETPOSTINT('customer') : $selectedcustomer);
print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('NatureOfThirdParty', 'customerprospect', '', $object, 0, 'string', '', 0).'</td>';
print '<td class="maxwidthonsmartphone" colspan="3">';
print '<span class="customer-back opacitymedium">'.$langs->trans("Prospect").'</span><input id="prospect" class="flat checkforselect marginleftonly" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'>';
print '<span class="customer-back opacitymedium"><label for="prospectinput">'.$langs->trans("Prospect").'</label></span><input id="prospectinput" class="flat checkforselect marginleftonly" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

print '<span class="customer-back">'.$langs->trans("Customer").'</span><input id="customer" class="flat checkforselect marginleftonly" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'>';
print '<span class="customer-back"><label for="customerinput">'.$langs->trans("Customer").'</label></span><input id="customerinput" class="flat checkforselect marginleftonly" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

if ((isModEnabled("fournisseur") && $user->hasRight('fournisseur', 'lire') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire'))
|| (isModEnabled('supplier_proposal') && $user->hasRight('supplier_proposal', 'lire'))) {
// Supplier
$selected = (GETPOSTISSET('supplier') ? GETPOSTINT('supplier') : $object->fournisseur);
print '<span class="vendor-back">'.$langs->trans("Vendor").'</span><input id="supplier" class="flat checkforselect marginleftonly" type="checkbox" name="supplier" value="1"'.($selected ? ' checked="checked"' : '').'>';
print '<span class="vendor-back"><label for="supplierinput">'.$langs->trans("Vendor").'</label></span><input id="supplierinput" class="flat checkforselect marginleftonly" type="checkbox" name="supplier" value="1"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
print '</tr>';
Expand Down

0 comments on commit 334deae

Please sign in to comment.