From b7c4dcbe916f44997511999ae59d319fd279728b Mon Sep 17 00:00:00 2001 From: Hystepik <45882981+Hystepik@users.noreply.github.com> Date: Thu, 24 Nov 2022 23:25:06 +0100 Subject: [PATCH 1/4] fix : dolibarr_changes to match last PR --- dev/dolibarr_changes.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index cbfecbbc19f..461db52f959 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -283,6 +283,9 @@ RESTLER: elseif (count($value) && isset($value[0]) && is_numeric($value[0])) +* Add CommentParser.php line 406 & 407 to remove a warning on api request in php 8.1 + empty($value[0]) ? null : + empty($value[1]) ? null : +With swagger 2 provided into /explorer: ---------------------------------------- From 8fa6d36978757babff5668a2b909450314ac3a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Fri, 25 Nov 2022 18:03:43 +0100 Subject: [PATCH 2/4] New Add hooks addMoreActionsButtons and formConfirm to card-rec.php --- htdocs/compta/facture/card-rec.php | 65 +++++++++++++++++++----------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 2a15c74c948..aad41d10ec9 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1177,6 +1177,15 @@ if ($action == 'create') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRepeatableInvoice'), $langs->trans('ConfirmDeleteRepeatableInvoice'), 'confirm_deleteinvoice', '', 'no', 1); } + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm); + $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } + print $formconfirm; $author = new User($db); @@ -1653,33 +1662,41 @@ if ($action == 'create') { */ print '
'; - if (empty($object->suspended)) { - if ($user->rights->facture->creer) { - if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { - print ''; - } else { - if (empty($object->frequency) || $object->date_when <= $nowlasthour) { - print ''; - } else { - print ''; - } - } - } else { - print ''; - } - } - - if ($user->rights->facture->creer) { + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { + $params = array( + 'attr' => array( + 'class' => 'classfortooltip', + ), + ); if (empty($object->suspended)) { - print ''; - } else { - print ''; + if ($user->rights->facture->creer) { + if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { + print ''; + } else { + if (empty($object->frequency) || $object->date_when <= $nowlasthour) { + print ''; + } else { + print ''; + } + } + } else { + print ''; + } } + + if ($user->rights->facture->creer) { + if (empty($object->suspended)) { + print ''; + } else { + print ''; + } + } + + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $user->rights->facture->supprimer); } - - // Delete - print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->rights->facture->supprimer); - print '
'; From e36e8d15ae127e41661929ce629a83c1980d4390 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Fri, 25 Nov 2022 22:50:26 +0100 Subject: [PATCH 3/4] FIX Responsive TakePOS action buttons Nantes 2022 --- htdocs/takepos/css/pos.css.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index a1d8c80d048..88482b4dcba 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -716,9 +716,12 @@ div#moreinfo, div#infowarehouse { } button.actionbutton { - min-height: 60px; + display: inline-flex; + align-items: center; + justify-content: center; padding-left: 4px; padding-right: 4px; + min-height: 30px; } } @@ -1045,4 +1048,4 @@ html { .topnav.overflow .arrows { display: flex; -} \ No newline at end of file +} From 7b0e429edbcefa709a437bb4c86f438b068a5505 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Fri, 25 Nov 2022 23:08:54 +0100 Subject: [PATCH 4/4] FIX #22886 --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index f2a185e534d..3dc618c36ab 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -175,7 +175,7 @@ class FormTicket print dol_get_fiche_head(null, 'card', '', 0, ''); } - print '
param["returnurl"] : "").'">'; + print 'param["returnurl"] : $_SERVER['PHP_SELF']).'">'; print ''; print ''; foreach ($this->param as $key => $value) {