diff --git a/doc/conf/LSobject/customActions.docbook b/doc/conf/LSobject/customActions.docbook index 99264751..66d5d3e6 100644 --- a/doc/conf/LSobject/customActions.docbook +++ b/doc/conf/LSobject/customActions.docbook @@ -17,6 +17,7 @@ 'disableOnSuccessMsg' => '[booléen]', 'noConfirmation' => '[booléen]', 'redirectToObjectList' => '[booléen]', + 'noRedirect' => '[booléen]', 'rights' => array( 'LSprofile1', 'LSprofile2', @@ -109,6 +110,15 @@ + + noRedirect + + Booléen permetant de désactiver la redirection de l'utilisateur après + l'execution de l'action. Cela permet à la fonction de définir son propre fichier + de template de retour et donc d'afficher une page personnalisable. + + + rights diff --git a/public_html/custom_action.php b/public_html/custom_action.php index 5ab34179..87084c7f 100644 --- a/public_html/custom_action.php +++ b/public_html/custom_action.php @@ -56,7 +56,7 @@ if(LSsession :: startLSsession()) { if ($config['redirectToObjectList']) { LSsession :: redirect('view.php?LSobject='.$LSobject.'&refresh'); } - else { + else if (!isset($config['noRedirect']) || !$config['noRedirect']) { LSsession :: redirect('view.php?LSobject='.$LSobject.'&dn='.urlencode($dn)); } } @@ -81,8 +81,8 @@ if(LSsession :: startLSsession()) { LStemplate :: assign('question',$question); LStemplate :: assign('validation_url','custom_action.php?LSobject='.urlencode($LSobject).'&dn='.urlencode($dn).'&customAction='.urlencode($customAction).'&valid'); LStemplate :: assign('validation_label',_('Validate')); + LSsession :: setTemplate('question.tpl'); } - LSsession :: setTemplate('question.tpl'); } else { LSerror :: addErrorCode('LSsession_13');