[% IF ( else ) %]MARC frameworks[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
-function Check(f) {
- var _alertString="";
- var alertString2;
- if (f.tagfield.value.length==0) {
- _alertString += "\n- " + _("tag number missing");
- }
- if (_alertString.length==0) {
- document.Aform.submit();
- } else {
- alertString2 = _("Form not submitted because of the following problem(s)");
- alertString2 += "\n------------------------------------------------------------------------------------\n";
- alertString2 += _alertString;
- alert(alertString2);
- }
-}
$(document).ready(function() {
$("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
],
- "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
- "iDisplayLength": 20,
"sPaginationType": "four_button"
}));
});
[% IF ( add_form ) %]
- <form action="[% script_name %]" name="Aform" method="post">
+ <form action="[% script_name %]" name="Aform" method="post" class="validated">
<fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action %][% END %]</legend> <input type="hidden" name="op" value="add_validate" />
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
- <ol> <li><label for="tagfield">Tag: </label><input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" /></li>
+ <ol>
+ <li>
+ [% IF ( heading_modify_tag_p ) %]
+ <input type="hidden" name="tagfield" value="[% searchfield %]" />
+ <span class="label">Tag:</span>
+ [% searchfield %]
+ [% ELSE %]
+ <label for="tagfield" class="required">Tag: </label>
+ <input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" />
+ <span class="required">Required</span>
+ [% END %]
+ </li>
<li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
<li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
- <li><label for="repeatable">Repeatable: </label>[% repeatable %]</li>
- <li><label for="mandatory">Mandatory: </label>[% mandatory %]</li>
- <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
+ <li><label for="repeatable">Repeatable: </label>
+ [% IF ( repeatable ) %]
+ <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
+ [% ELSE %]
+ <input type="checkbox" name="repeatable" id="repeatable" value="1" />
+ [% END %]
+ </li>
+ <li><label for="mandatory">Mandatory: </label>
+ [% IF ( mandatory ) %]
+ <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
+ [% ELSE %]
+ <input type="checkbox" name="mandatory" id="mandatory" value="1" />
+ [% END %]
+ </li>
+ <li><label for="authorised_value">Authorized value: </label>
+ <select name="authorised_value" id="authorised_value" size="1">
+ [% FOREACH value IN authorised_value.values %]
+ [% IF ( value == authorised_value.default ) %]
+ <option value="[% value %]" selected="selected">[% value %]</option>
+ [% ELSE %]
+ <option value="[% value %]">[% value %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ (if you select a value here, the indicators will be limited to the authorized value list)</li>
</ol></fieldset>
<fieldset class="action">
- <input type="submit" value="Save Changes" onclick="Check(this.form)" />
+ <input type="submit" value="Save changes" />
<a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
</fieldset>
</form>
<tbody>
[% IF ( select_display ) %]
[% FOREACH loo IN loop %]
- [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
+ <tr>
<td>[% loo.tagfield %]</td>
<td>[% loo.liblibrarian %]</td>
<td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>