show preDelete messages in list

This commit is contained in:
Roland Gruber 2012-06-05 18:20:17 +00:00
parent 1d03441efd
commit 3ef08edceb
2 changed files with 6 additions and 2 deletions

View File

@ -972,7 +972,7 @@ class lamList {
StatusMessage('INFO', sprintf(_('You can download your PDF files {link=%s}{color=#d2131a}here{endcolor}{endlink}.'), '../' . $_SESSION['mass_pdf']['file']));
}
}
elseif (isset($_SESSION['listRedirectMessages'])) {
if (isset($_SESSION['listRedirectMessages'])) {
for ($i = 0; $i < sizeof($_SESSION['listRedirectMessages']); $i++) {
call_user_func_array('StatusMessage', $_SESSION['listRedirectMessages'][$i]);
}

View File

@ -147,6 +147,7 @@ if (isset($_POST['delete'])) {
// Delete dns
$allOk = true;
$allErrors = array();
for ($m=0; $m<count($_SESSION['delete_dn']); $m++) {
// Set to true if an real error has happened
$stopprocessing = false;
@ -240,7 +241,8 @@ if (isset($_POST['delete'])) {
}
}
if (!$stopprocessing) {
$errors = deleteDN($_SESSION['delete_dn'][$m]);
$messages = deleteDN($_SESSION['delete_dn'][$m]);
$errors = array_merge($errors, $messages);
if (sizeof($errors) > 0) {
$stopprocessing = true;
$allOk = false;
@ -273,6 +275,7 @@ if (isset($_POST['delete'])) {
}
echo "<br>\n";
}
$allErrors = array_merge($allErrors, $errors);
}
echo "<br>\n";
echo "<br><button class=\"smallPadding\" name=\"cancel\" id=\"backButton\">" . _('Back to list') . "</button>\n";
@ -285,6 +288,7 @@ if (isset($_POST['delete'])) {
jQuery('#backButton').button();
<?php
if ($allOk) {
$_SESSION['listRedirectMessages'] = $allErrors;
echo "jQuery('#backButtonAllOk').click();";
}
?>