Lines 42-172
Link Here
|
42 |
<div class="col-sm-12"> |
42 |
<div class="col-sm-12"> |
43 |
<main> |
43 |
<main> |
44 |
<div class="row"> |
44 |
<div class="row"> |
45 |
|
|
|
46 |
[% IF Koha.Preference('CircSidebar') %] |
47 |
<div class="col-sm-10 col-sm-push-2"> |
48 |
[% ELSE %] |
49 |
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> |
50 |
[% END %] |
51 |
[% INCLUDE 'messages.inc' %] |
52 |
<h1>Set library</h1> |
53 |
|
54 |
[% IF ( updated ) %] |
55 |
|
56 |
<h2>Update succeeded</h2> |
57 |
Updated:<ul> |
58 |
[% FOREACH update IN updated %] |
59 |
[% IF ( update.updated_branch || update.updated_desk || update.updated_register ) %] |
60 |
[% IF ( update.updated_branch ) %] |
61 |
<li>Library: [% update.old_branch or "?" | html %] ⇒ [% update.new_branch or "?" | html %]</li> |
62 |
[% END %] |
63 |
[% IF ( update.updated_desk ) %] |
64 |
<li>Desk: [% update.old_desk or "?" | html %] ⇒ [% LoginDeskname or "?" | html %]</li> |
65 |
[% END %] |
66 |
[% IF ( updated.updated_register ) %] |
67 |
<li>Register: [% updated.old_register or "?" | html %] ⇒ [% Registers.session_register_name or "?" | html %]</li> |
68 |
[% END %] |
69 |
[% ELSE %] |
70 |
<li>ERROR - unknown</li> |
71 |
[% END %] |
72 |
[% END %] |
73 |
</ul> |
74 |
<form method="post" action="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]"> |
75 |
[% INCLUDE 'csrf-token.inc' %] |
76 |
<div class="noshow"> |
77 |
[% FOREACH recycle_loo IN recycle_loop %] |
78 |
[% SET param = recycle_loo.param %] |
79 |
[% NEXT IF param == 'op' %] |
80 |
[% NEXT IF param == 'csrf_token' %] |
81 |
[% IF param == 'original_op' %][% param = 'op' %][% END %] |
82 |
<input type="text" name="[% param | html %]" value="[% recycle_loo.value | html %]" /> |
83 |
[% IF param == 'op' %][% SET has_op = 1 %][% END %] |
84 |
[% END %] |
85 |
[% UNLESS has_op %] |
86 |
<input type="hidden" name="op" value="cud-no-op" /> [%# Trick to pass anti-CSRF requirements %] |
87 |
[% END %] |
88 |
</div> |
89 |
<button type="submit">Continue</button> |
90 |
</form> |
91 |
|
92 |
[% ELSE %] |
93 |
|
94 |
<form method="post" action="set-library.pl"> |
95 |
[% INCLUDE 'csrf-token.inc' %] |
96 |
<input type="hidden" name="op" value="cud-set-library" /> |
97 |
[% IF ( CAN_user_superlibrarian || CAN_user_loggedinlibrary ) %] |
98 |
<fieldset class="rows"> |
99 |
<legend>Set library</legend> |
100 |
<ol> |
101 |
<li><label for="branch">Choose library:</label> |
102 |
<select name="branch" id="branch"> |
103 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %] |
104 |
</select></li> |
105 |
</ol> |
106 |
</fieldset> |
107 |
[% ELSE %] |
108 |
<select name="branch" id="branch" style="visibility:hidden;"> |
109 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] |
110 |
</select> |
111 |
[% END %] |
112 |
|
113 |
[% IF Koha.Preference('UseCirculationDesks') && Desks.all %] |
114 |
<fieldset class="rows"> |
115 |
<legend>Set desk</legend> |
116 |
<ol> |
117 |
<li><label for="desk">Choose desk:</label> |
118 |
<select name="desk_id" id="desk_id"> |
119 |
[% PROCESS options_for_desks desks => Desks.all(), selected => desk_id %] |
120 |
</select></li> |
121 |
</ol> |
122 |
</fieldset> |
123 |
[% END %] |
124 |
|
125 |
[% IF Koha.Preference('UseCashRegisters') %] |
126 |
<fieldset class="rows"> |
127 |
<legend>Set cash register</legend> |
128 |
<ol> |
129 |
<li> |
130 |
<label for="register_id">Choose cash register:</label> |
131 |
<select name="register_id" id="register_id"> |
132 |
<option id="noregister" selected="selected" value="">-- None --</option> |
133 |
[% PROCESS options_for_registers registers => Registers.all() %] |
134 |
</select> |
135 |
</li> |
136 |
</ol> |
137 |
</fieldset> |
138 |
[% END %] |
139 |
|
140 |
<fieldset class="action"> |
141 |
<input type="submit" class="btn btn-primary" value="Submit" /> |
142 |
<a class="cancel" id="cancel_set_library" href="[% referer or '/cgi-bin/koha/circ/circulation.pl' %]">Cancel</a> |
143 |
</fieldset> |
144 |
<div class="noshow"> |
145 |
[% FOREACH recycle_loo IN recycle_loop %] |
146 |
[% SET param = recycle_loo.param %] |
147 |
[% IF param == 'op' %][% param = 'original_op' %][% END %] |
148 |
<input type="text" name="[% param | html %]" value="[% recycle_loo.value | html %]" /> |
149 |
[% END %] |
150 |
<input type="hidden" name="oldreferer" value="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]" /> |
151 |
</div> |
152 |
</form> |
153 |
<!-- /updated --> |
154 |
[% END %] |
155 |
|
156 |
[% IF Koha.Preference('CircSidebar') %] |
45 |
[% IF Koha.Preference('CircSidebar') %] |
157 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
46 |
<div class="col-sm-10 col-sm-push-2"> |
158 |
<div class="col-sm-2 col-sm-pull-10"> |
47 |
[% ELSE %] |
159 |
<aside> |
48 |
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> |
160 |
[% INCLUDE 'circ-nav.inc' %] |
|
|
161 |
</aside> |
162 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
163 |
</div> <!-- /.row --> |
164 |
[% END %] |
49 |
[% END %] |
|
|
50 |
[% INCLUDE 'messages.inc' %] |
51 |
<h1>Set library</h1> |
52 |
<form method="post" action="set-library.pl"> |
53 |
[% INCLUDE 'csrf-token.inc' %] |
54 |
<input type="hidden" name="op" value="cud-set-library" /> |
55 |
[% IF ( CAN_user_superlibrarian || CAN_user_loggedinlibrary ) %] |
56 |
<fieldset class="rows"> |
57 |
<legend>Set library</legend> |
58 |
<ol> |
59 |
<li><label for="branch">Choose library:</label> |
60 |
<select name="branch" id="branch"> |
61 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %] |
62 |
</select></li> |
63 |
</ol> |
64 |
</fieldset> |
65 |
[% ELSE %] |
66 |
<select name="branch" id="branch" style="visibility:hidden;"> |
67 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] |
68 |
</select> |
69 |
[% END %] |
165 |
|
70 |
|
166 |
</main> |
71 |
[% IF Koha.Preference('UseCirculationDesks') && Desks.all %] |
167 |
</div> <!-- /.col-sm-12 --> |
72 |
<fieldset class="rows"> |
168 |
</div> <!-- /.row --> |
73 |
<legend>Set desk</legend> |
169 |
|
74 |
<ol> |
|
|
75 |
<li><label for="desk_id">Choose desk:</label> |
76 |
<select name="desk_id" id="desk_id"> |
77 |
[% PROCESS options_for_desks desks => Desks.all(), selected => desk_id %] |
78 |
</select></li> |
79 |
</ol> |
80 |
</fieldset> |
81 |
[% IF Koha.Preference('UseCashRegisters') %] |
82 |
<fieldset class="rows"> |
83 |
<legend>Set cash register</legend> |
84 |
<ol> |
85 |
<li> |
86 |
<label for="register_id">Choose cash register:</label> |
87 |
<select name="register_id" id="register_id"> |
88 |
<option id="noregister" selected="selected" value="">-- None --</option> |
89 |
[% PROCESS options_for_registers registers => Registers.all() %] |
90 |
</select> |
91 |
</li> |
92 |
</ol> |
93 |
</fieldset> |
94 |
[% END %] |
95 |
<fieldset class="action"> |
96 |
<input type="submit" class="btn btn-primary" value="Submit" /> |
97 |
<a class="cancel" id="cancel_set_library" href="[% referer or '/cgi-bin/koha/mainpage.pl' %]">Cancel</a> |
98 |
</fieldset> |
99 |
<div class="noshow"> |
100 |
[% FOREACH recycle_loo IN recycle_loop %] |
101 |
[% SET param = recycle_loo.param %] |
102 |
[% IF param == 'op' %][% param = 'original_op' %][% END %] |
103 |
<input type="text" name="[% param | html %]" value="[% recycle_loo.value | html %]" /> |
104 |
[% END %] |
105 |
<input type="hidden" name="oldreferer" value="[% referer or "/cgi-bin/koha/mainpage.pl" %]" /> |
106 |
</div> |
107 |
</form> |
108 |
<!-- /updated --> |
109 |
[% END %] |
110 |
[% IF Koha.Preference('CircSidebar') %] |
111 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
112 |
<div class="col-sm-2 col-sm-pull-10"> |
113 |
<aside> |
114 |
[% INCLUDE 'circ-nav.inc' %] |
115 |
</aside> |
116 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
117 |
</div> <!-- /.row --> |
118 |
[% END %] |
119 |
</main> |
120 |
</div> <!-- /.col-sm-12 --> |
121 |
</div> <!-- /.row --> |
170 |
[% MACRO jsinclude BLOCK %] |
122 |
[% MACRO jsinclude BLOCK %] |
171 |
[% Asset.js("js/desk_selection.js") | $raw %] |
123 |
[% Asset.js("js/desk_selection.js") | $raw %] |
172 |
[% Asset.js("js/register_selection.js") | $raw %] |
124 |
[% Asset.js("js/register_selection.js") | $raw %] |
173 |
- |
|
|