Lines 279-313
Link Here
|
279 |
</span> |
279 |
</span> |
280 |
<fieldset id="save_as_template_span"> |
280 |
<fieldset id="save_as_template_span"> |
281 |
<legend>Save template</legend> |
281 |
<legend>Save template</legend> |
282 |
<select name="replace_template_id" id="replace_template_id" class="select2" style="width: 20em"> |
282 |
<div class="btn-group"> |
283 |
<option value="0" selected="selected">Save as new template</option> |
283 |
<select name="replace_template_id" id="replace_template_id" class="select2" style="width: 20em"> |
284 |
<optgroup label="Update existing template"> |
284 |
<option value="0" selected="selected">Save as new template</option> |
285 |
[% FOREACH t IN item_templates.owned %] |
285 |
<optgroup label="Update existing template"> |
286 |
<option data-editor="1" data-shared="[% t.is_shared | html %]" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
286 |
[% FOREACH t IN item_templates.owned %] |
287 |
[% END %] |
287 |
<option data-editor="1" data-shared="[% t.is_shared | html %]" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
288 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates && item_templates.shared.count %] |
288 |
[% END %] |
289 |
<optgroup label="Update shared template"> |
289 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates && item_templates.shared.count %] |
290 |
[% FOREACH t IN item_templates.shared %] |
290 |
<optgroup label="Update shared template"> |
291 |
<option data-editor="1" data-shared="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
291 |
[% FOREACH t IN item_templates.shared %] |
292 |
[% END %] |
292 |
<option data-editor="1" data-shared="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
293 |
</optgroup> |
293 |
[% END %] |
294 |
[% END %] |
294 |
</optgroup> |
295 |
</optgroup> |
295 |
[% END %] |
296 |
</select> |
296 |
</optgroup> |
|
|
297 |
</select> |
298 |
</div> |
297 |
|
299 |
|
298 |
<span id="template_name_block"> |
300 |
<div class="btn-group"> |
299 |
<label for="template_name" class="required">Template name: </label> |
301 |
<span id="template_name_block"> |
300 |
<input type="text" id="template_name" name="template_name" class="required"/> |
302 |
<label for="template_name" class="required">Template name: </label> |
301 |
<span class="required">Required</span> |
303 |
<input type="text" id="template_name" name="template_name" class="required"/> |
302 |
</span> |
304 |
<span class="required">Required</span> |
|
|
305 |
</span> |
306 |
</div> |
303 |
|
307 |
|
304 |
<label for="template_is_shared"> |
308 |
<div class="btn-group"> |
305 |
<input type="checkbox" id="template_is_shared" name="template_is_shared"/> |
309 |
<label for="template_is_shared"> |
306 |
Share template |
310 |
<input type="checkbox" id="template_is_shared" name="template_is_shared"/> |
307 |
</label> |
311 |
Share template |
|
|
312 |
</label> |
313 |
</div> |
308 |
|
314 |
|
309 |
<input type="submit" id="save_as_template_submit" name="save_as_template_submit" value="Save" onclick="javascript:return CheckTemplateForm(this.form);" /> |
315 |
<div class="btn-group"> |
310 |
<a href="#" id="cancel_save_as_template" class="cancel">Cancel</a> |
316 |
<input type="submit" id="save_as_template_submit" name="save_as_template_submit" value="Save" onclick="javascript:return CheckTemplateForm(this.form);" /> |
|
|
317 |
<a href="#" id="cancel_save_as_template" class="cancel">Cancel</a> |
318 |
</div> |
311 |
</fieldset> |
319 |
</fieldset> |
312 |
|
320 |
|
313 |
[% ELSE %] |
321 |
[% ELSE %] |
314 |
- |
|
|