| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  | {% extends "./layout/default.twig" %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block breadcrumbs %}
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, ruleGroup) }}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  | {% endblock %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block content %}
 | 
					
						
							|  |  |  |     {{ Form.open({'class' : 'form-horizontal','id' : 'store','url' : route('rules.rule.store', ruleGroup.id)}) }}
 | 
					
						
							|  |  |  |     <input type="hidden" name="rule_group_id" value="{{ ruleGroup.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') }}
 | 
					
						
							| 
									
										
										
										
											2016-01-15 08:06:33 +01:00
										 |  |  |                     {{ ExpandedForm.select('trigger',allJournalTriggers()) }}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                     {{ ExpandedForm.checkbox('stop_processing',1,null, {helpText: trans('firefly.rule_help_stop_processing')}) }}
 | 
					
						
							|  |  |  |                 </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') }}
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <!-- RULE TRIGGERS -->
 | 
					
						
							|  |  |  |     <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>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 18:09:20 +01:00
										 |  |  |                 <!-- display any error -->
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  |                 <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">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 18:09:20 +01:00
										 |  |  |                         {% for trigger in oldTriggers %}
 | 
					
						
							|  |  |  |                             {{ trigger|raw }}
 | 
					
						
							|  |  |  |                         {% endfor %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  |                         </tbody>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     </table>
 | 
					
						
							|  |  |  |                     <p>
 | 
					
						
							|  |  |  |                         <br/>
 | 
					
						
							|  |  |  |                         <a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
 | 
					
						
							| 
									
										
										
										
											2016-02-17 12:05:41 +01:00
										 |  |  |                         <a href="#" class="btn btn-default test_rule_triggers">{{ 'test_rule_triggers'|_ }}</a>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  |                     </p>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							| 
									
										
										
										
											2016-02-17 12:05:41 +01:00
										 |  |  |     
 | 
					
						
							|  |  |  | 	{% include '/rules/partials/test-trigger-modal.twig' %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     <!-- RULE ACTIONS -->
 | 
					
						
							|  |  |  |     <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">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  |                     <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">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 19:20:02 +01:00
										 |  |  |                         {% for action in oldActions %}
 | 
					
						
							|  |  |  |                             {{ action|raw }}
 | 
					
						
							|  |  |  |                         {% endfor %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  |                         </tbody>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     </table>
 | 
					
						
							|  |  |  |                     <p>
 | 
					
						
							|  |  |  |                         <br/>
 | 
					
						
							|  |  |  |                         <a href="#" class="btn btn-default add_rule_action">{{ 'add_rule_action'|_ }}</a>
 | 
					
						
							|  |  |  |                     </p>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="row">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 18:09:20 +01:00
										 |  |  |         <div class="col-lg-12 col-md-12 col-sm-12">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |             <!-- panel for options -->
 | 
					
						
							|  |  |  |             <div class="box">
 | 
					
						
							|  |  |  |                 <div class="box-header with-border">
 | 
					
						
							|  |  |  |                     <h3 class="box-title">{{ 'options'|_ }}</h3>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |                 <div class="box-body">
 | 
					
						
							| 
									
										
										
										
											2016-01-15 06:35:53 +01:00
										 |  |  |                     {{ ExpandedForm.optionsList('create','rule') }}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |                 <div class="box-footer">
 | 
					
						
							| 
									
										
										
										
											2016-01-15 06:35:53 +01:00
										 |  |  |                     <button type="submit" class="btn pull-right btn-success">{{ 'store_new_rule'|_ }}</button>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  |     {{ Form.close|raw }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% endblock %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  | {% block scripts %}
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/rules/create-edit.js"></script>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 18:09:20 +01:00
										 |  |  |     <script type="text/javascript">
 | 
					
						
							|  |  |  |         var triggerCount = {{ triggerCount }};
 | 
					
						
							|  |  |  |         var actionCount = {{ actionCount }};
 | 
					
						
							|  |  |  |     </script>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 18:57:52 +01:00
										 |  |  |     <script type="text/javascript" src="js/rules/create.js"></script>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 16:41:15 +01:00
										 |  |  | {% endblock %}
 |