Merge pull request #18284 from cfoellmann/fix-actionbuttons
fix actionbuttons on editline or presend
This commit is contained in:
commit
7a66442cc4
@ -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">';
|
||||||
|
|
||||||
|
|||||||
@ -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';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user