Refactoring/rewrite of modal boxes handling
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user