added destination to hat creator popup

so it returns to person page after creation.
This commit is contained in:
naomi 2018-04-11 13:11:54 +02:00
parent 6067afed23
commit 3226ce01d3

View File

@ -31,7 +31,7 @@ class HatCreator extends BlockBase {
->loadByProperties(['type' => $id, 'person' => $person_id]);
if (!reset($hats)) {
$label = $type['label'];
$markup .= "<p><a class='use-ajax' data-dialog-type='modal' href='/zencrm/hat/add/$id/$person_id'>Create $label Hat</a></p>";
$markup .= "<p><a class='use-ajax' data-dialog-type='modal' href='/zencrm/hat/add/$id/$person_id?destination=/zencrm/person/$person_id'>Create $label Hat</a></p>";
}
}
return [