mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSobject / customAction : Added noConfirmation parameter
This commit is contained in:
parent
55d8d5ec98
commit
33b21ad860
4 changed files with 14 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
|||
'question_format' => '[LSformat de la question de confirmation]',
|
||||
'onSuccessMsgFormat' => '[LSformat du message à afficher en cas de succès de l'action]',
|
||||
'disableOnSuccessMsg' => '[booléen]',
|
||||
'noConfirmation' => '[booléen]',
|
||||
'rights' => array(
|
||||
'LSprofile1',
|
||||
'LSprofile2',
|
||||
|
@ -75,6 +76,14 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>noConfirmation</term>
|
||||
<listitem>
|
||||
<simpara>Booléen permetant de désactiver la confirmation de l'exécution de
|
||||
l'action.</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>rights</term>
|
||||
<listitem>
|
||||
|
|
|
@ -38,7 +38,7 @@ if(LSsession :: startLSsession()) {
|
|||
else {
|
||||
$title=__($_GET['customAction']);
|
||||
}
|
||||
if (isset($_GET['valid'])) {
|
||||
if (isset($_GET['valid']) || $config['noConfirmation']) {
|
||||
$objectname=$object -> getDisplayName();
|
||||
$GLOBALS['Smarty'] -> assign('pagetitle',$title.' : '.$objectname);
|
||||
if ($config['function']($object)) {
|
||||
|
|
|
@ -101,6 +101,9 @@ var LSview = new Class({
|
|||
},
|
||||
|
||||
onCustomActionBtnClick: function(event,a) {
|
||||
if (a.hasClass('LScustomActions_noConfirmation')) {
|
||||
return true;
|
||||
}
|
||||
Event(event).stop();
|
||||
if (!this._confirmBoxOpen) {
|
||||
this._confirmBoxOpen = 1;
|
||||
|
|
|
@ -71,7 +71,7 @@ if(LSsession :: startLSsession()) {
|
|||
'label' => ((isset($config['label']))?__($config['label']):__($name)),
|
||||
'url' => 'custom_action.php?LSobject='.$LSobject.'&dn='.$dn.'&customAction='.$name,
|
||||
'action' => ((isset($config['icon']))?$config['icon']:'generate'),
|
||||
'class' => 'LScustomActions'
|
||||
'class' => 'LScustomActions'.(($config['noConfirmation'])?' LScustomActions_noConfirmation':'')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue