diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-02 17:01:27 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-02 17:01:27 -0500 |
commit | 3833c12ccce59bcc49c4cfa892401973558f604d (patch) | |
tree | b67b0e10cdc3d42e5626f728206138a444a40ed0 /app/Template/column | |
parent | d49ce63e51f596ad3bf0d02b689aea673cf544f8 (diff) |
Refactoring/rewrite of modal boxes handling
Diffstat (limited to 'app/Template/column')
-rw-r--r-- | app/Template/column/create.php | 9 | ||||
-rw-r--r-- | app/Template/column/edit.php | 8 | ||||
-rw-r--r-- | app/Template/column/index.php | 9 | ||||
-rw-r--r-- | app/Template/column/remove.php | 9 |
4 files changed, 12 insertions, 23 deletions
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 @@ <div class="page-header"> <h2><?= t('Add a new column') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ColumnController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('ColumnController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> @@ -18,9 +17,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 4)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="5"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'column', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> 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 @@ <h2><?= t('Edit column "%s"', $column['title']) ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ColumnController', 'update', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('ColumnController', 'update', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -20,9 +20,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> 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 @@ <h2><?= t('Edit the board for "%s"', $project['name']) ?></h2> <ul> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a new column'), 'ColumnController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new column'), 'ColumnController', 'create', array('project_id' => $project['id'])) ?> </li> </ul> </div> @@ -41,12 +40,10 @@ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a> <ul> <li> - <i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'ColumnController', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'ColumnController', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> <li> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ColumnController', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ColumnController', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> </ul> </div> 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 @@ <?= t('This action will REMOVE ALL TASKS associated to this column!') ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ColumnController', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ColumnController', + 'remove', + array('project_id' => $project['id'], 'column_id' => $column['id']) + ) ?> </div> |