Merge pull request #18284 from cfoellmann/fix-actionbuttons

fix actionbuttons on editline or presend
This commit is contained in:
Laurent Destailleur 2022-08-23 01:49:56 +02:00 committed by GitHub
commit 7a66442cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 182 additions and 182 deletions

View File

@ -2020,12 +2020,15 @@ if ($action == 'create') {
print dol_get_fiche_end(); print dol_get_fiche_end();
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
/* /*
* Buttons * Buttons
*/ */
if ($user->socid == 0 && $action != 'presend' && $action != 'editline') {
if ($user->socid == 0) {
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array(); $parameters = array();
@ -2137,11 +2140,6 @@ if ($action == 'create') {
print "</div>"; print "</div>";
} }
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
if ($action != 'presend') { if ($action != 'presend') {
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';

View File

@ -2439,7 +2439,9 @@ if ($action == 'create') {
* Buttons for actions * Buttons for actions
*/ */
if ($user->socid == 0 && $action != 'editline' && $action != 'delete') { if ($user->socid == 0 && $action != 'delete') {
if ($action != 'makeorder' && $action != 'presend' && $action != 'editline') {
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array(); $parameters = array();
@ -2637,7 +2639,7 @@ if ($action == 'create') {
print "</div>"; print "</div>";
}
if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') { if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') {
// Set status to ordered (action=commande) // Set status to ordered (action=commande)
@ -2674,7 +2676,12 @@ if ($action == 'create') {
print "<br>"; print "<br>";
} }
if ($action != 'makeorder') { // Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
if ($action != 'makeorder' && $action != 'presend' ) {
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
// Generated documents // Generated documents
@ -2923,11 +2930,6 @@ if ($action == 'create') {
} }
} }
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
// Presend form // Presend form
$modelmail = 'order_supplier_send'; $modelmail = 'order_supplier_send';
$defaulttopic = 'SendOrderRef'; $defaulttopic = 'SendOrderRef';