From 3833c12ccce59bcc49c4cfa892401973558f604d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 2 Jan 2017 17:01:27 -0500 Subject: Refactoring/rewrite of modal boxes handling --- app/Template/swimlane/create.php | 8 ++------ app/Template/swimlane/edit.php | 8 ++------ app/Template/swimlane/edit_default.php | 8 ++------ app/Template/swimlane/index.php | 3 +-- app/Template/swimlane/remove.php | 28 +++++++++++++--------------- app/Template/swimlane/table.php | 9 +++------ 6 files changed, 23 insertions(+), 41 deletions(-) (limited to 'app/Template/swimlane') diff --git a/app/Template/swimlane/create.php b/app/Template/swimlane/create.php index 207b526c..7d05e731 100644 --- a/app/Template/swimlane/create.php +++ b/app/Template/swimlane/create.php @@ -1,7 +1,7 @@ -
+ form->csrf() ?> form->hidden('project_id', $values) ?> @@ -12,9 +12,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> -
- - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php index d225b345..c1c41196 100644 --- a/app/Template/swimlane/edit.php +++ b/app/Template/swimlane/edit.php @@ -2,7 +2,7 @@

-
+ form->csrf() ?> @@ -15,9 +15,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> -
- - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
diff --git a/app/Template/swimlane/edit_default.php b/app/Template/swimlane/edit_default.php index 8a0c0a15..a2c3ee73 100644 --- a/app/Template/swimlane/edit_default.php +++ b/app/Template/swimlane/edit_default.php @@ -1,7 +1,7 @@ -
+ form->csrf() ?> form->hidden('id', $values) ?> @@ -10,9 +10,5 @@ form->checkbox('show_default_swimlane', t('Show default swimlane'), 1, $values['show_default_swimlane'] == 1) ?> -
- - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php index 4f78a405..e05b9088 100644 --- a/app/Template/swimlane/index.php +++ b/app/Template/swimlane/index.php @@ -2,8 +2,7 @@

diff --git a/app/Template/swimlane/remove.php b/app/Template/swimlane/remove.php index f16b778c..02d1e322 100644 --- a/app/Template/swimlane/remove.php +++ b/app/Template/swimlane/remove.php @@ -1,17 +1,15 @@ -
- + -
-

- -

+
+

+ +

-
- url->link(t('Yes'), 'SwimlaneController', 'remove', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
-
-
+ modal->confirmButtons( + 'SwimlaneController', + 'remove', + array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']) + ) ?> + diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index 81daed01..4c9390e0 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -20,8 +20,7 @@