Verified Commit 0164085f authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Modify the gritter response on restitution request

parent c4ae45c5
......@@ -71,17 +71,23 @@ class archiveModification
} else {
$success = count($result['success']);
$echec = count($result['error']);
$this->json->message='';
$this->json->message = '%1$s archive(s) flagged for restitution.';
$this->json->message = $this->translator->getText($this->json->message);
$this->json->message = sprintf($this->json->message, $success);
if ($success > 0) {
$this->json->message = '%1$s archive(s) flagged for restitution.';
$this->json->message = $this->translator->getText($this->json->message);
$this->json->message = sprintf($this->json->message, $success);
}
if ($echec > 0) {
$message = '%1$s archive(s) can not be flagged.';
if ($success > 0) {
$this->json->message .= '<br>';
}
$message = '%1$s archive(s) can not be flagged because an action is already in progress on this(these) archive(s) (or on one of its/their objects).';
$message = $this->translator->getText($message);
$message = sprintf($message, $echec);
$this->json->message .= ' '.$message;
$this->json->message .= $message;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment