Lines 9-14
$(document).ready(function() {
Link Here
|
9 |
$('#branch').change(function() { |
9 |
$('#branch').change(function() { |
10 |
$('#selectlibrary').submit(); |
10 |
$('#selectlibrary').submit(); |
11 |
}); |
11 |
}); |
|
|
12 |
$(".editrule").click(function(){ |
13 |
$(this).parent().parent().find("td").each(function (i) { |
14 |
itm = $(this).text(); |
15 |
itm = itm.replace(/^\s*|\s*$/g,''); |
16 |
$("#default-circulation-rules tr:last td:eq("+i+") input").val(itm); |
17 |
$("#default-circulation-rules tr:last td:eq("+i+") select").val(itm); |
18 |
$("#default-circulation-rules tr:last td:last input").val(_("Save")); |
19 |
}); |
20 |
return false; |
21 |
}); |
12 |
}); |
22 |
}); |
13 |
//]]> |
23 |
//]]> |
14 |
</script> |
24 |
</script> |
Lines 57-67
$(document).ready(function() {
Link Here
|
57 |
</select> |
67 |
</select> |
58 |
</form> |
68 |
</form> |
59 |
<!-- TMPL_IF Name="definedbranch" --><form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="<!-- TMPL_VAR NAME="branch" -->" /> |
69 |
<!-- TMPL_IF Name="definedbranch" --><form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="<!-- TMPL_VAR NAME="branch" -->" /> |
60 |
<select name="tobranch" id="tobranch"><!-- TMPL_LOOP NAME="branchloop" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select> <input type="submit" value="Clone" /></form><!-- /TMPL_IF --></fieldset> |
70 |
<select name="tobranch" id="tobranch"><!-- TMPL_LOOP NAME="branchloop" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select> <input type="submit" value="Clone" /></form><!-- /TMPL_IF --> |
61 |
|
71 |
|
62 |
<form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> |
72 |
<form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> |
63 |
<input type="hidden" name="op" value="add" /> |
73 |
<input type="hidden" name="op" value="add" /> |
64 |
<table> |
74 |
<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/> |
|
|
75 |
<table id="default-circulation-rules"> |
65 |
<tr> |
76 |
<tr> |
66 |
<th>Patron Category</th> |
77 |
<th>Patron Category</th> |
67 |
<th>Item Type</th> |
78 |
<th>Item Type</th> |
Lines 74-80
$(document).ready(function() {
Link Here
|
74 |
<th>Renewals Allowed (count)</th> |
85 |
<th>Renewals Allowed (count)</th> |
75 |
<th>Holds Allowed (count)</th> |
86 |
<th>Holds Allowed (count)</th> |
76 |
<th>Rental Discount (%)</th> |
87 |
<th>Rental Discount (%)</th> |
77 |
<th> </th> |
88 |
<th colspan="2"> </th> |
78 |
</tr> |
89 |
</tr> |
79 |
<!-- TMPL_LOOP NAME="rules" --> |
90 |
<!-- TMPL_LOOP NAME="rules" --> |
80 |
<!-- TMPL_UNLESS NAME="__odd__" --> |
91 |
<!-- TMPL_UNLESS NAME="__odd__" --> |
Lines 108-113
$(document).ready(function() {
Link Here
|
108 |
<td><!-- TMPL_VAR NAME="renewalsallowed" --></td> |
119 |
<td><!-- TMPL_VAR NAME="renewalsallowed" --></td> |
109 |
<td><!-- TMPL_VAR NAME="reservesallowed" --></td> |
120 |
<td><!-- TMPL_VAR NAME="reservesallowed" --></td> |
110 |
<td><!-- TMPL_VAR NAME="rentaldiscount" --></td> |
121 |
<td><!-- TMPL_VAR NAME="rentaldiscount" --></td> |
|
|
122 |
<td><a href="#" class="editrule">Edit</a></td> |
111 |
<td> |
123 |
<td> |
112 |
<a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=<!-- TMPL_VAR NAME="itemtype" -->&categorycode=<!-- TMPL_VAR NAME="categorycode" -->&branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a> |
124 |
<a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=<!-- TMPL_VAR NAME="itemtype" -->&categorycode=<!-- TMPL_VAR NAME="categorycode" -->&branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a> |
113 |
</td> |
125 |
</td> |
Lines 115-121
$(document).ready(function() {
Link Here
|
115 |
<!-- /TMPL_LOOP --> |
127 |
<!-- /TMPL_LOOP --> |
116 |
<tr> |
128 |
<tr> |
117 |
<td> |
129 |
<td> |
118 |
<select name="categorycode"> |
130 |
<select name="categorycode" id="categorycode"> |
119 |
<option value="*">All</option> |
131 |
<option value="*">All</option> |
120 |
<!-- TMPL_LOOP NAME="categoryloop" --> |
132 |
<!-- TMPL_LOOP NAME="categoryloop" --> |
121 |
<option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option> |
133 |
<option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option> |
Lines 123-145
$(document).ready(function() {
Link Here
|
123 |
</select> |
135 |
</select> |
124 |
</td> |
136 |
</td> |
125 |
<td> |
137 |
<td> |
126 |
<select name="itemtype" style="width:13em;"> |
138 |
<select name="itemtype" id="matrixitemtype" style="width:13em;"> |
127 |
<option value="*">All</option> |
139 |
<option value="*">All</option> |
128 |
<!-- TMPL_LOOP NAME="itemtypeloop" --> |
140 |
<!-- TMPL_LOOP NAME="itemtypeloop" --> |
129 |
<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option> |
141 |
<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option> |
130 |
<!-- /TMPL_LOOP --> |
142 |
<!-- /TMPL_LOOP --> |
131 |
</select> |
143 |
</select> |
132 |
</td> |
144 |
</td> |
133 |
<td><input name="maxissueqty" size="3" /></td> |
145 |
<td><input name="maxissueqty" id="maxissueqty" size="3" /></td> |
134 |
<td><input name="issuelength" size="3" /> </td> |
146 |
<td><input name="issuelength" id="issuelength" size="3" /> </td> |
135 |
<td><input name="fine" size="4" /></td> |
147 |
<td><input name="fine" id="fine" size="4" /></td> |
136 |
<td><input name="chargeperiod" size="2" /></td> |
148 |
<td><input name="chargeperiod" id="chargeperiod" size="2" /></td> |
137 |
<td><input name="firstremind" size="2" /> </td> |
149 |
<td><input name="firstremind" id="firstremind" size="2" /> </td> |
138 |
<td><input name="finedays" size="3" /> </td> |
150 |
<td><input name="finedays" id="finedays" size="3" /> </td> |
139 |
<td><input name="renewalsallowed" size="2" /></td> |
151 |
<td><input name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
140 |
<td><input name="reservesallowed" size="2" /></td> |
152 |
<td><input name="reservesallowed" id="reservesallowed" size="2" /></td> |
141 |
<td><input name="rentaldiscount" size="2" /></td> |
153 |
<td><input name="rentaldiscount" size="2" id="rentaldiscount" /></td> |
142 |
<td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/><input type="submit" value="Add" class="submit" /></td> |
154 |
<td colspan="2"><input type="submit" value="Save" class="submit" /></td> |
143 |
</tr> |
155 |
</tr> |
144 |
</table> |
156 |
</table> |
145 |
</form> |
157 |
</form> |
146 |
- |
|
|