1 <html metal:use-macro="here/main_template/macros/master"
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n">
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <metal:block metal:fill-slot="javascript_head_slot">
8 <script type="text/javascript" tal:attributes="src here/widget_form_manager.js/absolute_url"></script>
11 <body i18n:domain="photoprint">
12 <div metal:fill-slot="main"
13 tal:define="pptool nocall:options/pptool;
14 hasPO python:pptool.hasPrintingOptions(here);
17 <form tal:attributes="action string:${here/absolute_url}/photoprint_templates_edit_form">
18 <div tal:condition="not:hasPO">
19 <span i18n:translate="" tal:omit-tag="">
20 No printing options are defined at this level.
22 <span tal:condition="pourl" tal:omit-tag="">
23 <span i18n:translate="" tal:omit-tag="">
24 The printing options that apply here are defined above:
26 <a tal:attributes="href pourl" tal:content="pourl"></a><br/>
28 <input type="submit" name="createOptionsContainer"
29 value="Define printing options" i18n:attributes="value" />
33 <div id="print_order_templates_editing_area" style="padding-top:1em">
34 <form tal:attributes="action string:${here/absolute_url}/photoprint_templates_edit_form"
35 id="print_order_templates_edit_form"
36 tal:condition="hasPO">
37 <table id="print_order_templates_data_area" class="listing" cellspacing="0" style="width:auto">
41 <th i18n:translate="">Title</th>
42 <th i18n:translate="">Reference</th>
43 <th i18n:translate="">Max. number of copies</th>
44 <th i18n:translate="">Price</th>
45 <th i18n:translate="">VAT (%)</th>
48 <tal:block tal:repeat="o python:pptool.getPrintOrderOptionsContainerFor(here).objectValues()">
49 <tal:block tal:define="classRowName python:repeat['o'].odd() and 'odd' or 'even'">
50 <tbody metal:define-macro="print_order_template_row">
51 <tr tal:attributes="class classRowName">
53 <a tal:attributes="href string:${o/absolute_url}/delete_object" name="rm">
54 <img tal:attributes="src string:${portal_url}/rm.png;
55 onmouseover string:this.src='${portal_url}/rm_over.png';
56 onmouseout string:this.src='${portal_url}/rm.png'"
57 width="11" height="11" border="0" />
60 <td tal:content="o/title">title</td>
61 <td tal:content="o/productReference">reference</td>
62 <td tal:content="o/maxCopies"></td>
63 <td tal:content="o/price/taxed">price</td>
64 <td tal:content="o/price/vat">vat</td>
66 <a tal:attributes="href string:${o/absolute_url}/formWidgetData" name="edit">
67 <img tal:attributes="src string:${portal_url}/pencil.png"
68 width="16" height="16" border="0" />
72 <tr tal:attributes="class classRowName">
73 <td colspan="2"><br /></td>
74 <td colspan="4"><em tal:content="o/description">bla</em></td>
80 <a href="." title="Add print order template" name="add" i18n:attributes="title">
81 <img tal:attributes="src string:$portal_url/add.png"
82 alt="Add print order template" width="11" height="11" border="0"
83 style="margin-top:0.5em"
84 i18n:attributes="alt"/>
89 <form tal:attributes="action string:${here/absolute_url}/photoprint_templates_edit_form"
90 tal:condition="hasPO">
91 <input type="submit" name="deleteOptionContainer" style="margin-top:3em"
92 value="Delete options defined at this level" i18n:attributes="value"/>
97 <div id="order_template_add_widget">
98 <table class="TwoColumnForm" metal:define-macro="order_template_form_widget">
100 <th i18n:translate="">Title</th>
102 <input type="text" name="title" size="30" />
106 <th i18n:translate="">Description</th>
108 <textarea name="description" rows="5"></textarea>
112 <th i18n:translate="">Product reference</th>
114 <input type="text" name="productReference" size="30" />
118 <th i18n:translate="">Max. number of copies</th>
120 <input type="text" name="maxCopies" size="3"/>
121 <dl class="FieldHelp">
122 <dd i18n:translate="max_copies_field_help">The 0 value means unlimited</dd>
127 <th i18n:translate="">Price</th>
129 <input type="text" name="price" size="3" />
131 <th i18n:translate="">VAT (%)</th>
133 <input type="text" name="VATRate" size="3"/>
139 <metal:block metal:define-slot="buttons">
140 <input type="submit" name="addTemplate" value="Add" i18n:attributes="value" style="float:left"/>
142 <input type="submit" name="cancel" value="Cancel" i18n:attributes="value" style="float:right"/>
147 <div id="order_template_edit_widget">
148 <metal:block metal:use-macro="template/macros/order_template_form_widget">
149 <metal:block metal:fill-slot="buttons">
150 <input type="submit" name="edit" value="Save" i18n:attributes="value" style="float:left"/>
151 <input type="hidden" name="id" value=""/>
157 <script type="text/javascript">
159 new WidgetBasedFormManager( {'add' : document.getElementById('order_template_add_widget')
160 ,'edit' : document.getElementById('order_template_edit_widget')
162 , document.getElementById('print_order_templates_editing_area')
163 , document.getElementById('print_order_templates_data_area')
164 , 7 // number of cols