Ajout bouton PayPal sur le formulaire de commande.
[photoprint.git] / skins / photoprint_templates_edit_template.pt
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">
5 <head>
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>
9 </metal:block>
10 </head>
11 <body i18n:domain="photoprint">
12 <div metal:fill-slot="main"
13 tal:define="pptool nocall:options/pptool;
14 hasPO python:pptool.hasPrintingOptions(here);
15 pourl options/pourl">
16
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.
21 </span><br/>
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:
25 </span><br/>
26 <a tal:attributes="href pourl" tal:content="pourl"></a><br/>
27 </span>
28 <input type="submit" name="createOptionsContainer"
29 value="Define printing options" i18n:attributes="value" />
30 </div>
31 </form>
32
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">
38 <thead>
39 <tr>
40 <th><br/></th>
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>
46 <th><br/></th>
47 </thead>
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">
52 <td>
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" />
58 </a>
59 </td>
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>
65 <td rowspan="2">
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" />
69 </a>
70 </td>
71 </tr>
72 <tr tal:attributes="class classRowName">
73 <td colspan="2"><br /></td>
74 <td colspan="4"><em tal:content="o/description">bla</em></td>
75 </tr>
76 </tbody>
77 </tal:block>
78 </tal:block>
79 </table>
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"/>
85 </a>
86 <br/>
87 </form>
88 </div>
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"/>
93 </form>
94
95 <!-- form widgets -->
96 <div class="hidden">
97 <div id="order_template_add_widget">
98 <table class="TwoColumnForm" metal:define-macro="order_template_form_widget">
99 <tr>
100 <th i18n:translate="">Title</th>
101 <td colspan="3">
102 <input type="text" name="title" size="30" />
103 </td>
104 </tr>
105 <tr>
106 <th i18n:translate="">Description</th>
107 <td colspan="3">
108 <textarea name="description" rows="5"></textarea>
109 </td>
110 </tr>
111 <tr>
112 <th i18n:translate="">Product reference</th>
113 <td colspan="3">
114 <input type="text" name="productReference" size="30" />
115 </td>
116 </tr>
117 <tr>
118 <th i18n:translate="">Max. number of copies</th>
119 <td>
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>
123 </dl>
124 </td>
125 </tr>
126 <tr>
127 <th i18n:translate="">Price</th>
128 <td>
129 <input type="text" name="price" size="3" />
130 </td>
131 <th i18n:translate="">VAT (%)</th>
132 <td>
133 <input type="text" name="VATRate" size="3"/>
134 </td>
135 </tr>
136 <tr>
137 <td><br /></td>
138 <td colspan="3">
139 <metal:block metal:define-slot="buttons">
140 <input type="submit" name="addTemplate" value="Add" i18n:attributes="value" style="float:left"/>
141 </metal:block>
142 <input type="submit" name="cancel" value="Cancel" i18n:attributes="value" style="float:right"/>
143 </td>
144 </table>
145 </div>
146
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=""/>
152 </metal:block>
153 </metal:block>
154 </div>
155 </div>
156
157 <script type="text/javascript">
158 // <!--
159 new WidgetBasedFormManager( {'add' : document.getElementById('order_template_add_widget')
160 ,'edit' : document.getElementById('order_template_edit_widget')
161 }
162 , document.getElementById('print_order_templates_editing_area')
163 , document.getElementById('print_order_templates_data_area')
164 , 7 // number of cols
165 );
166 // -->
167 </script>
168 </div>
169 </body>
170 </html>