Bug 24201: (QA follow-up) Fix desks select box selected attribute
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / set-library.tt
1 [% USE Branches %]
2 [% USE Desks %]
3 [% USE Koha %]
4 [% IF Desks.all %]
5     [% SET setdesk = 1 %]
6 [% END %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Circulation &rsaquo; Set library</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <style>
11     .noshow {display: none;}
12 </style>
13 </head>
14 <body id="circ_set-library" class="circ">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'circ-search.inc' %]
17
18 <div id="breadcrumbs">
19          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
21 &rsaquo; <a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
22 </div>
23
24 <div class="main container-fluid">
25     <div class="row">
26         <div class="col-sm-12">
27             <main>
28                 <div class="row">
29
30                 [% IF Koha.Preference('CircSidebar') %]
31                     <div class="col-sm-10 col-sm-push-2">
32                 [% ELSE %]
33                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
34                 [% END %]
35
36
37 [% IF ( updated ) %]
38
39 <h2>Update succeeded</h2>
40 Updated:<ul>
41     [% FOREACH update IN updated %]
42     [% IF ( update.updated_branch ) %]
43         <li>Library: [% update.old_branch or "?" | html %] &rArr; [% update.new_branch or "?" | html %]</li>
44     [% ELSIF (update.updated_desk) %]
45         <li>Desk: [% update.old_desk or "?" | html %] &rArr; [% LoginDeskname or "?" | html %]</li>
46     [% ELSE %]
47         <li>ERROR - unknown</li>
48     [% END %]
49     [% END %]
50     </ul>
51 <form method="post" action="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]">
52     <div class="noshow">
53         [% FOREACH recycle_loo IN recycle_loop %]
54         <input type="text" name="[% recycle_loo.param | html %]" value="[% recycle_loo.value | html %]" />
55         [% END %]
56     </div>
57     <button type="submit">Continue</button>
58 </form>
59
60 [% ELSE %]
61
62 <form method="post" action="set-library.pl">
63 <fieldset class="rows">
64     <legend>Set library</legend>
65     <ol>
66     [% IF ( singleBranchMode && !CAN_user_superlibrarian ) %]
67         <li>SingleBranchMode is ON.</li>
68     [% ELSE %]
69         <li><label for="branch">Choose library:</label>
70         <select name="branch" id="branch">
71             [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
72         </select></li>
73     [% END %]
74     </ol>
75 </fieldset>
76 [% IF Desks.all %]
77 <fieldset class="rows">
78     <legend>Set Desk</legend>
79     <ol>
80         <li><label for="desk">Choose Desk:</label>
81         <select name="desk_id" id="desk_id">
82             [% PROCESS options_for_desks desks => Desks.all(), selected => desk_id  %]
83         </select></li>
84     </ol>
85 </fieldset>
86 [% END %]
87 <fieldset class="action">
88     <input type="submit" value="Submit" />
89     <a class="cancel" id="cancel_set_library" href="[% referer or '/cgi-bin/koha/circ/circulation.pl' %]">Cancel</a>
90 </fieldset>
91 <div class="noshow">
92     [% FOREACH recycle_loo IN recycle_loop %]
93     <input type="text" name="[% recycle_loo.param | html %]" value="[% recycle_loo.value | html %]" />
94     [% END %]
95     <input type="hidden" name="oldreferer" value="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]" />
96 </div>
97 </form>
98 <!-- /updated -->
99 [% END %]
100
101                     [% IF Koha.Preference('CircSidebar') %]
102                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
103                             <div class="col-sm-2 col-sm-pull-10">
104                                 <aside>
105                                     [% INCLUDE 'circ-nav.inc' %]
106                                 </aside>
107                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
108                         </div> <!-- /.row -->
109                     [% END %]
110
111             </main>
112         </div> <!-- /.col-sm-12 -->
113     </div> <!-- /.row -->
114
115 [% INCLUDE 'intranet-bottom.inc' %]