mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Start work on adding a rule.
This commit is contained in:
@@ -2,13 +2,17 @@
|
|||||||
|
|
||||||
use Amount;
|
use Amount;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use Config;
|
||||||
use FireflyIII\Helpers\Report\ReportQueryInterface;
|
use FireflyIII\Helpers\Report\ReportQueryInterface;
|
||||||
|
use FireflyIII\Models\RuleAction;
|
||||||
|
use FireflyIII\Models\RuleTrigger;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||||
use FireflyIII\Support\CacheProperties;
|
use FireflyIII\Support\CacheProperties;
|
||||||
|
use Input;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
use Response;
|
use Response;
|
||||||
use Session;
|
use Session;
|
||||||
@@ -38,6 +42,49 @@ class JsonController extends Controller
|
|||||||
return Response::json('true');
|
return Response::json('true');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RuleTrigger|null $trigger
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function trigger(RuleTrigger $trigger = null)
|
||||||
|
{
|
||||||
|
$count = intval(Input::get('count')) > 0 ? intval(Input::get('count')) : 1;
|
||||||
|
$keys = array_keys(Config::get('firefly.rule-triggers'));
|
||||||
|
$triggers = [];
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
if ($key != 'user_action') {
|
||||||
|
$triggers[$key] = trans('firefly.rule_trigger_' . $key . '_choice');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$view = view('rules.partials.trigger', compact('triggers', 'trigger', 'count'))->render();
|
||||||
|
|
||||||
|
|
||||||
|
return Response::json(['html' => $view]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RuleAction|null $action
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function action(RuleAction $action = null)
|
||||||
|
{
|
||||||
|
$count = intval(Input::get('count')) > 0 ? intval(Input::get('count')) : 1;
|
||||||
|
$keys = array_keys(Config::get('firefly.rule-actions'));
|
||||||
|
$actions = [];
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
$actions[$key] = trans('firefly.rule_action_' . $key . '_choice');
|
||||||
|
}
|
||||||
|
|
||||||
|
$view = view('rules.partials.action', compact('actions', 'action', 'count'))->render();
|
||||||
|
|
||||||
|
|
||||||
|
return Response::json(['html' => $view]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -61,6 +61,18 @@ class RuleController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
|
* @return View
|
||||||
|
*/
|
||||||
|
public function storeRule(RuleGroup $ruleGroup)
|
||||||
|
{
|
||||||
|
echo '<pre>';
|
||||||
|
var_dump(Input::all());exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
public function createRule(RuleGroup $ruleGroup)
|
public function createRule(RuleGroup $ruleGroup)
|
||||||
@@ -68,6 +80,13 @@ class RuleController extends Controller
|
|||||||
$subTitleIcon = 'fa-clone';
|
$subTitleIcon = 'fa-clone';
|
||||||
$subTitle = trans('firefly.make_new_rule', ['title' => $ruleGroup->title]);
|
$subTitle = trans('firefly.make_new_rule', ['title' => $ruleGroup->title]);
|
||||||
|
|
||||||
|
// mandatory field: rule triggers on update-journal or store-journal.
|
||||||
|
$journalTriggers = [
|
||||||
|
'store-journal' => trans('firefly.rule_trigger_store_journal'),
|
||||||
|
'update-journal' => trans('firefly.rule_trigger_update_journal')
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
// put previous url in session if not redirect from store (not "create another").
|
// put previous url in session if not redirect from store (not "create another").
|
||||||
if (Session::get('rules.rule.create.fromStore') !== true) {
|
if (Session::get('rules.rule.create.fromStore') !== true) {
|
||||||
Session::put('rules.rule.create.url', URL::previous());
|
Session::put('rules.rule.create.url', URL::previous());
|
||||||
@@ -76,7 +95,7 @@ class RuleController extends Controller
|
|||||||
Session::flash('gaEventCategory', 'rules');
|
Session::flash('gaEventCategory', 'rules');
|
||||||
Session::flash('gaEventAction', 'create-rule-group');
|
Session::flash('gaEventAction', 'create-rule-group');
|
||||||
|
|
||||||
return view('rules.rule.create', compact('subTitleIcon','ruleGroup', 'subTitle'));
|
return view('rules.rule.create', compact('subTitleIcon', 'ruleGroup', 'subTitle', 'journalTriggers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -208,6 +227,7 @@ class RuleController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function reorderRuleTriggers(RuleRepositoryInterface $repository, Rule $rule)
|
public function reorderRuleTriggers(RuleRepositoryInterface $repository, Rule $rule)
|
||||||
@@ -224,6 +244,7 @@ class RuleController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function reorderRuleActions(RuleRepositoryInterface $repository, Rule $rule)
|
public function reorderRuleActions(RuleRepositoryInterface $repository, Rule $rule)
|
||||||
@@ -268,6 +289,7 @@ class RuleController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function upRule(RuleRepositoryInterface $repository, Rule $rule)
|
public function upRule(RuleRepositoryInterface $repository, Rule $rule)
|
||||||
@@ -281,6 +303,7 @@ class RuleController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function downRule(RuleRepositoryInterface $repository, Rule $rule)
|
public function downRule(RuleRepositoryInterface $repository, Rule $rule)
|
||||||
@@ -294,6 +317,7 @@ class RuleController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function upRuleGroup(RuleRepositoryInterface $repository, RuleGroup $ruleGroup)
|
public function upRuleGroup(RuleRepositoryInterface $repository, RuleGroup $ruleGroup)
|
||||||
@@ -307,6 +331,7 @@ class RuleController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function downRuleGroup(RuleRepositoryInterface $repository, RuleGroup $ruleGroup)
|
public function downRuleGroup(RuleRepositoryInterface $repository, RuleGroup $ruleGroup)
|
||||||
|
@@ -186,6 +186,9 @@ Route::group(
|
|||||||
Route::get('/json/box/bills-paid', ['uses' => 'JsonController@boxBillsPaid', 'as' => 'json.box.unpaid']);
|
Route::get('/json/box/bills-paid', ['uses' => 'JsonController@boxBillsPaid', 'as' => 'json.box.unpaid']);
|
||||||
Route::get('/json/transaction-journals/{what}', 'JsonController@transactionJournals');
|
Route::get('/json/transaction-journals/{what}', 'JsonController@transactionJournals');
|
||||||
|
|
||||||
|
Route::get('/json/trigger/{RuleTrigger?}', ['uses' => 'JsonController@trigger', 'as' => 'json.trigger']);
|
||||||
|
Route::get('/json/action/{RuleAction?}', ['uses' => 'JsonController@action', 'as' => 'json.action']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New user Controller
|
* New user Controller
|
||||||
*/
|
*/
|
||||||
|
41
public/js/rules/create-edit.js
Normal file
41
public/js/rules/create-edit.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* create-edit.js
|
||||||
|
* Copyright (C) 2016 Sander Dorigo
|
||||||
|
*
|
||||||
|
* This software may be modified and distributed under the terms
|
||||||
|
* of the MIT license. See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var triggerCount = 0;
|
||||||
|
var actionCount = 0;
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
console.log("create-edit");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function addNewTrigger() {
|
||||||
|
"use strict";
|
||||||
|
triggerCount++;
|
||||||
|
|
||||||
|
$.getJSON('json/trigger', {count: triggerCount}).success(function (data) {
|
||||||
|
//console.log(data.html);
|
||||||
|
$('tbody.rule-trigger-tbody').append(data.html);
|
||||||
|
}).fail(function () {
|
||||||
|
alert('Cannot get a new trigger.');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function addNewAction() {
|
||||||
|
"use strict";
|
||||||
|
triggerCount++;
|
||||||
|
|
||||||
|
$.getJSON('json/action', {count: actionCount}).success(function (data) {
|
||||||
|
//console.log(data.html);
|
||||||
|
$('tbody.rule-action-tbody').append(data.html);
|
||||||
|
}).fail(function () {
|
||||||
|
alert('Cannot get a new action.');
|
||||||
|
});
|
||||||
|
}
|
27
public/js/rules/edit.js
Normal file
27
public/js/rules/edit.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* edit.js
|
||||||
|
* Copyright (C) 2016 Sander Dorigo
|
||||||
|
*
|
||||||
|
* This software may be modified and distributed under the terms
|
||||||
|
* of the MIT license. See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// make a line.
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
console.log("edit");
|
||||||
|
addNewTrigger();
|
||||||
|
addNewAction();
|
||||||
|
$('.add_rule_trigger').click(function () {
|
||||||
|
addNewTrigger();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.add_rule_action').click(function () {
|
||||||
|
addNewAction();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
@@ -1,4 +1,11 @@
|
|||||||
/* global comboChart,token, billID */
|
/* global comboChart,token, billID */
|
||||||
|
/*
|
||||||
|
* index.js
|
||||||
|
* Copyright (C) 2016 Sander Dorigo
|
||||||
|
*
|
||||||
|
* This software may be modified and distributed under the terms
|
||||||
|
* of the MIT license. See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
// Return a helper with preserved width of cells
|
// Return a helper with preserved width of cells
|
||||||
var fixHelper = function (e, tr) {
|
var fixHelper = function (e, tr) {
|
||||||
@@ -13,7 +20,6 @@ var fixHelper = function (e, tr) {
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
console.log("Hello");
|
|
||||||
$('.rule-triggers').sortable({
|
$('.rule-triggers').sortable({
|
||||||
helper: fixHelper,
|
helper: fixHelper,
|
||||||
stop: sortStop,
|
stop: sortStop,
|
||||||
|
@@ -63,6 +63,15 @@ return [
|
|||||||
'make_new_rule' => 'Make new rule in rule group ":title"',
|
'make_new_rule' => 'Make new rule in rule group ":title"',
|
||||||
'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.',
|
'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.',
|
||||||
|
|
||||||
|
'trigger' => 'Trigger',
|
||||||
|
'trigger_value' => 'Trigger on value',
|
||||||
|
'stop_processing_other_triggers' => 'Stop processing other triggers',
|
||||||
|
'add_rule_trigger' => 'Add new trigger',
|
||||||
|
'action' => 'Action',
|
||||||
|
'action_value' => 'Action value',
|
||||||
|
'stop_executing_other_actions' => 'Stop executing other actions',
|
||||||
|
'add_rule_action' => 'Add new action',
|
||||||
|
|
||||||
// actions and triggers
|
// actions and triggers
|
||||||
'rule_trigger_user_action' => 'User action is ":trigger_value"',
|
'rule_trigger_user_action' => 'User action is ":trigger_value"',
|
||||||
'rule_trigger_from_account_starts' => 'Source account starts with ":trigger_value"',
|
'rule_trigger_from_account_starts' => 'Source account starts with ":trigger_value"',
|
||||||
@@ -82,6 +91,26 @@ return [
|
|||||||
'rule_trigger_description_contains' => 'Description contains ":trigger_value"',
|
'rule_trigger_description_contains' => 'Description contains ":trigger_value"',
|
||||||
'rule_trigger_description_is' => 'Description is ":trigger_value"',
|
'rule_trigger_description_is' => 'Description is ":trigger_value"',
|
||||||
|
|
||||||
|
'rule_trigger_from_account_starts_choice' => 'Source account starts with..',
|
||||||
|
'rule_trigger_from_account_ends_choice' => 'Source account ends with..',
|
||||||
|
'rule_trigger_from_account_is_choice' => 'Source account is..',
|
||||||
|
'rule_trigger_from_account_contains_choice' => 'Source account contains..',
|
||||||
|
'rule_trigger_to_account_starts_choice' => 'Destination account starts with..',
|
||||||
|
'rule_trigger_to_account_ends_choice' => 'Destination account ends with..',
|
||||||
|
'rule_trigger_to_account_is_choice' => 'Destination account is..',
|
||||||
|
'rule_trigger_to_account_contains_choice' => 'Destination account contains..',
|
||||||
|
'rule_trigger_transaction_type_choice' => 'Transaction is of type..',
|
||||||
|
'rule_trigger_amount_less_choice' => 'Amount is less than..',
|
||||||
|
'rule_trigger_amount_exactly_choice' => 'Amount is..',
|
||||||
|
'rule_trigger_amount_more_choice' => 'Amount is more than..',
|
||||||
|
'rule_trigger_description_starts_choice' => 'Description starts with..',
|
||||||
|
'rule_trigger_description_ends_choice' => 'Description ends with..',
|
||||||
|
'rule_trigger_description_contains_choice' => 'Description contains..',
|
||||||
|
'rule_trigger_description_is_choice' => 'Description is..',
|
||||||
|
|
||||||
|
'rule_trigger_store_journal' => 'When a journal is created',
|
||||||
|
'rule_trigger_update_journal' => 'When a journal is updated',
|
||||||
|
|
||||||
'rule_action_set_category' => 'Set category to ":action_value"',
|
'rule_action_set_category' => 'Set category to ":action_value"',
|
||||||
'rule_action_clear_category' => 'Clear category',
|
'rule_action_clear_category' => 'Clear category',
|
||||||
'rule_action_set_budget' => 'Set budget to ":action_value"',
|
'rule_action_set_budget' => 'Set budget to ":action_value"',
|
||||||
@@ -93,6 +122,17 @@ return [
|
|||||||
'rule_action_append_description' => 'Append description with ":action_value"',
|
'rule_action_append_description' => 'Append description with ":action_value"',
|
||||||
'rule_action_prepend_description' => 'Prepend description with ":action_value"',
|
'rule_action_prepend_description' => 'Prepend description with ":action_value"',
|
||||||
|
|
||||||
|
'rule_action_set_category_choice' => 'Set category to..',
|
||||||
|
'rule_action_clear_category_choice' => 'Clear any category',
|
||||||
|
'rule_action_set_budget_choice' => 'Set budget to..',
|
||||||
|
'rule_action_clear_budget_choice' => 'Clear any budget',
|
||||||
|
'rule_action_add_tag_choice' => 'Add tag..',
|
||||||
|
'rule_action_remove_tag_choice' => 'Remove tag..',
|
||||||
|
'rule_action_remove_all_tags_choice' => 'Remove all tags',
|
||||||
|
'rule_action_set_description_choice' => 'Set description to..',
|
||||||
|
'rule_action_append_description_choice' => 'Append description with..',
|
||||||
|
'rule_action_prepend_description_choice' => 'Prepend description with..',
|
||||||
|
|
||||||
// tags
|
// tags
|
||||||
'store_new_tag' => 'Store new tag',
|
'store_new_tag' => 'Store new tag',
|
||||||
'update_tag' => 'Update tag',
|
'update_tag' => 'Update tag',
|
||||||
|
@@ -67,6 +67,7 @@ return [
|
|||||||
'filename' => 'File name',
|
'filename' => 'File name',
|
||||||
'mime' => 'Mime type',
|
'mime' => 'Mime type',
|
||||||
'size' => 'Size',
|
'size' => 'Size',
|
||||||
|
'trigger' => 'Trigger',
|
||||||
'stop_processing' => 'Stop processing',
|
'stop_processing' => 'Stop processing',
|
||||||
|
|
||||||
|
|
||||||
|
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>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
{{ ExpandedForm.text('title') }}
|
{{ ExpandedForm.text('title') }}
|
||||||
|
{{ ExpandedForm.select('trigger',journalTriggers) }}
|
||||||
{{ ExpandedForm.checkbox('stop_processing',1,null, {helpText: trans('firefly.rule_help_stop_processing')}) }}
|
{{ ExpandedForm.checkbox('stop_processing',1,null, {helpText: trans('firefly.rule_help_stop_processing')}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,8 +41,23 @@
|
|||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
|
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body rule-trigger-box">
|
||||||
Here
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,7 +71,22 @@
|
|||||||
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
|
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,3 +114,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% 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