diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-28 14:26:40 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-28 14:26:40 -0400 |
commit | 03fa01ac7b036820ee232d893ec63241918c6012 (patch) | |
tree | 295e82e6552ffb044554a11afa95318a4e180f87 /app/Templates | |
parent | 0c8de6a3f58cde2696ac276b3456f3577d312e2b (diff) |
Improve automatic actions (check for compatible events/actions/parameters)
Diffstat (limited to 'app/Templates')
-rw-r--r-- | app/Templates/action_event.php | 22 | ||||
-rw-r--r-- | app/Templates/action_index.php | 9 | ||||
-rw-r--r-- | app/Templates/action_params.php | 1 |
3 files changed, 23 insertions, 9 deletions
diff --git a/app/Templates/action_event.php b/app/Templates/action_event.php new file mode 100644 index 00000000..eee41780 --- /dev/null +++ b/app/Templates/action_event.php @@ -0,0 +1,22 @@ +<div class="page-header"> + <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> +</div> + +<h3><?= t('Choose an event') ?></h3> +<form method="post" action="?controller=action&action=params&project_id=<?= $project['id'] ?>" autocomplete="off"> + <?= Helper\form_csrf() ?> + <?= Helper\form_hidden('project_id', $values) ?> + <?= Helper\form_hidden('action_name', $values) ?> + + <?= Helper\form_label(t('Event'), 'event_name') ?> + <?= Helper\form_select('event_name', $events, $values) ?><br/> + + <div class="form-help"> + <?= t('When the selected event occurs execute the corresponding action.') ?> + </div> + + <div class="form-actions"> + <input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/> + <?= t('or') ?> <a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a> + </div> +</form>
\ No newline at end of file diff --git a/app/Templates/action_index.php b/app/Templates/action_index.php index c21395fd..2647e4a7 100644 --- a/app/Templates/action_index.php +++ b/app/Templates/action_index.php @@ -50,20 +50,13 @@ <?php endif ?> <h3><?= t('Add an action') ?></h3> -<form method="post" action="?controller=action&action=params&project_id=<?= $project['id'] ?>" autocomplete="off"> +<form method="post" action="?controller=action&action=event&project_id=<?= $project['id'] ?>" autocomplete="off"> <?= Helper\form_csrf() ?> <?= Helper\form_hidden('project_id', $values) ?> - <?= Helper\form_label(t('Event'), 'event_name') ?> - <?= Helper\form_select('event_name', $available_events, $values) ?><br/> - <?= Helper\form_label(t('Action'), 'action_name') ?> <?= Helper\form_select('action_name', $available_actions, $values) ?><br/> - <div class="form-help"> - <?= t('When the selected event occurs execute the corresponding action.') ?> - </div> - <div class="form-actions"> <input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/> </div> diff --git a/app/Templates/action_params.php b/app/Templates/action_params.php index 92d16288..e3417f32 100644 --- a/app/Templates/action_params.php +++ b/app/Templates/action_params.php @@ -1,7 +1,6 @@ <div class="page-header"> <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> </div> -<section> <h3><?= t('Define action parameters') ?></h3> <form method="post" action="?controller=action&action=create&project_id=<?= $project['id'] ?>" autocomplete="off"> |