Bug 17942 - Update style of the web installer with Bootstrap 3
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / installer / step3.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2
3 <title>Koha &rsaquo; Web installer &rsaquo;
4      [% IF ( proposeimport ) %]
5          Set up database
6      [% END %]
7      [% IF ( importdatastructure ) %]
8          [% IF ( error ) %]
9            Error creating database tables
10          [% ELSE %]
11            Database tables created
12          [% END %]
13      [% END %]
14      [% IF ( default ) %]
15         [% IF ( upgrading ) %]
16             Update database
17         [% ELSE %]
18             Install basic configuration settings
19         [% END %]
20      [% END %]
21      [% IF ( choosemarc ) %]
22         Select your MARC flavor
23      [% END %]
24      [% IF ( selectframeworks ) %]
25         Selecting default settings
26      [% END %]
27      [% IF ( addframeworks ) %]
28         Default data loaded
29      [% END %]
30      [% IF ( finish ) %]
31         Installation complete
32      [% END %]
33 </title>
34
35 [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
36 [% INCLUDE 'installer-doc-head-close.inc' %]
37 </head>
38
39 <body id="installer" class="installer">
40     <div class="container-fluid">
41         <div class="row">
42             <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
43                 <h1 id="logo"><a href="#">Koha</a></h1>
44                 [% IF ( finish ) %]
45                     <h2>Web installer &rsaquo; Installation complete</h2>
46                     <h3>Congratulations, installation complete</h3>
47                     <p>
48                         If this page does not redirect in 10 seconds, <a href="/cgi-bin/koha/installer/onboarding.pl">start onboarding process</a>.
49                     </p>
50                 [% END %]
51
52                 [% IF ( choosemarc ) %]
53                     <h2>Select your MARC flavor</h2>
54
55                     <form name="frameworkselection" method="post" action="install.pl">
56                         <input type="hidden" name="step" value="3" />
57                         <input type="hidden" name="op" value="selectframeworks" />
58
59                         <p>MARC stands for Machine Readable Cataloging. A MARC record contains bibliographic information about an item. MARC21 is used globally, whereas UNIMARC tends to be used in Europe. </p>
60
61                         [% FOREACH flavourloo IN flavourloop %]
62                             [% IF ( flavourloo.label == "Unimarc") %]
63                                  <p>
64                                      <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]</label>
65                                  </p>
66                             [% ELSE %]
67                                  <p>
68                                      <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %]</label>
69                                  </p>
70                             [% END %]
71                         [% END %]
72                         <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
73                     </form>
74                 [% END # / IF choosemarc %]
75
76                 [% IF ( selectframeworks ) %]
77                     <h2>Web installer &rsaquo; Selecting default settings</h2>
78
79
80                     <form name="frameworkselection" method="post" action="install.pl">
81                         <input type="hidden" name="step" value="3" />
82                         <input type="hidden" name="op" value="addframeworks" />
83                         [% IF ( frameworksloop ) %]
84                             <h3>MARC frameworks: [% marcflavour %]</h3>
85                             [% IF ( en_marc_frameworks ) %]
86                                 <h4><span class="error">No MARC frameworks are available for your language.
87                                 Defaulting to the frameworks supplied for English (en)<span></h4>
88                             [% END %]
89                             [% FOREACH frameworksloo IN frameworksloop %]
90                                 <h4>[% frameworksloo.label %]</h4>
91
92                                 <div class="checkboxes">
93
94                                     <p>
95                                         <a class="selectall [% frameworksloo.label FILTER lower %]" href="#">Select all [% frameworksloo.label FILTER lower %] data</a>
96                                         <a class="deselectall [% frameworksloo.label FILTER lower %]" href="#">Select no [% frameworksloo.label FILTER lower %] data</a>
97                                     </p>
98
99                                     [% FOREACH framework IN frameworksloo.frameworks %]
100                                         <div class="checkbox">
101                                             <label>
102                                                 [% IF ( framework.checked ) %]
103                                                     <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" checked="checked" />
104                                                 [% ELSE %]
105                                                     <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
106                                                 [% END %]
107                                                 [% framework.fwkdescription %]
108                                                 <em>([% framework.fwkname %])</em>
109                                             </label>
110                                         </div>
111                                         <hr />
112                                     [% END # / FOREACH framework %]
113                                 </div>
114                             [% END # / FOREACH frameworksloo %]
115                         [% END # / IF frameworkdsloop %]
116
117                         <h3>Other data</h3>
118
119                         [% IF ( en_sample_data ) %]
120                             <h4><span class="error">No sample data and settings are available for your language.
121                             Defaulting to the samples supplied for English (en)<span></h4>
122                         [% END %]
123
124                         [% FOREACH levelloo IN levelloop %]
125                             <h4>[% levelloo.label %]</h4>
126
127                             <div class="checkboxes">
128
129                                 <p>
130                                     <a class="selectall [% levelloo.label FILTER lower %]" href="#">Select all [% levelloo.label FILTER lower %] data</a>
131                                     <a class="deselectall [% levelloo.label FILTER lower %]" href="#">Select no [% levelloo.label FILTER lower %] data</a>
132                                 </p>
133
134                                 [% FOREACH framework IN levelloo.frameworks %]
135                                     <div class="checkbox">
136                                         <label for="[% framework.fwkname %]">
137                                             [% IF ( framework.checked ) %]
138                                                 <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]" checked="checked" />
139                                             [% ELSE %]
140                                                 <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]" />
141                                             [% END %]
142                                             [% framework.fwkdescription %]
143                                             <em>([% framework.fwkname %])</em>
144                                         </label>
145                                     </div> <!-- /div.checkbox -->
146                                 [% END # / FOREACH framework %]
147                             </div>
148                         [% END # / FOREACH levelloo %]
149
150                         <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete. Please be patient.</p>
151
152                         <p><input type="submit" value="Import" class="btn btn-primary" /></p>
153                     </form>
154                 [% END # / IF selectframeworks %]
155
156                 [% IF ( addframeworks ) %]
157                     <h2>Web installer &rsaquo; Default data loaded</h2>
158                     [% FOREACH lis IN list %]
159                         <h3>[% lis.level FILTER ucfirst %] data added</h3>
160                         <ul>
161                             [% FOREACH fwklis IN lis.fwklist %]
162                             <li>
163                                 [% fwklis.fwkname %]
164                                 [% IF ( fwklis.error ) %]<p class="bg-danger">[% fwklis.error %]</p>[% END %]
165                             </li>
166                             [% END %]
167                         </ul>
168                     [% END %]
169
170                     <h3>Basic installation complete.</h3>
171
172                     <p>In the next steps you will be guided through some basic requirements like defining Koha user with all administrative privileges (superlibrarian).</p>
173
174                     <form action="/cgi-bin/koha/installer/install.pl" method="post" name="finish">
175                         <h4>
176                             You can help the Koha community by sharing your statistics with us.
177                         </h4>
178                         <p>
179                             If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the Administration module.
180                         </p>
181
182                         <input type="hidden" name="step" value="3" />
183                         <input type="hidden" name="op" value="finish" />
184                         <p>
185                             <input value="Set up some of Koha's basic requirements" class="btn btn-primary" type="submit" />
186                         </p>
187                     </form>
188
189                 [% END # / IF addframeworks %]
190
191                 [% IF ( importdatastructure ) %]
192                     [% IF ( error ) %]
193                         <p>The following error occurred while importing the database structure:</p>
194                         <div class="alert alert-warning"><p>[% error %] </p></div>
195                         <p>Please contact your system administrator</p>
196                     [% ELSE %]
197                         <h2>Web installer &rsaquo; Success</h2>
198                         <div class="alert alert-success"><p>Database tables created</p></div>
199                         <form action="install.pl" method="post">
200                             <input type="hidden" name="step" value="3" />
201                             <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
202                         </form>
203                     [% END %]
204                 [% END # / IF importdatastructure %]
205
206                 [% IF ( proposeimport ) %]
207                     <h2>Web installer &rsaquo; Set up database</h2>
208                     <p>Now we're ready to create the database tables and fill them with some default data.</p>
209                     <form action="install.pl" method="post">
210                         <input type="hidden" name="step" value="3" />
211                         <input type="hidden" name="op" value="importdatastructure" />
212                         <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
213                     </form>
214                 [% END # / proposeimport %]
215
216                 [% IF ( default ) %]
217                     [% IF ( upgrading ) %]
218                         <h2>Web installer &rsaquo; Update database</h2>
219                         <p>We are upgrading from Koha [% dbversion %] to [% kohaversion %]</p>
220                         <p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
221                     [% ELSE %]
222                         <h2>Web installer &rsaquo; Install basic configuration settings</h2>
223                         <p>We are ready to do some basic configuration.</p>
224                         <p> <a href="install.pl?step=3&amp;op=choosemarc" class="btn btn-primary">Continue to the next step</a> </p>
225                     [% END %]
226                 [% END # / IF default %]
227
228                 [% IF ( updatestructure ) %]
229                     <h2>Updating database structure</h2>
230                     [% IF ( has_update_succeeds ) %]
231                         <p>Update report :</p>
232                         <ul>
233                             [% FOREACH update_repor IN update_report %]
234                                 <li>[% update_repor.line |html %]</li>
235                             [% END %]
236                         </ul>
237                     [% END %]
238                     [% IF ( has_update_errors ) %]
239                         <p>Update errors :</p>
240                         <ul>
241                             [% FOREACH update_error IN update_errors %]
242                                 <li class="update_error">[% update_error.line |html %]</li>
243                             [% END %]
244                         </ul>
245                     [% END %]
246                     [% UNLESS ( has_update_errors ) %]
247                         <p>Everything went okay. Update done.</p>
248                     [% END %]
249                     <p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
250                [% END # / IF updatestructure %]
251             </div> <!-- / #installer-step3 -->
252         </div> <!-- / .row -->
253
254 [% IF ( selectframeworks ) %]
255     <script type="text/javascript">
256         $(document).ready(function(){
257             $(".selectall,.deselectall").on("click",function(e){
258                 e.preventDefault();
259                 var container = $(this).parent().parent();
260                 if( $(this).hasClass("selectall") ){
261                     var state = true;
262                 } else {
263                     var state = false;
264                 }
265                 $( container ).find("input").prop("checked", state);
266                 $( container ).find(".selectall,.deselectall").toggle();
267             });
268         });
269     </script>
270 [% END %]
271
272 [% INCLUDE 'intranet-bottom.inc' %]