added some debugging output to the ifUserCan tag handler
[bse.git] / site / templates / admin / edit_product.tmpl
CommitLineData
759c295d 1<html><head><title><:ifNew:>Add<:or:>Edit<:eif:> product - Shop administration</title>
5bc24704
TC
2 <link rel="stylesheet" type="text/css" href="/css/admin.css">
3</head>
4<body>
5<h1>Shop Administration</h1>
35c0719f 6<:ifMessage:>
27feb834
TC
7<p><b><:message:></b></p>
8<:or:><:eif:>
759c295d
TC
9<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:if New:><:or New:><a href="<:product admin:>">See
10 product</a> | <a href="/cgi-bin/admin/add.pl?id=<:product parentid:>">Edit
11 parent</a>
12 |<:eif New:> <a href="/cgi-bin/admin/shopadmin.pl">Manage catalogs</a> |<:if
13 New:><:or New:><:if UserCan edit_save:product,edit_field_edit_listed:product
14 :> <a href="/cgi-bin/admin/add.pl?id=<:product id:>&_t=steps">Manage
15 step parents</a> | <:if Product listed:> <a href="<:script:>?id=<:product id:>&hide=1&r=<:script:>?id=<:product id:>">Hide
16 product</a> |<:or Product:> <a href="<:script:>?id=<:product id:>&unhide=1&r=<:script:>?id=<:product id:>">Show
c2096d67
TC
17 product</a> |
18<a href="<:script:>?id=<:article id:>&amp;_t=groups">Manage access</a> |
19<:eif Product:><:or UserCan:><:eif UserCan:><:ifProduct listed:><:or:> Hidden<:eif:><:eif
759c295d
TC
20 New:></p>
21 <h2>Product Details</h2>
22<:ifNew:><:or:><:if Or [iadminuser_count] [iadmingroup_count]:>
abf5bbc6
TC
23 <form action="/cgi-bin/admin/adminusers.pl">
24 <input type=hidden name=id value="<: article id:>">
25 <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
26 <tr>
27 <td>
28 <table cellpadding="6" cellspacing="1" border="0" width="100%">
29 <tr>
30 <th nowrap>
31
32 <font size=2>Manage access:</font>
33 </th>
34 <td bgcolor="#FFFFFF">
35 <select name=adminid>
08123550
TC
36<:iterator begin adminusers:>
37<option value=<:iadminuser id:>>User <:iadminuser logon:>
38<:iterator end adminusers:>
39<:iterator begin admingroups:>
40<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
41<:iterator end admingroups:>
abf5bbc6
TC
42 </select>
43 <input type=submit name="a_showobjectart" value="Manage">
44 </td>
45 <td bgcolor="#FFFFFF"><:help access manage:>
46 </td>
47 </tr>
48 </table>
49 </td>
50 </tr>
51 </table>
52 </form>
53<br>
759c295d 54<:or Or:><:eif Or:><:eif:>
12b42a0b
TC
55<form action="<:script:>" enctype="multipart/form-data" method="post">
56 <input type="hidden" name="lastModified" value="<: old lastModified article lastModified :>" />
57 <input type="hidden" name="type" value="Product" />
58 <input type="hidden" name="id" value="<:product id:>" />
35c0719f 59 <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
5bc24704
TC
60 <tr>
61 <td>
27feb834 62 <table border=0 cellpadding="6" cellspacing="1" width="100%">
759c295d 63 <tr>
27feb834 64 <th align="left" bgcolor="#FFFFFF">Catalog:</th>
caa7299c 65 <td bgcolor="#FFFFFF">
abf5bbc6 66<:ifFieldPerm parentid:><select name="parentid"><:list:></select><:or:><:parent title:> (<:parent id:>)<:eif:></td>
429e9103
TC
67 <td nowrap bgcolor="#FFFFFF"><:help product catalog:> <:error_img
68 parentid:></td>
759c295d
TC
69 </tr>
70 <tr>
71 <th align="left" bgcolor="#FFFFFF">Title*:</th>
deae2a52 72 <td bgcolor="#FFFFFF"><:ifFieldPerm title:><input type="text" name="title" value="<:old title default title:>" size="60"><:or:><:product title:><:eif:> </td>
331fd099 73 <td nowrap bgcolor="#FFFFFF"><:help product title:> <:error_img title:></td>
5bc24704 74 </tr>
ca9aa2bf 75 <tr>
759c295d 76 <th nowrap align="left" bgcolor="#FFFFFF">Summary*:</th>
deae2a52 77 <td nowrap bgcolor="#FFFFFF"><:ifFieldPerm summary:><input type="text" name="summary" value="<:old summary default summary:>" size=60><:or:><:product summary:><:eif:> </td>
759c295d
TC
78 <td nowrap bgcolor="#FFFFFF"><:help product summary:> <:error_img
79 summary:></td>
ca9aa2bf 80 </tr>
27feb834 81 <tr>
35c0719f 82 <th align="left" bgcolor="#FFFFFF" valign="top"> Body:</th>
27feb834 83 <td bgcolor="#FFFFFF">
deae2a52 84 <:ifFieldPerm body:><textarea name=body rows=15 cols=60 wrap=virtual><:old body default body:></textarea><:or:><:bodytext product body:><:eif:>
5bc24704 85 </td>
429e9103
TC
86 <td nowrap bgcolor="#FFFFFF" valign="top"><:help body body:> <:error_img
87 body:></td>
759c295d
TC
88 </tr>
89 <tr>
90 <th nowrap align="left" bgcolor="#FFFFFF">Template:</th>
91 <td nowrap bgcolor="#FFFFFF"><:ifFieldPerm template:><:templates:><:or:><:product template:><:eif:></td>
429e9103
TC
92 <td nowrap bgcolor="#FFFFFF"><:help product template:> <:error_img
93 template:></td>
759c295d
TC
94 </tr>
95 <tr>
96 <th nowrap bgcolor="#FFFFFF" align="left">List article:</th>
97 <td bgcolor="#FFFFFF" width="100%"> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
429e9103 98 <td bgcolor="#FFFFFF"><:help edit listed:> <:error_img listed:></td>
759c295d 99 </tr>
429e9103 100 <tr>
759c295d
TC
101 <th nowrap bgcolor="#FFFFFF" align="left">Flags:</th>
102 <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:>
103 <input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:>
104 <:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:>
cc9019d1 105 <:eif FieldPerm:><:flag desc:><:iterator separator flags:><br /><:iterator end flags:></td>
429e9103 106 <td bgcolor="#FFFFFF"><:help edit flags:> <:error_img flags:></td>
5bc24704 107 </tr>
9604a90c
TC
108 <tr>
109 <th nowrap="nowrap" align="left" bgcolor="#FFFFFF">Page title:</th>
110 <td width="100%" bgcolor="#FFFFFF">
111 <:ifFieldPerm pageTitle:><input type="text" name="pageTitle" value='<:old pageTitle article pageTitle:>' size="60" maxlength="255" tabindex="7" /> (alternate title)<:or:><:article pageTitle:><:eif:>
112 </td>
113 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit pageTitle:> <:error_img pageTitle:></td>
114 </tr>
115 <tr>
116 <th nowrap="nowrap" align="left" bgcolor="#FFFFFF">Author name:</th>
117 <td width="100%" bgcolor="#FFFFFF" >
118 <:if FieldPerm author:><input type="text" name="author" value='<:ifCfg editor auto_author:><:old author adminuser name:><:or:><:old author:><:eif:>' size="40" maxlength="255" tabindex="7" /><:or FieldPerm:><:article author:><:eif FieldPerm:>
119 </td>
120 <td nowrap="nowrap" bgcolor="#FFFFFF" ><:help edit author:> <:error_img author:></td>
121 </tr>
5bc24704 122 <tr>
27feb834 123 <th nowrap align="left" bgcolor="#FFFFFF">Lead time:</th>
5bc24704 124 <td nowrap bgcolor="#FFFFFF">
759c295d 125 <:ifFieldPerm leadTime:>
deae2a52 126 <input type="text" name="leadTime" value="<:old leadTime default leadTime:>" size=5><:or:><:product leadTime:><:eif:>
5bc24704 127 days</td>
429e9103
TC
128 <td nowrap bgcolor="#FFFFFF"><:help product leadtime:> <:error_img
129 leadTime:></td>
5bc24704
TC
130 </tr>
131 <tr>
81f3292d 132 <th align="left" bgcolor="#FFFFFF"><:cfg "product fields" retailPrice "Retail price":>:</th>
5bc24704 133 <td bgcolor="#FFFFFF">$
deae2a52 134 <:ifFieldPerm retailPrice:><input type="text" name="retailPrice" value="<:old retailPrice money default retailPrice:>" size=7>
759c295d
TC
135 (0.00)<:or:><:money product retailPrice:><:eif:> </td>
136 <td nowrap bgcolor="#FFFFFF"><:help product retail:> <:error_img retailPrice:></td>
5bc24704
TC
137 </tr>
138 <tr>
27feb834 139 <th align="left" bgcolor="#FFFFFF">Wholesale price:</th>
5bc24704 140 <td bgcolor="#FFFFFF">$
deae2a52 141 <:ifFieldPerm wholesalePrice:><input type="text" name="wholesalePrice" value="<:old wholesalePrice money default wholesalePrice:>" size=7>
abf5bbc6 142 (0.00)<:or:><:money product wholesalePrice:><:eif:></td>
759c295d 143 <td nowrap bgcolor="#FFFFFF"><:help product wholesale:> <:error_img wholesalePrice:></td>
5bc24704
TC
144 </tr>
145 <tr>
27feb834 146 <th align="left" bgcolor="#FFFFFF">GST:</th>
5bc24704 147 <td bgcolor="#FFFFFF">$
deae2a52 148 <:ifFieldPerm gst:><input type="text" name="gst" value="<:old gst money default gst:>" size=7>
abf5bbc6 149 (0.00)<:or:><:money product gst:><:eif:></td>
759c295d 150 <td nowrap bgcolor="#FFFFFF"><:help product gst:> <:error_img gst:></td>
5bc24704
TC
151 </tr>
152 <tr>
27feb834 153 <th align="left" bgcolor="#FFFFFF">Release date:</th>
5bc24704 154 <td bgcolor="#FFFFFF">
deae2a52 155 <:ifFieldPerm release:><input type="text" name="release" value="<:old release date "%d/%m/%Y" default release:>" size=11>
abf5bbc6 156 (dd/mm/yyyy)<:or:><:date "%d/%m/%Y" product release:><:eif:></td>
429e9103
TC
157 <td nowrap bgcolor="#FFFFFF"><:help product release:> <:error_img
158 release:></td>
5bc24704
TC
159 </tr>
160 <tr>
27feb834 161 <th align="left" bgcolor="#FFFFFF">Expiry date:</th>
5bc24704 162 <td bgcolor="#FFFFFF">
deae2a52 163 <:ifFieldPerm expire:><input type="text" name="expire" value="<:old expire date "%d/%m/%Y" default expire:>" size=11>
abf5bbc6 164 (dd/mm/yyyy)<:or:><:date "%d/%m/%Y" product expire:><:eif:></td>
429e9103
TC
165 <td nowrap bgcolor="#FFFFFF"><:help product expire:> <:error_img
166 expire:></td>
5bc24704 167 </tr>
26094672
TC
168 <tr>
169 <th nowrap align="left" bgcolor="#FFFFFF">Summary length:</th>
170 <td nowrap bgcolor="#FFFFFF">
deae2a52 171 <:ifFieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<:old summaryLength default summaryLength:>"><:or:><:product summaryLength:><:eif:>
26094672 172 </td>
429e9103
TC
173 <td nowrap bgcolor="#FFFFFF"><:help product summary:> <:error_img
174 summaryLength:></td>
26094672
TC
175 </tr>
176 <tr>
177 <th nowrap align="left" bgcolor="#FFFFFF">Display threshold:</th>
178 <td nowrap bgcolor="#FFFFFF">
deae2a52 179 <:ifFieldPerm threshold:><input type="text" name="threshold" size=10 maxlength=10 value="<:old threshold default threshold:>"><:or:><:product threshold:><:eif:>
35c0719f 180 </td>
429e9103
TC
181 <td nowrap bgcolor="#FFFFFF"><:help product threshold:> <:error_img
182 threshold:></td>
26094672 183 </tr>
c2096d67
TC
184 <tr>
185 <th bgcolor="#FFFFFF" nowrap align="left"> Keywords: </th>
186 <td bgcolor="#FFFFFF" width="100%">
187 <:ifFieldPerm keyword:><input type="text" name="keyword" maxlength="255" size="60" value="<: old keyword default keyword :>"><:or:><: article threshold :><:eif:>
188 (comma separated) </td>
189 <td nowrap bgcolor="#FFFFFF"><:help catalog keywords:> <:error_img keyword:></td>
190 </tr>
191 <tr>
192 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Always Dynamic:</th>
193 <td bgcolor="#FFFFFF" width="100%">
194 <:ifFieldPerm force_dynamic:><input type="hidden" name="save_force_dynamic" value="1" /><input type="checkbox" name="force_dynamic" value="1" <:if Article force_dynamic :>checked="checked"<:or Article:><:eif Article:> />
195 <:or:><:ifArticle force_dynamic :>Yes<:or Article:>No<:eif Article:><:eif:></td>
196 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit keywords:> <:error_img keyword:></td>
197 </tr>
a11a0d7c 198 <tr>
27feb834 199 <th align="left" bgcolor="#FFFFFF">Options:</th>
a11a0d7c 200 <td bgcolor="#FFFFFF">
deae2a52 201 <:ifFieldPerm options:><input type="text" name="options" value="<:old options default options:>" size=30>
abf5bbc6 202 (<:alloptions:>)<:or:><:product options:><:eif:> </td>
429e9103 203 <td bgcolor="#FFFFFF"><:help product options:> <:error_img options:></td>
a11a0d7c 204 </tr>
d64413ee 205<:include admin/product_custom.tmpl optional:>
27feb834 206 <tr>
35c0719f 207 <th nowrap align="left" bgcolor="#FFFFFF" valign="top">Thumbnail image:</th>
27feb834 208 <td nowrap bgcolor="#FFFFFF">
abf5bbc6 209 <:ifFieldPerm thumbImage:><input type="file" name="thumbnail"><:or:><:eif:>
35c0719f 210 <:ifProduct thumbImage:><img src="/images/<:product thumbImage:>">
abf5bbc6
TC
211 <:if FieldPerm thumbImage:><input type=checkbox name="remove_thumb">
212 Remove<:or FieldPerm:><:eif FieldPerm:><:or:><:eif:> </td>
429e9103
TC
213 <td nowrap bgcolor="#FFFFFF" valign="top"><:help product thumb:> <:error_img
214 thumbImage:></td>
5bc24704 215 </tr>
759c295d 216 <:if Article id:>
27feb834 217 <tr>
35c0719f 218 <th nowrap align="left" bgcolor="#FFFFFF" valign="top"><a name="files"></a>Files:</th>
caa7299c 219 <td nowrap bgcolor="#FFFFFF"> <:if Files:>
27feb834 220 <table cellpadding="0" cellspacing="0" border="0" bgcolor="#333333">
35c0719f 221 <tr>
27feb834
TC
222 <td>
223 <table cellpadding="5" cellspacing="1" border="0">
224 <tr bgcolor="#FFFFFF">
225 <th>Filename</th>
226 <th>Size</th>
227 <th>Type</th>
35c0719f
TC
228 <th>D/l</th>
229 <th>Pay</th>
230 <th>User</th>
27feb834
TC
231 </tr>
232 <:iterator begin files:>
233 <tr bgcolor="#FFFFFF">
234 <td><:file displayName:></td>
35c0719f 235 <td align="center"><:kb file sizeInBytes:></td>
27feb834
TC
236 <td><:file contentType:></td>
237 <td align=center><:ifFile download:>Yes<:or:>No<:eif:></td>
35c0719f
TC
238 <td align=center><:ifFile forSale:>Yes<:or:>No<:eif:></td>
239 <td align=center><:ifFile requireUser:>Yes<:or:>No<:eif:></td>
27feb834
TC
240 </tr>
241 <:iterator end files:>
242 </table>
243 </td>
244 </tr>
caa7299c
TC
245 </table>
246 <p><a href="<:script:>?filelist=1&id=<:article id:>"><b>Manage Files</b></a>
247 </p>
248 <:or Files:>
249 <p>No files are attached to this article. <a href="<:script:>?filelist=1&id=<:article id:>"><b>Manage Files</b></a></p><:eif Files:>
edc5d096 250 </td>
caa7299c 251 <td nowrap bgcolor="#FFFFFF" valign="top"><:help product
429e9103 252 files:> <:error_img files:></td>
edc5d096 253 </tr>
26094672 254 <tr>
15fb10f2 255 <th valign="top" nowrap bgcolor="#FFFFFF" align="left"> Images:
35c0719f 256 </th>
caa7299c 257 <td align="center" bgcolor="#FFFFFF"> <:if Images:> <:iterator begin
55753022 258 images:> <img src="/images/<: image image :>" alt="<:image alt :>" width=
26094672
TC
259 <:image width:> height=<:image height:>> <:iterator separator images:>
260 <hr noshade size="1">
15fb10f2
TC
261 <: iterator end images :>
262 <p align="left"><a href="<:script:>?id=<:article id:>&showimages=1"><b>Manage Images</b></a></p>
263 <:or Images:><p align="left">No images are attached to this article. <a href="<:script:>?id=<:article id:>&showimages=1"><b>Manage Images</b></a></p>
55753022 264 <:eif Images:>
35c0719f 265 </td>
429e9103
TC
266 <td valign="top" bgcolor="#FFFFFF"><:help product images:> <:error_img
267 images:></td>
35c0719f 268 </tr>
759c295d 269 <:or Article:><:eif Article:>
d7538448 270 <tr>
0ec4ac8a
TC
271 <th nowrap align="left" bgcolor="#FFFFFF">Purchase subscribes to:</th>
272 <td nowrap bgcolor="#FFFFFF">
273 <select name="subscription_id">
274 <option value="-1"<:ifEq [old subscription_id] "-1":> selected="selected"<:or:><:eif:>>(nothing)</option>
275<:iterator begin subscriptions:>
276 <option value="<:subscription subscription_id:>"<:ifEq [old subscription_id] [subscription subscription_id]:> selected="selected"<:or:><:eif:>><:subscription title:></option>
277<:iterator end subscriptions:>
d7538448 278 </select> for <input type="text" name="subscription_period" value="<:ifEq [old subscription_period] "":><:default subscription_period:><:or:><:old subscription_period:><:eif:>" size="3" /><:error_img subscription_period:> months.
0ec4ac8a
TC
279 </td>
280 <td nowrap bgcolor="#FFFFFF"><:help product subscription_id:></td>
281 </tr>
282 <tr>
283 <th nowrap align="left" bgcolor="#FFFFFF">Can be used to:</th>
284 <td nowrap bgcolor="#FFFFFF">
285 <select name="subscription_usage">
286 <option value="3"<:ifEq [old subscription_usage] "3":> selected="selected"<:or:><:eif:>>Start or renew a subscription</option>
287 <option value="1"<:ifEq [old subscription_usage] "1":> selected="selected"<:or:><:eif:>>Start a subscription only</option>
288 <option value="2"<:ifEq [old subscription_usage] "2":> selected="selected"<:or:><:eif:>>Renew a subscription only</option>
289 </select>
290 </td>
291 <td nowrap bgcolor="#FFFFFF"><:help product subscription_usage:></td>
292 </tr>
293 <tr>
294 <th nowrap align="left" bgcolor="#FFFFFF">User must be subscribed to:</th>
295 <td nowrap bgcolor="#FFFFFF">
296 <select name="subscription_required">
297 <option value="-1"<:ifEq [old subscription_required] "-1":> selected="selected"<:or:><:eif:>>(nothing)</option>
298<:iterator begin subscriptions:>
299 <option value="<:subscription subscription_id:>"<:ifEq [old subscription_required] [subscription subscription_id]:> selected="selected"<:or:><:eif:>><:subscription title:></option>
300<:iterator end subscriptions:>
301 </select> to purchase this product
302 </td>
303 <td nowrap bgcolor="#FFFFFF"><:help product subscription_id:></td>
d7538448 304 </tr>
5bc24704
TC
305 </table>
306 </td>
307 </tr>
308 </table>
759c295d
TC
309 <p><font size="-1">*These fields cannot be modified once this product has been
310 included in an order.</font></p>
311 <:if UserCan edit_save:article:>
312 <p>
429e9103 313 <:ifNew:><input type=submit name="save" value="Add Product"><:or:><input type=submit name="save" value="Update Product"><:eif:>
abf5bbc6 314 </p><:or UserCan:><:eif UserCan:>
5bc24704
TC
315</form>
316
7063727a 317<p><font size="-1">BSE Release <:release:></font></p>
5bc24704
TC
318</body>
319</html>