summaryrefslogtreecommitdiff
path: root/app/Template/action
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-19 12:00:35 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-19 12:00:35 -0500
commit778c9d82126560980d6473a708cd45c8ee0ba330 (patch)
tree21b0e16b87a30d8275d62b14d07a39b604a1b512 /app/Template/action
parent23ff360d6232bbaf397405f0ac048f4200cea4ad (diff)
Allow people to remove missing automatic actions
When an automatic action is installed from a plugin, if the plugin is removed the automatic could stay in the database if the user didn't remove manually the automatic action.
Diffstat (limited to 'app/Template/action')
-rw-r--r--app/Template/action/index.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Template/action/index.php b/app/Template/action/index.php
index a889f588..a6fc70f9 100644
--- a/app/Template/action/index.php
+++ b/app/Template/action/index.php
@@ -26,11 +26,18 @@
</ul>
</div>
- <?= $this->text->in($action['action_name'], $available_actions) ?>
+ <?php if (! isset($available_params[$action['action_name']])): ?>
+ <?= $this->text->e($action['action_name']) ?>
+ <?php else: ?>
+ <?= $this->text->in($action['action_name'], $available_actions) ?>
+ <?php endif ?>
</th>
</tr>
<tr>
<td>
+ <?php if (! isset($available_params[$action['action_name']])): ?>
+ <p class="alert alert-error"><?= t('Automatic action not found: "%s"', $action['action_name']) ?></p>
+ <?php else: ?>
<ul>
<li>
<?= t('Event name') ?> =
@@ -61,6 +68,7 @@
</li>
<?php endforeach ?>
</ul>
+ <?php endif ?>
</td>
</tr>
<?php endforeach ?>