diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 61dbadd151a..7d9a16e5914 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -56,8 +56,10 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'invoicetemplatelist'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used + -// Security check $id = (GETPOSTINT('facid') ? GETPOSTINT('facid') : GETPOSTINT('id')); $lineid = GETPOSTINT('lineid'); $ref = GETPOST('ref', 'alpha'); @@ -130,6 +132,7 @@ $now = dol_now(); $error = 0; +// Security check $result = restrictedArea($user, 'facture', $object->id, $objecttype); @@ -152,7 +155,28 @@ if ($reshook < 0) { } if (empty($reshook)) { - if (GETPOST('cancel', 'alpha')) { + $backurlforlist = DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php'; + + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); + } + } + } + + // include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + if ($cancel) { + /*var_dump($cancel);var_dump($backtopage);var_dump($backtopageforcancel);exit;*/ + if (!empty($backtopageforcancel)) { + header("Location: ".$backtopageforcancel); + exit; + } elseif (!empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } $action = ''; } @@ -323,7 +347,7 @@ if (empty($reshook)) { } elseif ($action == 'setfrequency' && $user->hasRight('facture', 'creer')) { // Set frequency and unit frequency $object->context['actionmsg'] = $langs->trans("FieldXModified", $langs->transnoentitiesnoconv("Frequency")); - $object->setFrequencyAndUnit(GETPOSTINT('frequency'), GETPOSTINT('unit_frequency')); + $object->setFrequencyAndUnit(GETPOSTINT('frequency'), GETPOST('unit_frequency')); } elseif ($action == 'setdate_when' && $user->hasRight('facture', 'creer')) { // Set next date of execution $date = dol_mktime(GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')); @@ -1129,32 +1153,32 @@ if ($action == 'create') { // Frequency + unit print '
| '; - print " "; + print ''; print $form->selectarray('unit_frequency', array('d' => $langs->trans('Day'), 'm' => $langs->trans('Month'), 'y' => $langs->trans('Year')), ($object->unit_frequency ? $object->unit_frequency : 'm')); print ' | '; print ''; diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 0c5526d0ae9..cabf475062b 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -606,19 +606,19 @@ if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['f.total_ht']['checked'])) { // Amount net print ' | '; - print ''; + print ''; print ' | '; } if (!empty($arrayfields['f.total_tva']['checked'])) { // Amount Vat print ''; - print ''; + print ''; print ' | '; } if (!empty($arrayfields['f.total_ttc']['checked'])) { // Amount print ''; - print ''; + print ''; print ' | '; } if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 85e217d58c2..d3fb03dffa4 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1780,7 +1780,7 @@ if ($action == 'create') { print ''; // Price - print ''; + print ' | '; // Price multicurrency /*if (isModEnabled("multicurrency")) { @@ -1805,7 +1805,7 @@ if ($action == 'create') { if ($objp->fk_product) { print ''; } - print ''; + print ''; } print ' | '; print ''; diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 9594dd362a3..d5176a852ba 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -169,7 +169,7 @@ print $formadmin->selectTypeOfFields('type', GETPOST('type', 'alpha')); ?> |
| trans("Size"); ?> | |||||||
| trans("Size"); ?> | |||||||
| @@ -191,7 +191,7 @@ print $formadmin->selectTypeOfFields('type', GETPOST('type', 'alpha')); | |||||||
| trans("Position"); ?> | |||||||
| trans("Position"); ?> | |||||||
| trans("LanguageFile"); ?> | |||||||
| trans("Size"); ?> | |||||||
| trans("Size"); ?> | |||||||
| trans("Position"); ?> | |||||||
| trans("Position"); ?> | |||||||
| trans("LanguageFile"); ?> | |||||||
| trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> | |||||||
| trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> | |||||||
| trans("Unique"); ?> | > | - "> + "> | multicurrency_code != $conf->currency) { $coldisplay++; ?>- "> + "> | - "> + "> | multicurrency_code != $conf->currency) { $coldisplay++; - print ''; + print ' | '; } if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { @@ -238,7 +238,7 @@ $coldisplay++; if (getDolGlobalInt('MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES')) { $upinctax = price2num($line->total_ttc / (float) $line->qty, 'MU'); } - print ' | hasRight('ficheinter', 'creer')) { // Set frequency and unit frequency $object->fetch($id); - $object->setFrequencyAndUnit(GETPOSTINT('frequency'), GETPOSTINT('unit_frequency')); + $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha')); } elseif ($action == 'setdate_when' && $user->hasRight('ficheinter', 'creer')) { // Set next date of execution $object->fetch($id); diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index 77650248741..15c5be55a0e 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -307,7 +307,7 @@ if (empty($reshook)) { $result = $object->setBankAccount(GETPOSTINT('fk_account')); } elseif ($action == 'setfrequency' && $usercancreate) { // Set frequency and unit frequency - $object->setFrequencyAndUnit(GETPOSTINT('frequency'), GETPOSTINT('unit_frequency')); + $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha')); } elseif ($action == 'setdate_when' && $usercancreate) { // Set next date of execution $date = dol_mktime(GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')); diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 62cfd250fdd..037d3abc38c 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -163,6 +163,8 @@ if (!$permissiontoread) { accessforbidden(); } +$error = 0; + /* * Actions @@ -175,8 +177,6 @@ if ($reshook < 0) { } if (empty($reshook)) { - $error = 0; - $backurlforlist = dol_buildpath('/mymodule/myobject_list.php', 1); if (empty($backtopage) || ($cancel && empty($id))) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index ceabc61c354..7f0eb705fd8 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6475,6 +6475,10 @@ input.select2-input { .select2-container .select2-selection--multiple { min-height: 28px !important; } +.tableforfield .select2-container .select2-selection--single { + height: 25px; +} + .select2-container--default .select2-selection--multiple .select2-selection__choice { margin-top: 5px !important; border: none; |