mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add icons labels for payment buttons
Add labels to icons when TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS is set
This commit is contained in:
parent
0730cab90f
commit
dd2d5259de
|
|
@ -286,6 +286,7 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||
<?php if (count($arrayOfValidPaymentModes) > 0) {
|
||||
$paycode = $arrayOfValidPaymentModes[0]->code;
|
||||
$payIcon = '';
|
||||
$payLabel = '';
|
||||
if ($paycode == 'LIQ') {
|
||||
$paycode = 'cash';
|
||||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins';
|
||||
|
|
@ -297,7 +298,8 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check';
|
||||
}
|
||||
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.'"></span>' : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</button>';
|
||||
if(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS)) $payLabel = ' iconwithlabel';
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.$payLabel.'"></span>'.(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS) ? '<br/> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : '') : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</button>';
|
||||
} else {
|
||||
print '<button type="button" class="calcbutton2">'.$langs->trans("NoPaimementModesDefined").'</button>';
|
||||
}
|
||||
|
|
@ -309,6 +311,7 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||
<?php if (count($arrayOfValidPaymentModes) > 1) {
|
||||
$paycode = $arrayOfValidPaymentModes[1]->code;
|
||||
$payIcon = '';
|
||||
$payLabel = '';
|
||||
if ($paycode == 'LIQ') {
|
||||
$paycode = 'cash';
|
||||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins';
|
||||
|
|
@ -320,7 +323,8 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check';
|
||||
}
|
||||
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.'"></span>' : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>';
|
||||
if(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS)) $payLabel = ' iconwithlabel';
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.$payLabel.'"></span>'.(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS) ? '<br/> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code) : '') : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>';
|
||||
} else {
|
||||
$button = array_pop($action_buttons);
|
||||
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
||||
|
|
@ -333,6 +337,7 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||
<?php if (count($arrayOfValidPaymentModes) > 2) {
|
||||
$paycode = $arrayOfValidPaymentModes[2]->code;
|
||||
$payIcon = '';
|
||||
$payLabel = '';
|
||||
if ($paycode == 'LIQ') {
|
||||
$paycode = 'cash';
|
||||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins';
|
||||
|
|
@ -344,7 +349,8 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check';
|
||||
}
|
||||
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.'"></span>' : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>';
|
||||
if(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS)) $payLabel = ' iconwithlabel';
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.$payLabel.'"></span>'.(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS) ? '<br/> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code) : '') : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>';
|
||||
} else {
|
||||
$button = array_pop($action_buttons);
|
||||
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user