Skip to content

Commit

Permalink
Add mass action
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 2, 2025
1 parent 56ff52b commit 5aaba0d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htdocs/alumni/langs/en_US/alumni.lang
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ Results=Results
EventChoices=Event choices
NewVoteEntry=New event choice
NbOfVotes=Number of event choices
SetToPaid=Set to paid
SetToUnpaid=Set to unpaid
SetToDoNotReEngage=Set to do not re-engage
SetToCanReEngage=Set to can re-engage
23 changes: 23 additions & 0 deletions htdocs/alumni/survey_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,27 @@
$result = $tmpobject->updateExtraField('a_paye', null, $user);
}
}

if ($massaction == 'settodonotreengage' && $permissiontoadd) {
foreach ($toselect as $toselectid) {
$tmpobject = new Survey($db);
$tmpobject->fetch($toselectid);

$tmpobject->array_options = array('options_ne_pas_relancer' => 1);

$result = $tmpobject->updateExtraField('ne_pas_relancer', null, $user);
}
}
if ($massaction == 'settoreengage' && $permissiontoadd) {
foreach ($toselect as $toselectid) {
$tmpobject = new Survey($db);
$tmpobject->fetch($toselectid);

$tmpobject->array_options = array('options_ne_pas_relancer' => 0);

$result = $tmpobject->updateExtraField('ne_pas_relancer', null, $user);
}
}
}


Expand Down Expand Up @@ -515,6 +536,8 @@
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
$arrayofmassactions['settopaid'] = img_picto('', 'currency', 'class="pictofixedwidth"').$langs->trans("SetToPaid");
$arrayofmassactions['setunpaid'] = img_picto('', 'circle', 'class="pictofixedwidth"').$langs->trans("SetToUnPaid");
$arrayofmassactions['settodonotreengage'] = img_picto('', 'circle', 'class="pictofixedwidth"').$langs->trans("SetToDoNotReEngage");
$arrayofmassactions['settoreengage'] = img_picto('', 'circle', 'class="pictofixedwidth"').$langs->trans("SetToCanReEngage");
}
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
$arrayofmassactions = array();
Expand Down

0 comments on commit 5aaba0d

Please sign in to comment.