Fix test coverage.

This commit is contained in:
James Cole
2018-12-09 20:54:11 +01:00
parent 97f6e68164
commit ae4612f134
46 changed files with 383 additions and 229 deletions

View File

@@ -4,7 +4,7 @@
</td>
<td style="width:30%;">
{# todo error when invalid name. #}
<select name="rule_actions[{{ count }}][name]" class="form-control">
<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>
{% endfor %}
@@ -12,18 +12,18 @@
</td>
<td style="position: relative;">
<input autocomplete="off" type="text" value="{{ oldValue }}" name="rule_actions[{{ count }}][value]"
<input autocomplete="off" type="text" value="{{ oldValue }}" name="actions[{{ count }}][value]"
class="form-control">
{% if errors.has('rule_actions.'~count~'.value') %}
{% if errors.has('actions.'~count~'.value') %}
<p class="text-danger">
{{ errors.first('rule_actions.'~count~'.value') }}
{{ errors.first('actions.'~count~'.value') }}
</p>
{% endif %}
</td>
<td style="width:20%;">
<div class="checkbox">
<label>
<input type="checkbox" name="rule_actions[{{ count }}][stop_processing]" value="1"
<input type="checkbox" name="actions[{{ count }}][stop_processing]" value="1"
{% if oldChecked %}checked{% endif %}
/>
</label>

View File

@@ -3,14 +3,7 @@
<a href="#" class="btn btn-danger btn-sm remove-trigger"><i class="fa fa-trash"></i></a>
</td>
<td style="width:30%;">
{#
{% if errors.has('rule-trigger.'~count) %}
<span class="form-control-feedback"><i class="fa fa-fw fa-remove"></i></span>
<p class="text-danger">{{ errors.first('rule-trigger.'~count) }}</p>
{% endif %}
#}
<select name="rule_triggers[{{ count }}][name]" class="form-control">
<select name="triggers[{{ count }}][name]" class="form-control">
{% for key,name in allRuleTriggers() %}
<option value="{{ key }}" label="{{ name }}"
{% if key == oldTrigger %}
@@ -22,17 +15,17 @@
</td>
<td style="position: relative;">
<input autocomplete="off" type="text" value="{{ oldValue }}" name="rule_triggers[{{ count }}][value]" class="form-control">
{% if errors.has('rule_triggers.'~count~'.value') %}
<input autocomplete="off" type="text" value="{{ oldValue }}" name="triggers[{{ count }}][value]" class="form-control">
{% if errors.has('triggers.'~count~'.value') %}
<p class="text-danger">
{{ errors.first('rule_triggers.'~count~'.value') }}
{{ errors.first('triggers.'~count~'.value') }}
</p>
{% endif %}
</td>
<td style="width:20%;">
<div class="checkbox">
<label>
<input type="checkbox" name="rule_triggers[{{ count }}][stop_processing]" value="1"
<input type="checkbox" name="triggers[{{ count }}][stop_processing]" value="1"
{% if oldChecked %}checked{% endif %}
/>
</label>