Commit d23b44fc authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5797-cancel-button-has-no-effect-apply-template' into '1.2.2-fixes'

Resolve "cancel button has no effect (apply template)"

See merge request fusiondirectory/fd!412

(cherry picked from commit dcb38c57)

58dd02ec :ambulance: fix(core) Fix cancel button on template dialog
Showing with 9 additions and 8 deletions
+9 -8
......@@ -51,14 +51,15 @@ class templateDialog
function save_object ()
{
if ($this->target === NULL) {
if (isset($_POST[$this->post_cancel])) {
return $this->handle_cancel();
}
if ((isset($_POST[$this->post_finish]) || isset($_GET[$this->post_finish])) && is_object($this->template)) {
$this->template->save_object();
return $this->handle_finish();
}
if (isset($_POST[$this->post_cancel])) {
return $this->handle_cancel();
}
if (($this->target === NULL) &&
(isset($_POST[$this->post_finish]) || isset($_GET[$this->post_finish])) &&
is_object($this->template)) {
$this->template->save_object();
return $this->handle_finish();
}
if (
......
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