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.
This commit is contained in:
Frederic Guillot
2017-02-19 12:00:35 -05:00
parent 23ff360d62
commit 778c9d8212
29 changed files with 55 additions and 11 deletions

View File

@@ -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 ?>