-id=>'authorised_value',
-values=> \@authorised_values,
-size=>1,
- -tabindex=>'',
-multiple=>0,
-default => $data->{'authorised_value'},
);
if ($searchfield) {
- $template->param(action => "Modify tag",
- searchfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$searchfield\" />$searchfield");
+ $template->param('searchfield' => $searchfield);
$template->param('heading_modify_tag_p' => 1);
} else {
- $template->param(action => "Add tag",
- searchfield => "<input type=\"text\" name=\"tagfield\" size=\"5\" maxlength=\"3\" />");
$template->param('heading_add_tag_p' => 1);
}
$template->param('use_heading_flags_p' => 1);
"sPaginationType": "four_button"
}));
});
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- function isNotNull(f,noalert) {
- if (f.value.length ==0) {
-return false;
- }
- return true;
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- function isNum(v,maybenull) {
- var n = new Number(v.value);
- if (isNaN(n)) {
- return false;
- }
- if (maybenull==0 && v.value=='') {
- return false;
- }
- return true;
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- function Check(f) {
- var ok=1;
- 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);
- }
- }
- //]]>
+//]]>
</script>
</head>
<body id="admin_auth_tag_structure" class="admin">
[% IF ( add_form ) %]
<h2>
- [% IF ( use_heading_flags_p ) %]
[% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
[% IF ( heading_add_tag_p ) %]New tag[% END %]
- [% ELSE %][% action %][% END %]
</h2>
- <form action="[% script_name %]" name="Aform" method="post">
+ <form action="[% script_name %]" name="Aform" method="post" class="validated">
<input type="hidden" name="op" value="add_validate" />
[% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
<input type="hidden" name="authtypecode" value="[% authtypecode %]" />
- <fieldset class="rows"><ol>
- <li><span class="label">Tag: </span>[% searchfield %]</li>
+ <fieldset class="rows">
+ <ol>
+ [% IF ( heading_modify_tag_p ) %]
+ <li>
+ <span class="label">Tag: </span>
+ <input type="hidden" name="tagfield" value="[% searchfield %]" />
+ [% searchfield %]
+ </li>
+ [% ELSE %]
+ <li><label for="tagfield" class="required">Tag: </label><input type="text" id="tagfield" name="tagfield" size="5" maxlength="3" required="required" class="required" /></li>
+ [% END %]
+
<li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
<li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
<li><label for="repeatable">Repeatable: </label>
</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>
</ol></fieldset>
- <p><input type="button" value="Submit" class="button" onclick="Check(this.form)" /></p>
+ <fieldset class="action">
+ <input type="submit" value="Submit" />
+ <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]" class="cancel">Cancel</a>
+ </fieldset>
</form>
[% END %]