Make sure rules work.

This commit is contained in:
James Cole
2018-12-21 09:01:21 +01:00
parent a8ff77addd
commit a7e1a51476
10 changed files with 54 additions and 47 deletions

View File

@@ -4,9 +4,9 @@
</td>
<td style="width:30%;">
{# todo error when invalid name. #}
<select name="actions[{{ count }}][name]" class="form-control">
{% for key,name in allRuleActions() %}
<option value="{{ key }}" label="{{ name }}" {% if key == oldAction %} selected{% endif %}>{{ name }}</option>
<select name="actions[{{ count }}][type]" class="form-control">
{% for key,type in allRuleActions() %}
<option value="{{ key }}" label="{{ type }}" {% if key == oldAction %} selected{% endif %}>{{ type }}</option>
{% endfor %}
</select>
</td>

View File

@@ -3,13 +3,13 @@
<a href="#" class="btn btn-danger btn-sm remove-trigger"><i class="fa fa-trash"></i></a>
</td>
<td style="width:30%;">
<select name="triggers[{{ count }}][name]" class="form-control">
{% for key,name in allRuleTriggers() %}
<option value="{{ key }}" label="{{ name }}"
<select name="triggers[{{ count }}][type]" class="form-control">
{% for key,type in allRuleTriggers() %}
<option value="{{ key }}" label="{{ type }}"
{% if key == oldTrigger %}
selected
{% endif %}
>{{ name }}</option>
>{{ type }}</option>
{% endfor %}
</select>
</td>