Bug 28955: (follow-up) Set to fall back
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-reportproblem.tt
1 [% USE Koha %]
2 [% USE AdditionalContents %]
3 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
4 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Report a problem &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-reportproblem' bodyclass='scrollto' %]
11 [% INCLUDE 'masthead.inc' %]
12
13     <div class="main">
14         <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
15             <ol class="breadcrumb">
16                 <li class="breadcrumb-item">
17                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
18                 </li>
19                 <li class="breadcrumb-item active">
20                     <a href="#" aria-current="page">Report a problem</a>
21                 </li>
22             </ol>
23         </nav> <!-- /#breadcrumbs -->
24
25         <div class="container-fluid">
26             <div class="row">
27                 [% IF ( OpacNav || OpacNavBottom ) %]
28                     <div class="col-lg-2">
29                         <div id="navigation">
30                             [% INCLUDE 'navigation.inc' %]
31                         </div>
32                     </div>
33                     <div class="col-10 order-first order-md-first order-lg-2">
34                 [% ELSE %]
35                     <div class="col order-first order-md-first order-lg-2">
36                 [% END %]
37                 <h1>Report a problem</h1>
38
39                 [% IF messages %]
40                     [% FOR m IN messages %]
41                         <div class="alert alert-[% m.type | html %]">
42                             [% SWITCH m.code %]
43                             [% CASE 'success_on_send' %]
44                                 [% IF recipient == 'admin' %]
45                                     Your problem report has been sent to the Koha administrator.
46                                 [% ELSE %]
47                                     Your problem report has been sent to the library.
48                                 [% END %]
49                             [% CASE 'error_on_send' #We really should avoid reaching this! %]
50                                 Something wrong happened when sending the report. Please contact your library.
51                             [% END %]
52                         </div>
53                     [% END %]
54                 [% ELSE %]
55
56                     <div id="reportproblem" class="maincontent toptabs">
57                         <form name="reportlibform" action="/cgi-bin/koha/opac-reportproblem.pl" method="post">
58                             <legend class="sr-only">Report a problem</legend>
59                             <input type="hidden" name="op" value="addreport" />
60                             <fieldset class="rows">
61                                 <ol>
62                                     <li>
63                                         <label for="recipient">Send problem report to: </label>
64                                         [% IF library.inbound_email_address && library.inbound_email_address != Koha.Preference('KohaAdminEmailAddress') %]
65                                             <select name="recipient" id="recipient">
66                                                 <option value="library">A librarian</option>
67                                                 <option value="admin">Koha administrator</option>
68                                             </select>
69                                         [% ELSE %]
70                                             <span>Koha administrator</span>
71                                         [% END %]
72                                     </li>
73                                     <li>
74                                         <label for="problempage">Problem found on page: </label>
75                                         <input type="hidden" name="problempage" id="problempage" value="[% problempage | url %]" />
76                                          [% problempage | html %]<br/>
77                                     </li>
78                                     <li>
79                                         <label for="user">Username: </label>
80                                         <input type="hidden" name="user" id="user" value="[% username | html %]" />
81                                         [% username | html %]
82                                     <li>
83                                         <label for="subject">Subject: </label>
84                                         <input type="text" name="subject" id="subject" value="[% subject | html %]" />
85                                     </li>
86                                     <li>
87                                         <label for="message">Message: </label>
88                                         <textarea name="message" id="message" rows="7" cols="60"></textarea>
89                                     </li>
90                                 </ol>
91                             </fieldset>
92                             <fieldset class="action">
93                                 <input type="submit" value="Submit" class="btn btn-primary">
94                             </fieldset>
95                         </form>
96                     </div> <!-- / #reportproblem -->
97
98                 [% END # /IF messages %]
99
100                 </div> <!-- / .col-10/12 -->
101             </div> <!-- / .row -->
102         </div> <!-- / .container-fluid -->
103     </div> <!-- / .main -->
104
105 [% INCLUDE 'opac-bottom.inc' %]
106 [% BLOCK jsinclude %][% END %]