mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
fix: replace deprecated form.model with html
This commit is contained in:
@@ -5,56 +5,61 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ Form.model(ruleGroup, {'class' : 'form-horizontal','id' : 'update','url' : route('rule-groups.update',ruleGroup.id) } ) }}
|
||||
<input type="hidden" name="id" value="{{ ruleGroup.id }}"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# only correct way to do active checkbox #}
|
||||
{{ ExpandedForm.checkbox('active', 1) }}
|
||||
<form method="post" action="{{ route('rule-groups.update',ruleGroup.id) }}" class="form-horizontal"
|
||||
accept-charset="UTF-8"
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
{{ ExpandedForm.text('title') }}
|
||||
<input type="hidden" name="id" value="{{ ruleGroup.id }}"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# only correct way to do active checkbox #}
|
||||
{{ ExpandedForm.checkbox('active', 1) }}
|
||||
|
||||
{{ ExpandedForm.text('title') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
|
||||
{# optional fields #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.textarea('description', ruleGroup.description) }}
|
||||
{# optional fields #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.textarea('description', ruleGroup.description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('update','rule-group') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule_group'|_ }}</button>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('update','rule-group') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule_group'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="v1/js/ff/rule-groups/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/rule-groups/edit.js?v={{ FF_VERSION }}"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -5,136 +5,142 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ Form.model(rule, {'class' : 'form-horizontal','id' : 'store','url' : route('rules.update', rule.id)}) }}
|
||||
<input type="hidden" name="id" value="{{ rule.id }}"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
|
||||
<form method="post" action="{{ route('rules.update', rule.id) }}" class="form-horizontal" accept-charset="UTF-8"
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
<input type="hidden" name="id" value="{{ rule.id }}"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('title') }}
|
||||
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
|
||||
{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}
|
||||
|
||||
{# only correct way to do active checkbox #}
|
||||
{{ ExpandedForm.checkbox('active', 1, null, {helpText: trans('firefly.rule_help_active')}) }}
|
||||
|
||||
{{ ExpandedForm.checkbox('stop_processing',1,rule.stop_processing, {helpText: trans('firefly.rule_help_stop_processing')}) }}
|
||||
{{ ExpandedForm.checkbox('strict',1,rule.strict, {helpText: trans('firefly.rule_help_strict')}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('title') }}
|
||||
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
|
||||
{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
{# only correct way to do active checkbox #}
|
||||
{{ ExpandedForm.checkbox('active', 1, null, {helpText: trans('firefly.rule_help_active')}) }}
|
||||
|
||||
{{ ExpandedForm.checkbox('stop_processing',1,rule.stop_processing, {helpText: trans('firefly.rule_help_stop_processing')}) }}
|
||||
{{ ExpandedForm.checkbox('strict',1,rule.strict, {helpText: trans('firefly.rule_help_strict')}) }}
|
||||
{# optional fields #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.textarea('description', rule.description, {helpText: trans('firefly.field_supports_markdown')}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
{# optional fields #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.textarea('description', rule.description, {helpText: trans('firefly.field_supports_markdown')}) }}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body rule-trigger-box">
|
||||
<table class="table table-condensed table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{{ 'trigger'|_ }}</th>
|
||||
<th>{{ 'is_not_rule_trigger'|_ }}</th>
|
||||
<th>{{ 'trigger_value'|_ }}</th>
|
||||
<th>{{ 'stop_processing_other_triggers'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="rule-trigger-tbody">
|
||||
{% for trigger in oldTriggers %}
|
||||
{{ trigger|raw }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
|
||||
<a href="#" class="btn btn-default test_rule_triggers"><span
|
||||
class="fa fa-flask"></span> {{ 'test_rule_triggers'|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body rule-trigger-box">
|
||||
<table class="table table-condensed table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{{ 'trigger'|_ }}</th>
|
||||
<th>{{ 'is_not_rule_trigger'|_ }}</th>
|
||||
<th>{{ 'trigger_value'|_ }}</th>
|
||||
<th>{{ 'stop_processing_other_triggers'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="rule-trigger-tbody">
|
||||
{% for trigger in oldTriggers %}
|
||||
{{ trigger|raw }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% include 'rules.partials.test-trigger-modal' %}
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
|
||||
<a href="#" class="btn btn-default test_rule_triggers"><span class="fa fa-flask"></span> {{ 'test_rule_triggers'|_ }}</a>
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<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">
|
||||
{% for action in oldActions %}
|
||||
{{ action|raw }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default add_rule_action">{{ 'add_rule_action'|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'rules.partials.test-trigger-modal' %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('update','rule') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<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">
|
||||
{% for action in oldActions %}
|
||||
{{ action|raw }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default add_rule_action">{{ 'add_rule_action'|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('update','rule') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" nonce="{{ JS_NONCE }}">
|
||||
var triggerCount = {{ triggerCount }};
|
||||
var actionCount = {{ actionCount }};
|
||||
var testRuleTriggersText = '{{ 'test_rule_triggers'|_|escape('js') }}';
|
||||
</script>
|
||||
<script type="text/javascript" src="v1/js/ff/rules/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/rules/create-edit.js?v={{ FF_VERSION }}"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user