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/category/edit.php | 9 ++------- app/Template/category/index.php | 6 ++---- app/Template/category/remove.php | 28 +++++++++++++--------------- 3 files changed, 17 insertions(+), 26 deletions(-) (limited to 'app/Template/category') diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php index d8ca313d..108826f3 100644 --- a/app/Template/category/edit.php +++ b/app/Template/category/edit.php @@ -2,8 +2,7 @@

-
- + form->csrf() ?> form->hidden('id', $values) ?> @@ -15,9 +14,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> -
- - - url->link(t('cancel'), 'CategoryController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
diff --git a/app/Template/category/index.php b/app/Template/category/index.php index 336b79a2..e93138fd 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -15,12 +15,10 @@ diff --git a/app/Template/category/remove.php b/app/Template/category/remove.php index e7b9c9b4..79e8a560 100644 --- a/app/Template/category/remove.php +++ b/app/Template/category/remove.php @@ -1,17 +1,15 @@ -
- + -
-

- -

+
+

+ +

-
- url->link(t('Yes'), 'CategoryController', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'CategoryController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
-
-
+ modal->confirmButtons( + 'CategoryController', + 'remove', + array('project_id' => $project['id'], 'category_id' => $category['id']) + ) ?> + -- cgit v1.2.3