Lines 17-72
Link Here
|
17 |
[% END %] |
17 |
[% END %] |
18 |
</title> |
18 |
</title> |
19 |
[% INCLUDE 'doc-head-close.inc' %] |
19 |
[% INCLUDE 'doc-head-close.inc' %] |
20 |
|
|
|
21 |
<script type="text/javascript"> |
22 |
//<![CDATA[ |
23 |
|
24 |
function CheckSourceForm(f) { |
25 |
var _alertString=""; |
26 |
var alertString2; |
27 |
if (f.class_source.value.length==0) { |
28 |
_alertString += "\n- " + _("Classification source code missing"); |
29 |
} |
30 |
if (f.sort_rule.value.length==0) { |
31 |
_alertString += "\n- " + _("Filing rule code missing"); |
32 |
} |
33 |
if (f.description.value.length==0) { |
34 |
_alertString += "\n- " + _("Description missing"); |
35 |
} |
36 |
if (_alertString.length==0) { |
37 |
document.Aform.submit(); |
38 |
} else { |
39 |
alertString2 = _("Form not submitted because of the following problem(s)"); |
40 |
alertString2 += "\n------------------------------------------------------------------------------------\n"; |
41 |
alertString2 += _alertString; |
42 |
alert(alertString2); |
43 |
} |
44 |
} |
45 |
|
46 |
function CheckRuleForm(f) { |
47 |
var _alertString=""; |
48 |
var alertString2; |
49 |
if (f.sort_rule.value.length==0) { |
50 |
_alertString += "\n- " + _("Filing rule code missing"); |
51 |
} |
52 |
if (f.description.value.length==0) { |
53 |
_alertString += "\n- " + _("Description missing"); |
54 |
} |
55 |
if (f.sort_routine.value.length==0) { |
56 |
_alertString += "\n- " + _("Sort routine missing"); |
57 |
} |
58 |
if (_alertString.length==0) { |
59 |
document.Aform.submit(); |
60 |
} else { |
61 |
alertString2 = _("Form not submitted because of the following problem(s)"); |
62 |
alertString2 += "\n------------------------------------------------------------------------------------\n"; |
63 |
alertString2 += _alertString; |
64 |
alert(alertString2); |
65 |
} |
66 |
} |
67 |
//]]> |
68 |
</script> |
69 |
</head> |
20 |
</head> |
|
|
21 |
|
70 |
<body id="admin_classsources" class="admin"> |
22 |
<body id="admin_classsources" class="admin"> |
71 |
[% INCLUDE 'header.inc' %] |
23 |
[% INCLUDE 'header.inc' %] |
72 |
[% INCLUDE 'cat-search.inc' %] |
24 |
[% INCLUDE 'cat-search.inc' %] |
Lines 101-107
function CheckRuleForm(f) {
Link Here
|
101 |
[% ELSE %] |
53 |
[% ELSE %] |
102 |
<h2>Add classification source</h2> |
54 |
<h2>Add classification source</h2> |
103 |
[% END %] |
55 |
[% END %] |
104 |
<form action="[% script_name %]" name="Aform" method="post"> |
56 |
<form action="[% script_name %]" name="Aform" class="validated" method="post"> |
105 |
<input type="hidden" name="op" value="[% confirm_op %]" /> |
57 |
<input type="hidden" name="op" value="[% confirm_op %]" /> |
106 |
<fieldset class="rows"> |
58 |
<fieldset class="rows"> |
107 |
<ol> |
59 |
<ol> |
Lines 111-130
function CheckRuleForm(f) {
Link Here
|
111 |
<input type="hidden" name="class_source" value="[% class_source %]" /> |
63 |
<input type="hidden" name="class_source" value="[% class_source %]" /> |
112 |
[% class_source %] |
64 |
[% class_source %] |
113 |
[% ELSE %] |
65 |
[% ELSE %] |
114 |
<label for="class_source">Classification source code: </label> |
66 |
<label class="required" for="class_source">Classification source code: </label> |
115 |
<input type="text" id="class_source" name="class_source" size="10" maxlength="10" /> |
67 |
<input class="required" required="required" type="text" id="class_source" name="class_source" size="10" maxlength="10" /> |
|
|
68 |
<span class="required">Required</span> |
116 |
[% END %] |
69 |
[% END %] |
117 |
</li> |
70 |
</li> |
118 |
<li><label for="description">Description: </label> |
71 |
<li><label class="required" for="description">Description: </label> |
119 |
<input type="text" id="description" name="description" size="50" maxlength="250" |
72 |
<input class="required" required="required" type="text" id="description" name="description" size="50" maxlength="250" value="[% description |html %]" /> |
120 |
value="[% description |html %]" /> |
73 |
<span class="required">Required</span> |
121 |
</li> |
74 |
</li> |
122 |
<li><label for="used">Source in use?</label> |
75 |
<li><label for="used">Source in use?</label> |
123 |
[% IF ( used ) %]<input type="checkbox" id="used" name="used" value="used" checked="checked" />[% ELSE %] |
76 |
[% IF ( used ) %]<input type="checkbox" id="used" name="used" value="used" checked="checked" />[% ELSE %] |
124 |
<input type="checkbox" id="used" name="used" value="used" />[% END %] |
77 |
<input type="checkbox" id="used" name="used" value="used" />[% END %] |
125 |
</li> |
78 |
</li> |
126 |
<li><label for="sort_rule">Filing rule: </label> |
79 |
<li><label class="required" for="sort_rule">Filing rule: </label> |
127 |
<select id="sort_rule" name="sort_rule"> |
80 |
<select class="required" required="required" id="sort_rule" name="sort_rule"> |
128 |
[% FOREACH rules_dropdow IN rules_dropdown %] |
81 |
[% FOREACH rules_dropdow IN rules_dropdown %] |
129 |
[% IF ( rules_dropdow.selected ) %] |
82 |
[% IF ( rules_dropdow.selected ) %] |
130 |
<option value="[% rules_dropdow.rule %]" selected="selected">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option> |
83 |
<option value="[% rules_dropdow.rule %]" selected="selected">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option> |
Lines 133-143
function CheckRuleForm(f) {
Link Here
|
133 |
[% END %] |
86 |
[% END %] |
134 |
[% END %] |
87 |
[% END %] |
135 |
</select> |
88 |
</select> |
|
|
89 |
<span class="required">Required</span> |
136 |
</li> |
90 |
</li> |
137 |
</ol> |
91 |
</ol> |
138 |
</fieldset> |
92 |
</fieldset> |
139 |
<fieldset class="action"> |
93 |
<fieldset class="action"> |
140 |
<input type="button" value="Save" onclick="CheckSourceForm(this.form)" /> |
94 |
<input type="submit" value="Save" /> |
141 |
<a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a> |
95 |
<a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a> |
142 |
</fieldset> |
96 |
</fieldset> |
143 |
</form> |
97 |
</form> |
Lines 149-155
function CheckRuleForm(f) {
Link Here
|
149 |
[% ELSE %] |
103 |
[% ELSE %] |
150 |
<h2>Add filing rule</h2> |
104 |
<h2>Add filing rule</h2> |
151 |
[% END %] |
105 |
[% END %] |
152 |
<form action="[% script_name %]" name="Aform" method="post"> |
106 |
<form action="[% script_name %]" name="Aform" class="validated" method="post"> |
153 |
<input type="hidden" name="op" value="[% confirm_op %]" /> |
107 |
<input type="hidden" name="op" value="[% confirm_op %]" /> |
154 |
<fieldset class="rows"> |
108 |
<fieldset class="rows"> |
155 |
<ol> |
109 |
<ol> |
Lines 159-174
function CheckRuleForm(f) {
Link Here
|
159 |
<input type="hidden" name="sort_rule" value="[% sort_rule %]" /> |
113 |
<input type="hidden" name="sort_rule" value="[% sort_rule %]" /> |
160 |
[% sort_rule %] |
114 |
[% sort_rule %] |
161 |
[% ELSE %] |
115 |
[% ELSE %] |
162 |
<label for="sort_rule">Filing rule code: </label> |
116 |
<label for="sort_rule" class="required">Filing rule code: </label> |
163 |
<input type="text" id="sort_rule" name="sort_rule" size="10" maxlength="10" /> |
117 |
<input class="required" required="required" type="text" id="sort_rule" name="sort_rule" size="10" maxlength="10" /> |
|
|
118 |
<span class="required">Required</span> |
164 |
[% END %] |
119 |
[% END %] |
165 |
</li> |
120 |
</li> |
166 |
<li><label for="description">Description: </label> |
121 |
<li><label for="description" class="required">Description: </label> |
167 |
<input type="text" id="description" name="description" size="50" maxlength="250" |
122 |
<input class="required" required="required" type="text" id="description" name="description" size="50" maxlength="250" value="[% description |html %]" /> |
168 |
value="[% description |html %]" /> |
123 |
<span class="required">Required</span> |
169 |
</li> |
124 |
</li> |
170 |
<li><label for="sort_routine">Filing routine: </label> |
125 |
<li><label for="sort_routine" class="required">Filing routine: </label> |
171 |
<select id="sort_routine" name="sort_routine"> |
126 |
<select class="required" required="required" id="sort_routine" name="sort_routine"> |
172 |
[% FOREACH routines_dropdow IN routines_dropdown %] |
127 |
[% FOREACH routines_dropdow IN routines_dropdown %] |
173 |
[% IF ( routines_dropdow.selected ) %] |
128 |
[% IF ( routines_dropdow.selected ) %] |
174 |
<option value="[% routines_dropdow.routine %]" selected="selected">[% routines_dropdow.routine %]</option> |
129 |
<option value="[% routines_dropdow.routine %]" selected="selected">[% routines_dropdow.routine %]</option> |
Lines 177-187
function CheckRuleForm(f) {
Link Here
|
177 |
[% END %] |
132 |
[% END %] |
178 |
[% END %] |
133 |
[% END %] |
179 |
</select> |
134 |
</select> |
|
|
135 |
<span class="required">Required</span> |
180 |
</li> |
136 |
</li> |
181 |
</ol> |
137 |
</ol> |
182 |
</fieldset> |
138 |
</fieldset> |
183 |
<fieldset class="action"> |
139 |
<fieldset class="action"> |
184 |
<input type="button" value="Save" onclick="CheckRuleForm(this.form)" /> |
140 |
<input type="submit" value="Save" /> |
185 |
<a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a> |
141 |
<a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a> |
186 |
</fieldset> |
142 |
</fieldset> |
187 |
</form> |
143 |
</form> |
188 |
- |
|
|