Skip to content

Commit

Permalink
Add Form for Action Parameter Workaround
Browse files Browse the repository at this point in the history
- WIP #15
- #12
  • Loading branch information
aljawaid committed Jan 15, 2023
1 parent b90380f commit 451ea68
Showing 1 changed file with 36 additions and 14 deletions.
50 changes: 36 additions & 14 deletions Template/action_creation/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,44 @@
<h2><?= t('Choose an event') ?></h2>
</div>

<form method="post" action="<?= $this->url->href('ActionCreationController', 'params', array('project_id' => $project['id'])) ?>">
<?= $this->form->csrf() ?>
<?php if (file_exists('plugins/KanboardEmailHistory')): ?>
<form method="post" action="<?= $this->url->href('ActionCreationController', 'params', array('project_id' => $project['id'])) ?>">
<?= $this->form->csrf() ?>

<?= $this->form->hidden('action_name', $values) ?>
<?= $this->form->hidden('action_name', $values) ?>

<?= $this->form->label(t('Action'), 'action_name') ?>
<?= $this->form->select('action_name', $available_actions, $values, array(), array('disabled')) ?>
<?= $this->form->label(t('Action'), 'action_name') ?>
<?= $this->form->select('action_name', $available_actions, $values, array(), array('disabled')) ?>

<?= $this->form->label(t('Event'), 'event_name') ?>
<?= $this->form->select('event_name', $events, $values) ?>
<?= $this->form->label(t('Event'), 'event_name') ?>
<?= $this->form->select('event_name', $events, $values) ?>

<div class="form-help">
<?= t('When the selected event occurs execute the corresponding action.') ?>
</div>
<div class="form-help">
<?= t('When the selected event occurs execute the corresponding action.') ?>
</div>

<?= $this->modal->submitButtons(array(
'submitLabel' => t('Next step')
)) ?>
</form>
<?= $this->modal->submitButtons(array(
'submitLabel' => t('Next step')
)) ?>
</form>
<?php else: ?>
<form method="post" action="<?= $this->url->href('ActionCreationController', 'params', array('project_id' => $project['id'])) ?>">
<?= $this->form->csrf() ?>

<?= $this->form->hidden('action_name', $values) ?>

<?= $this->form->label(t('Action'), 'action_name') ?>
<?= $this->form->select('action_name', $available_actions, $values, array(), array('disabled')) ?>

<?= $this->form->label(t('Event'), 'event_name') ?>
<?= $this->form->select('event_name', $events, $values) ?>

<div class="form-help">
<?= t('When the selected event occurs execute the corresponding action.') ?>
</div>

<?= $this->modal->submitButtons(array(
'submitLabel' => t('Next step')
)) ?>
</form>
<?php endif ?>

0 comments on commit 451ea68

Please sign in to comment.