mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Start work on adding a rule.
This commit is contained in:
22
resources/views/rules/partials/action.twig
Normal file
22
resources/views/rules/partials/action.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
<tr data-count="{{ count }}">
|
||||
<td style="width:40px;">
|
||||
<a href="#" class="btn btn-danger btn-sm remove-action"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td style="width:30%;">
|
||||
<select name="rule-action[{{ count }}]" class="form-control">
|
||||
{% for key,name in actions %}
|
||||
<option name="{{ key }}" label="{{ name }}">{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="rule-action-value[{{ count }}]" class="form-control">
|
||||
</td>
|
||||
<td style="width:20%;">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="rule-action-stop[{{ count }}]" value="1"/>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
22
resources/views/rules/partials/trigger.twig
Normal file
22
resources/views/rules/partials/trigger.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
<tr data-count="{{ count }}">
|
||||
<td style="width:40px;">
|
||||
<a href="#" class="btn btn-danger btn-sm remove-trigger"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td style="width:30%;">
|
||||
<select name="rule-trigger[{{ count }}]" class="form-control">
|
||||
{% for key,name in triggers %}
|
||||
<option name="{{ key }}" label="{{ name }}">{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="rule-trigger-value[{{ count }}]" class="form-control">
|
||||
</td>
|
||||
<td style="width:20%;">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="rule-trigger-stop[{{ count }}]" value="1"/>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -15,6 +15,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('title') }}
|
||||
{{ ExpandedForm.select('trigger',journalTriggers) }}
|
||||
{{ ExpandedForm.checkbox('stop_processing',1,null, {helpText: trans('firefly.rule_help_stop_processing')}) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,8 +41,23 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
Here
|
||||
<div class="box-body rule-trigger-box">
|
||||
<table class="table table-condensed table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{{ 'trigger'|_ }}</th>
|
||||
<th>{{ 'trigger_value'|_ }}</th>
|
||||
<th>{{ 'stop_processing_other_triggers'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="rule-trigger-tbody">
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,7 +71,22 @@
|
||||
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
Here
|
||||
<table class="table table-condensed table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{{ 'action'|_ }}</th>
|
||||
<th>{{ 'action_value'|_ }}</th>
|
||||
<th>{{ 'stop_executing_other_actions'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="rule-action-tbody">
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default add_rule_action">{{ 'add_rule_action'|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,3 +114,7 @@
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/rules/create-edit.js"></script>
|
||||
<script type="text/javascript" src="js/rules/edit.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user