Code and tests for #1450

This commit is contained in:
James Cole
2018-09-15 13:43:57 +02:00
parent fa347f5f75
commit 57b4a5be08
16 changed files with 1089 additions and 18 deletions

View File

@@ -3,13 +3,7 @@
<a href="#" class="btn btn-danger btn-sm remove-action"><i class="fa fa-trash"></i></a>
</td>
<td style="width:30%;">
{#
{% if errors.has('rule-action.'~count) %}
<span class="form-control-feedback"><i class="fa fa-fw fa-remove"></i></span>
<p class="text-danger">{{ errors.first('rule-action.'~count) }}</p>
{% endif %}
#}
{# todo error when invalid name. #}
<select name="rule_actions[{{ count }}][name]" class="form-control">
{% for key,name in allRuleActions() %}
<option value="{{ key }}" label="{{ name }}" {% if key == oldAction %} selected{% endif %}>{{ name }}</option>
@@ -20,13 +14,11 @@
<input autocomplete="off" type="text" value="{{ oldValue }}" name="rule_actions[{{ count }}][value]"
class="form-control">
{#
{% if errors.has(('rule-action-value.'~count)) %}
{% if errors.has('rule_actions.'~count~'.value') %}
<p class="text-danger">
{{ errors.first('rule-action-value.'~count) }}
{{ errors.first('rule_actions.'~count~'.value') }}
</p>
{% endif %}
#}
</td>
<td style="width:20%;">
<div class="checkbox">

View File

@@ -23,13 +23,11 @@
<td style="position: relative;">
<input autocomplete="off" type="text" value="{{ oldValue }}" name="rule_triggers[{{ count }}][value]" class="form-control">
{#
{% if errors.has(('rule-trigger-value.'~count)) %}
{% if errors.has('rule_triggers.'~count~'.value') %}
<p class="text-danger">
{{ errors.first('rule-trigger-value.'~count) }}
{{ errors.first('rule_triggers.'~count~'.value') }}
</p>
{% endif %}
#}
</td>
<td style="width:20%;">
<div class="checkbox">