2 [%- USE L %][%- USE P %]
3 [%- USE HTML %][%- USE LxERP %]
7 [%- INCLUDE 'common/flash.html' %]
9 <form method="post" action="controller.pl">
10 [% L.hidden_tag("price_rule.id", SELF.price_rule.id) %]
11 [% L.hidden_tag("price_rule.type", SELF.price_rule.type) %]
15 <th align="right">[% 'Name' | $T8 %]</th>
16 <td>[% L.input_tag("price_rule.name", SELF.price_rule.name, size=60, class='initial_focus') %]</td>
19 <th align="right">[% 'Priority' | $T8 %]</th>
20 <td>[% L.select_tag('price_rule.priority', [ [3, LxERP.t8('Normal') ], [ 4, LxERP.t8('Override') ] ], default=SELF.price_rule.priority, style='width: 300px') %]</td>
24 <th align="right">[% 'Valid' | $T8 %]</th>
25 <td>[% L.select_tag('price_rule.obsolete', [ [ 0, LxERP.t8('Valid') ], [ 1 , LxERP.t8('Obsolete')]], default=SELF.price_rule.obsolete, title_key='description', style='width: 300px') %]</td>
32 <h3>[% 'If all of the following match' | $T8 %]:</h3>
34 <div id='price_rule_items' style='margin-left: 20px;'>
35 [% FOREACH item = SELF.price_rule.items %]
36 [% PROCESS 'price_rule/item.html' item=item %]
38 <div id='price_rule_new_items'></div>
39 <div>[% PROCESS 'price_rule/empty_item.html' %]</div>
42 <h3>[% 'Then' | $T8 %]:</h3>
43 <div>[% 'Set (set to)' | $T8 %] [% L.select_tag('price_rule.price_type', SELF.all_price_types, default=SELF.price_rule.price_type) %] [% 'to (set to)' | $T8 %] [% L.input_tag('price_rule.price_or_discount_as_number', SELF.price_rule.price_or_discount_as_number) %] <a id='price_rule_price_type_help' class='interact cursor-help' title='[% 'Price type explanation' | $T8 %]'>[?]</a>
47 [% L.hidden_tag("action", "PriceRule/dispatch") %]
48 [% L.hidden_tag("callback", FORM.callback) %]
49 [% L.submit_tag("action_" _ (SELF.price_rule.id ? "update" : "create"), LxERP.t8('Save')) %]
50 [%- IF SELF.price_rule.id %]
51 [% L.submit_tag("action_create", LxERP.t8('Save as new')) %]
52 [% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?')) IF !SELF.price_rule.in_use %]
54 <a href="[% SELF.url_for(action='list', 'filter.type'=SELF.price_rule.type) %]">[%- LxERP.t8('Abort') %]</a>