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/column/create.php | 9 ++------- app/Template/column/edit.php | 8 ++------ app/Template/column/index.php | 9 +++------ app/Template/column/remove.php | 9 +++++---- 4 files changed, 12 insertions(+), 23 deletions(-) (limited to 'app/Template/column') diff --git a/app/Template/column/create.php b/app/Template/column/create.php index f4cded52..aad9606b 100644 --- a/app/Template/column/create.php +++ b/app/Template/column/create.php @@ -1,8 +1,7 @@ -
- + form->csrf() ?> form->hidden('project_id', $values) ?> @@ -18,9 +17,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 4)) ?> -
- - - url->link(t('cancel'), 'column', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index a72a5c84..a36c2e6c 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -2,7 +2,7 @@

-
+ form->csrf() ?> @@ -20,9 +20,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors) ?> -
- - - url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 8c96a350..9e7ddfe8 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -2,8 +2,7 @@

@@ -41,12 +40,10 @@ diff --git a/app/Template/column/remove.php b/app/Template/column/remove.php index dc0a4712..4134b175 100644 --- a/app/Template/column/remove.php +++ b/app/Template/column/remove.php @@ -8,8 +8,9 @@

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