Bug 32188: Only show template controls above item form if templates have been defined
The new item templates above the item edit form should only show, when at least one template has been defined. Test Plan: 1) Browse to the item editor 2) Delete all templates 3) Note the template toolbar is displayed 4) Apply this patch 5) Reload the page, note the toolbar is not displayed 6) Create a new template, note the toolbar is now displayed 7) Delete that template, note the toolbar is no longer displayed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8bbfe0cc94
commit
0441b5ce46
1 changed files with 48 additions and 47 deletions
|
@ -163,6 +163,7 @@
|
|||
<h2 id="edititem">Edit item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]</h2>
|
||||
[% END %]
|
||||
|
||||
[% IF item_templates.owned.count || item_templates.shared.count %]
|
||||
<div id="item-template-toolbar" class="btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<select name="template_id" id="template_id" class="select2" style="width: 20em">
|
||||
|
@ -215,8 +216,8 @@
|
|||
<div class="btn-group">
|
||||
<button type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash"></i> Delete template</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
<fieldset class="rows">
|
||||
[% PROCESS subfields_for_item subfields => subfields %]
|
||||
|
|
Loading…
Reference in a new issue