Lines 6-58
Link Here
|
6 |
[% IF ( delete_confirmed ) %] Printers › Printer deleted[% END %] |
6 |
[% IF ( delete_confirmed ) %] Printers › Printer deleted[% END %] |
7 |
[% IF ( else ) %]Printers[% END %]</title> |
7 |
[% IF ( else ) %]Printers[% END %]</title> |
8 |
[% INCLUDE 'doc-head-close.inc' %] |
8 |
[% INCLUDE 'doc-head-close.inc' %] |
9 |
[% IF ( add_form ) %]<script type="text/javascript"> |
9 |
[% IF ( loop ) %] |
|
|
10 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
11 |
[% INCLUDE 'datatables.inc' %] |
12 |
<script type="text/javascript"> |
10 |
//<![CDATA[ |
13 |
//<![CDATA[ |
11 |
// |
14 |
$(document).ready(function() { |
12 |
function isNotNull(f,noalert) { |
15 |
$("#printerst").dataTable($.extend(true, {}, dataTablesDefaults, { |
13 |
if (f.value.length ==0) { |
16 |
"aoColumnDefs": [ |
14 |
return false; |
17 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
15 |
} |
18 |
], |
16 |
return true; |
19 |
"aaSorting": [[ 0, "asc" ]], |
17 |
} |
20 |
"sPaginationType": "four_button" |
18 |
// |
21 |
})); |
19 |
function isNum(v,maybenull) { |
22 |
}); |
20 |
var n = new Number(v.value); |
23 |
//]]> |
21 |
if (isNaN(n)) { |
|
|
22 |
return false; |
23 |
} |
24 |
if (maybenull==0 && v.value=="") { |
25 |
return false; |
26 |
} |
27 |
return true; |
28 |
} |
29 |
// |
30 |
function Check(f) { |
31 |
var ok=1; |
32 |
var _alertString=""; |
33 |
var alertString2; |
34 |
if (f.printername.value.length==0) { |
35 |
_alertString += "- printer name missing\n"; |
36 |
} |
37 |
if (f.printqueue.value.length==0) { |
38 |
_alertString += "- Queue missing\n"; |
39 |
} |
40 |
if (_alertString.length==0) { |
41 |
document.Aform.submit(); |
42 |
} else { |
43 |
alertString2 = "Form not submitted because of the following problem(s)\n"; |
44 |
alertString2 += "------------------------------------------------------------------------------------\n\n"; |
45 |
alertString2 += _alertString; |
46 |
alert(alertString2); |
47 |
} |
48 |
} |
49 |
//]]> |
50 |
</script> |
24 |
</script> |
51 |
[% END %] |
25 |
[% END %] |
52 |
</head> |
26 |
</head> |
53 |
<body id="admin_printers" class="admin"> |
27 |
<body id="admin_printers" class="admin"> |
54 |
[% INCLUDE 'header.inc' %] |
28 |
[% INCLUDE 'header.inc' %] |
55 |
[% INCLUDE 'printers-admin-search.inc' %] |
29 |
[% INCLUDE 'cat-search.inc' %] |
56 |
|
30 |
|
57 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %][% IF ( searchfield ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Modify printer '[% searchfield %]'[% ELSE %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › New printer[% END %][% END %] |
31 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %][% IF ( searchfield ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Modify printer '[% searchfield %]'[% ELSE %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › New printer[% END %][% END %] |
58 |
[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Printer added[% END %] |
32 |
[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Printer added[% END %] |
Lines 73-79
Link Here
|
73 |
[% ELSE %] |
47 |
[% ELSE %] |
74 |
<h1>New printer</h1> |
48 |
<h1>New printer</h1> |
75 |
[% END %] |
49 |
[% END %] |
76 |
<form action="[% script_name %]" name="Aform" method="post"> |
50 |
<form action="[% script_name %]" name="Aform" method="post" class="validated"> |
77 |
<input type="hidden" name="op" value="add_validate" /> |
51 |
<input type="hidden" name="op" value="add_validate" /> |
78 |
[% IF ( searchfield ) %] |
52 |
[% IF ( searchfield ) %] |
79 |
<input type="hidden" name="add" value="0" /> |
53 |
<input type="hidden" name="add" value="0" /> |
Lines 88-107
Link Here
|
88 |
</li> |
62 |
</li> |
89 |
[% ELSE %] |
63 |
[% ELSE %] |
90 |
<li> |
64 |
<li> |
91 |
<label for="printername">Printer name: </label> |
65 |
<label for="printername" class="required">Printer name: </label> |
92 |
<input type="text" name="printername" id="printername" size="50" maxlength="50" /> |
66 |
<input type="text" name="printername" id="printername" size="40" maxlength="40" class="required" required="required" /> |
|
|
67 |
<span class="required">Required</span> |
93 |
</li> |
68 |
</li> |
94 |
[% END %] |
69 |
[% END %] |
95 |
<li> |
70 |
<li> |
96 |
<label for="printqueue">Queue: </label> |
71 |
<label for="printqueue" class="required">Queue: </label> |
97 |
<input type="text" name="printqueue" id="printqueue" size="50" maxlength="50" value="[% printqueue %]" /> |
72 |
<input type="text" name="printqueue" id="printqueue" size="20" maxlength="20" value="[% printqueue %]" class="required" required="required" /> |
|
|
73 |
<span class="required">Required</span> |
98 |
</li> |
74 |
</li> |
99 |
<li> |
75 |
<li> |
100 |
<label for="printtype">Type: </label> |
76 |
<label for="printtype">Type: </label> |
101 |
<input type="text" name="printtype" id="printtype" size="50" maxlength="50" value="[% printtype %]" /> |
77 |
<input type="text" name="printtype" id="printtype" size="20" maxlength="20" value="[% printtype %]" /> |
102 |
</li></ol> |
78 |
</li></ol> |
103 |
</fieldset> |
79 |
</fieldset> |
104 |
<fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset> |
80 |
<fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset> |
105 |
</form> |
81 |
</form> |
106 |
|
82 |
|
107 |
[% END %] |
83 |
[% END %] |
Lines 114-148
Link Here
|
114 |
[% END %] |
90 |
[% END %] |
115 |
|
91 |
|
116 |
[% IF ( delete_confirm ) %] |
92 |
[% IF ( delete_confirm ) %] |
117 |
<h3>Confirm deletion of printer <em>[% searchfield %]</em></h3> |
93 |
<div class="dialog alert"> |
118 |
<ul> |
94 |
<h3>Confirm deletion of printer <em>[% searchfield %]</em></h3> |
119 |
<li> |
95 |
|
120 |
<strong>Printer: </strong> |
96 |
<table> |
121 |
[% searchfield %] |
97 |
<tr> |
122 |
</li> |
98 |
<th scope="row">Printer: </th><td>[% searchfield %]</td> |
123 |
<li> |
99 |
</tr> |
124 |
<strong>Queue: </strong> |
100 |
<tr> |
125 |
[% printqueue %] |
101 |
<th scope="row">Queue: </th><td>[% printqueue %]</td> |
126 |
</li> |
102 |
</tr> |
127 |
<li> |
103 |
<tr> |
128 |
<strong>Type: </strong> |
104 |
<th scope="row">Type: </th><td>[% printtype %]</td> |
129 |
[% printtype %] |
105 |
</tr> |
130 |
</li> |
106 |
</table> |
131 |
</ul> |
107 |
|
132 |
<form action="[% script_name %]" method="post"> |
108 |
<form action="[% script_name %]" method="post"> |
133 |
<input type="hidden" name="op" value="delete_confirmed" /> |
109 |
<input type="hidden" name="op" value="delete_confirmed" /> |
134 |
<input type="hidden" name="searchfield" value="[% searchfield %]" /> |
110 |
<input type="hidden" name="searchfield" value="[% searchfield %]" /> |
135 |
<input type="submit" value="Delete this printer" /> |
111 |
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button> |
136 |
</form> <form action="[% script_name %]" method="post"> |
112 |
</form> |
137 |
<input type="submit" value="Do not Delete" /> |
113 |
<form action="/cgi-bin/koha/admin/printers.pl" method="get"> |
138 |
</form> |
114 |
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button> |
|
|
115 |
</form> |
116 |
</div> |
139 |
[% END %] |
117 |
[% END %] |
140 |
|
118 |
|
141 |
[% IF ( delete_confirmed ) %] |
119 |
[% IF ( delete_confirmed ) %] |
142 |
<h3>Printer deleted</h3> |
120 |
<div class="dialog message"> |
143 |
<form action="[% script_name %]" method="post"> |
121 |
<h3>Printer deleted</h3> |
144 |
<fieldset class="action"><input type="submit" value="OK" /></fieldset> |
122 |
<form action="[% script_name %]" method="post"> |
145 |
</form> |
123 |
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button> |
|
|
124 |
</form> |
125 |
</div> |
126 |
|
146 |
[% END %] |
127 |
[% END %] |
147 |
|
128 |
|
148 |
[% IF ( else ) %] |
129 |
[% IF ( else ) %] |
Lines 156-185
Link Here
|
156 |
You searched for [% searchfield %]</span> |
137 |
You searched for [% searchfield %]</span> |
157 |
[% END %] |
138 |
[% END %] |
158 |
|
139 |
|
159 |
[% IF ( loop ) %]<table> |
140 |
[% IF ( loop ) %] |
160 |
<tr> |
141 |
<table id="printerst"> |
161 |
<th>Name</th> |
142 |
<thead> |
162 |
<th>Queue</th> |
143 |
<tr> |
163 |
<th>Type</th> |
144 |
<th>Name</th> |
164 |
<th> </th> |
145 |
<th>Queue</th> |
165 |
</tr> |
146 |
<th>Type</th> |
|
|
147 |
<th> </th> |
148 |
</tr> |
149 |
</thead> |
150 |
<tbody> |
166 |
[% FOREACH loo IN loop %] |
151 |
[% FOREACH loo IN loop %] |
167 |
<tr> |
152 |
<tr> |
168 |
<td>[% loo.printername %]</td> |
153 |
<td>[% loo.printername %]</td> |
169 |
<td>[% loo.printqueue %]</td> |
154 |
<td>[% loo.printqueue %]</td> |
170 |
<td>[% loo.printtype %]</td> |
155 |
<td>[% loo.printtype %]</td> |
171 |
<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.printername %]">Edit</a> <a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.printername %]">Delete</a></td> |
156 |
<td class="actions"><a class="btn btn-mini" href="[% loo.script_name %]?op=add_form&searchfield=[% loo.printername |uri %]"><i class="fa fa-pencil"></i> Edit</a> <a class="btn btn-mini" href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.printername |uri %]"><i class="fa fa-trash"></i> Delete</a></td> |
172 |
</tr> |
157 |
</tr> |
173 |
[% END %] |
158 |
[% END %] |
174 |
</table>[% ELSE %]<div class="notice">No printers defined.</div>[% END %] |
159 |
</tbody> |
175 |
|
160 |
</table>[% ELSE %]<div class="dialog message">No printers defined.</div>[% END %] |
176 |
[% IF ( offsetgtzero ) %] |
|
|
177 |
<a href="[% script_name %]?offset=[% prevpage %]"><< Previous</a> |
178 |
[% END %] |
179 |
|
180 |
[% IF ( ltcount ) %] |
181 |
<a href="[% script_name %]?offset=[% nextpage %]">Next >></a> |
182 |
[% END %] |
183 |
[% END %] |
161 |
[% END %] |
184 |
|
162 |
|
185 |
</div> |
163 |
</div> |
186 |
- |
|
|