Koha/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc
Jonathan Druart b286868ec9 Bug 17537: Fix valid-templates.t for some include files
3 include files do not pass the template validation tests:
 - koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc
 - koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
 - koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc

This is because they process a block which has not been declared before.
As they are include files, they cannot stand on their own.
We could have added them to the exclude file list of xt/author/valid-templates.t
but I think it's better to keep them into the validation loop.

Test plan:
  prove xt/author/valid-templates.t
should return green
And the library dropdown list should be correctly populated on the pages these files are included
(opac-topissues for instance)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-04 11:03:48 +00:00

57 lines
2.2 KiB
HTML

[% PROCESS 'html_helpers.inc' %]
<ol>
<li>
[% IF field %]
<span class="label">Name: </span>
[% field.name %]
<input type="hidden" name="name" value="[% field.name %]">
[% ELSE %]
<label class="required" for="name">Name: </label>
<input type="text" name="name" id="name" class="required" required="required" />
<span class="required">Required</span>
[% END %]
</li>
<li>
<label class="required" for="label">Label: </label>
[% IF field %]
<input type="text" name="label" id="label" value="[% field.label %]" class="required" required="required" />
[% ELSE %]
<input type="text" name="label" id="label" class="required" required="required" />
[% END %]
<span class="required">Required</span>
</li>
<li>
<label for="tagfield" required="required">MARC field: </label>
<select id="tagfield" name="tagfield" class="required" required="required">
[% FOREACH tagfield IN ['001'..'999'] %]
[% IF field && field.tagfield == tagfield %]
<option value="[% tagfield %]" selected="selected">[% tagfield %]</option>
[% ELSE %]
<option value="[% tagfield %]">[% tagfield %]</option>
[% END %]
[% END %]
</select>
<span class="required">Required</span>
</li>
<li>
<label for="tagsubfield">MARC subfield: </label>
<select id="tagsubfield" name="tagsubfield">
[% codes = [''] %]
[% codes = codes.merge([0..9], ['a'..'z']) %]
[% FOREACH tagsubfield IN codes %]
[% IF field && field.tagsubfield == tagsubfield %]
<option value="[% tagsubfield %]" selected="selected">[% tagsubfield %]</option>
[% ELSE %]
<option value="[% tagsubfield %]">[% tagsubfield %]</option>
[% END %]
[% END %]
</select>
</li>
<li>
<label for="authorised_values_category">Authorised values category: </label>
<select id="authorised_values_category" name="authorised_values_category">
<option value="">- None -</option>
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => field.authorised_values_category ) %]
</select>
</li>
</ol>