8 [% INCLUDE 'doc-head-open.inc' %]
9 [% IF Koha.Preference('UseCirculationDesks') %]
10 <title>Koha › Circulation › Set library and desk</title>
12 <title>Koha › Circulation › Set library</title>
14 [% INCLUDE 'doc-head-close.inc' %]
16 .noshow {display: none;}
19 <body id="circ_set-library" class="circ">
20 [% INCLUDE 'header.inc' %]
21 [% INCLUDE 'circ-search.inc' %]
23 <div id="breadcrumbs">
24 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
26 › <a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
29 <div class="main container-fluid">
31 <div class="col-sm-12">
35 [% IF Koha.Preference('CircSidebar') %]
36 <div class="col-sm-10 col-sm-push-2">
38 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
44 <h2>Update succeeded</h2>
46 [% FOREACH update IN updated %]
47 [% IF ( update.updated_branch || update.updated_desk || update.updated_register ) %]
48 [% IF ( updated.updated.branch ) %]
49 <li>Library: [% update.old_branch or "?" | html %] ⇒ [% update.new_branch or "?" | html %]</li>
51 [% IF ( update.updated_desk ) %]
52 <li>Desk: [% update.old_desk or "?" | html %] ⇒ [% LoginDeskname or "?" | html %]</li>
54 [% IF ( updated.updated_register ) %]
55 <li>Register: [% updated.new_register | html %]</li>
58 <li>ERROR - unknown</li>
62 <form method="post" action="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]">
64 [% FOREACH recycle_loo IN recycle_loop %]
65 <input type="text" name="[% recycle_loo.param | html %]" value="[% recycle_loo.value | html %]" />
68 <button type="submit">Continue</button>
73 <form method="post" action="set-library.pl">
74 [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
75 <fieldset class="rows">
76 <legend>Set library</legend>
78 <li><label for="branch">Choose library:</label>
79 <select name="branch" id="branch">
80 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
85 <select name="branch" id="branch" style="visibility:hidden;">
86 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
90 [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
91 <fieldset class="rows">
92 <legend>Set desk</legend>
94 <li><label for="desk">Choose desk:</label>
95 <select name="desk_id" id="desk_id">
96 [% PROCESS options_for_desks desks => Desks.all(), selected => desk_id %]
102 [% IF Koha.Preference('UseCashRegisters') %]
103 <fieldset class="rows">
104 <legend>Set cash register</legend>
107 <label for="register_id">Choose cash register:</label>
108 <select name="register_id" id="register_id">
109 [% PROCESS options_for_registers registers => Registers.all() %]
116 <fieldset class="action">
117 <input type="submit" value="Submit" />
118 <a class="cancel" id="cancel_set_library" href="[% referer or '/cgi-bin/koha/circ/circulation.pl' %]">Cancel</a>
121 [% FOREACH recycle_loo IN recycle_loop %]
122 <input type="text" name="[% recycle_loo.param | html %]" value="[% recycle_loo.value | html %]" />
124 <input type="hidden" name="oldreferer" value="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]" />
130 [% IF Koha.Preference('CircSidebar') %]
131 </div> <!-- /.col-sm-10.col-sm-push-2 -->
132 <div class="col-sm-2 col-sm-pull-10">
134 [% INCLUDE 'circ-nav.inc' %]
136 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
137 </div> <!-- /.row -->
141 </div> <!-- /.col-sm-12 -->
142 </div> <!-- /.row -->
144 [% MACRO jsinclude BLOCK %]
145 [% Asset.js("js/desk_selection.js") | $raw %]
147 $(document).ready(function() {
148 $("#branch").on("change", function() {
149 var selectedBranch = $("#branch").children(
150 "option:selected").val();
152 $("#register_id").children().each(function() {
153 // default to no-register
154 if ($(this).is("#noregister")) {
155 $(this).prop("selected", true)
157 // display branch registers
158 else if ($(this).hasClass(selectedBranch)) {
159 $(this).prop("disabled", false);
161 // default to branch default if there is one
162 if ($(this).hasClass("default")) {
163 $(this).prop("selected", true)
166 // hide non-branch registers
170 $(this).prop("disabled", true);
178 [% INCLUDE 'intranet-bottom.inc' %]