Bug 34931: Remove fieldset/legend in favor of div/h3
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / installer / step3.tt
1 [% USE raw %]
2 [% PROCESS 'i18n.inc' %]
3 [% INCLUDE 'doc-head-open.inc' %]
4
5 <title>[% FILTER collapse %]
6     [% IF ( proposeimport ) %]
7         [% t("Set up database") | html %]
8     [% END %]
9     [% IF ( importdatastructure ) %]
10         [% IF ( error ) %]
11             [% t("Error creating database tables") | html %]
12         [% ELSE %]
13             [% t("Database tables created") | html %]
14         [% END %]
15     [% END %]
16     [% IF ( default ) %]
17        [% IF ( upgrading ) %]
18             [% t("Update database") | html %]
19        [% ELSE %]
20             [% t("Install basic configuration settings") | html %]
21        [% END %]
22     [% END %]
23     [% IF ( choosemarc ) %]
24         [% t("Select your MARC flavor") | html %]
25     [% END %]
26     [% IF ( selectframeworks ) %]
27         [% t("Selecting default settings") | html %]
28     [% END %]
29     [% IF ( addframeworks ) %]
30         [% t("Default data loaded") | html %]
31     [% END %]
32     [% IF ( finish ) %]
33         [% t("Installation complete") | html %]
34     [% END %] &rsaquo;
35     [% t("Web installer") | html %] &rsaquo;
36     [% t("Koha") | html %]
37 [% END %]</title>
38
39 [% INCLUDE 'installer-doc-head-close.inc' %]
40 </head>
41
42 <body id="installer" class="installer">
43     <div class="container-fluid">
44         <div class="row">
45             <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
46                 <div id="logo"><a href="#">Koha</a></div>
47                 [% IF ( finish ) %]
48                     <h1>Web installer &rsaquo; Installation complete</h1>
49
50                     <div id="steps">
51                         <ol>
52                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
53                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
54                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
55                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Set up database</li>
56                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Install basic configuration settings</li>
57                             <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
58                         </ol>
59                     </div>
60
61                     <h3>Congratulations, installation complete</h3>
62                     <p><a class="btn btn-primary" href="/cgi-bin/koha/installer/onboarding.pl">Begin the onboarding process</a></p>
63                 [% END %]
64
65                 [% IF ( choosemarc ) %]
66                     <h2>Select your MARC flavor</h2>
67
68                     <div id="steps">
69                         <ol>
70                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
71                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
72                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
73                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Set up database</li>
74                             <li class="current open"><i class="fa fa-square" aria-hidden="true"></i> Install basic configuration settings</li>
75                                 <ol>
76                                     <li class="current open"><i class="fa fa-square" aria-hidden="true"></i> Select your MARC flavor</li>
77                                     <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Selecting default settings</li>
78                                 </ol>
79                             <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
80                         </ol>
81                     </div>
82
83                     <form name="frameworkselection" method="post" action="install.pl">
84                         <input type="hidden" name="step" value="3" />
85                         <input type="hidden" name="op" value="selectframeworks" />
86
87                         <p>MARC stands for Machine Readable Cataloging. A MARC record contains bibliographic record information about an item. MARC21 is used globally, UNIMARC tends to be used in a few European countries. </p>
88
89                         [% FOREACH flavourloo IN flavourloop %]
90                             [% IF ( flavourloo.label == "Unimarc") %]
91                                  <p>
92                                      <label><input type="radio" name="marcflavour" id="marcflavour" value="[% flavourloo.code | html %]" /> [% flavourloo.label | html %]</label>
93                                  </p>
94                             [% ELSE %]
95                                  <p>
96                                      <label><input type="radio" name="marcflavour" id="marcflavour" value="[% flavourloo.code | html %]" checked="checked" /> [% flavourloo.label | html %]</label>
97                                  </p>
98                             [% END %]
99                         [% END %]
100                         <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
101                     </form>
102                 [% END # / IF choosemarc %]
103
104                 [% IF ( selectframeworks ) %]
105                     <h1>Web installer &rsaquo; Selecting default settings</h1>
106
107                     <div id="steps">
108                         <ol>
109                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
110                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
111                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
112                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Set up database</li>
113                             <li class="current open"><i class="fa fa-square" aria-hidden="true"></i> Install basic configuration settings</li>
114                                 <ol>
115                                     <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Select your MARC flavor</li>
116                                     <li class="current open"><i class="fa fa-square" aria-hidden="true"></i> Selecting default settings</li>
117                                 </ol>
118                             <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
119                         </ol>
120                     </div>
121
122                     <form name="frameworkselection" method="post" action="install.pl">
123                         <input type="hidden" name="step" value="3" />
124                         <input type="hidden" name="op" value="addframeworks" />
125                         [% IF ( frameworksloop ) %]
126                             <h3>MARC frameworks: [% marcflavour | html %]</h3>
127                             [% IF ( en_marc_frameworks ) %]
128                                 <h4><span class="error">No MARC frameworks are available for your language.
129                                 Defaulting to the frameworks supplied for English (en)<span></h4>
130                             [% END %]
131                             [% FOREACH frameworksloo IN frameworksloop %]
132                                 [%- SWITCH frameworksloo.label -%]
133                                   [%- CASE 'mandatory' -%]<h4>Mandatory</h4>
134                                   [%- CASE 'optional'  -%]<h4>Optional</h4>
135                                 [%- END -%]
136
137                                 <div class="checkboxes">
138
139                                     <p>
140                                         <a class="selectall [% frameworksloo.label FILTER lower | html %]" href="#">Select all</a>
141                                         <a class="deselectall [% frameworksloo.label FILTER lower | html %]" href="#">Select none</a>
142                                     </p>
143
144                                     [% FOREACH framework IN frameworksloo.frameworks %]
145                                         <div class="checkbox">
146                                             <label>
147                                                 [% IF ( framework.checked ) %]
148                                                     <input type="checkbox" name="framework" value="[% framework.fwkfile | html %]" id ="[% framework.fwkname | html %]" checked="checked" />
149                                                 [% ELSE %]
150                                                     <input type="checkbox" name="framework" value="[% framework.fwkfile | html %]" id ="[% framework.fwkname | html %]" />
151                                                 [% END %]
152                                                 [% FOREACH description IN framework.fwkdescription %]
153                                                     [% description | html %]<br />
154                                                 [% END %]
155                                                 <em>([% framework.fwkname | html %])</em>
156                                             </label>
157                                         </div>
158                                         <hr />
159                                     [% END # / FOREACH framework %]
160                                 </div>
161                             [% END # / FOREACH frameworksloo %]
162                         [% END # / IF frameworkdsloop %]
163
164                         <h3>Other data</h3>
165
166                         [% IF ( en_sample_data ) %]
167                             <h4><span class="error">No sample data and settings are available for your language.
168                             Defaulting to the samples supplied for English (en)<span></h4>
169                         [% END %]
170
171                         [% FOREACH levelloo IN levelloop %]
172                             [%- SWITCH levelloo.label -%]
173                               [%- CASE 'mandatory' -%]<h4>Mandatory</h4>
174                               [%- CASE 'optional'  -%]<h4>Optional</h4>
175                             [%- END -%]
176
177                             <div class="checkboxes">
178
179                                 <p>
180                                     <a class="selectall [% levelloo.label FILTER lower | html %]" href="#">Select all</a>
181                                     <a class="deselectall [% levelloo.label FILTER lower | html %]" href="#">Select none</a>
182                                 </p>
183
184                                 [% FOREACH framework IN levelloo.frameworks %]
185                                     <div class="checkbox">
186                                         <label for="[% framework.fwkname | html %]">
187                                             [% IF ( framework.checked ) %]
188                                                 <input type="checkbox" name="framework" value="[% framework.fwkfile | html %]" id="[% framework.fwkname | html %]" checked="checked" />
189                                             [% ELSE %]
190                                                 <input type="checkbox" name="framework" value="[% framework.fwkfile | html %]" id="[% framework.fwkname | html %]" />
191                                             [% END %]
192                                             [% FOREACH description IN framework.fwkdescription %]
193                                                 [% description | html %]<br />
194                                             [% END %]
195                                         </label>
196                                     </div> <!-- /div.checkbox -->
197                                 [% END # / FOREACH framework %]
198                             </div>
199                         [% END # / FOREACH levelloo %]
200
201                         <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>
202
203                         <p><input type="submit" value="Import" class="btn btn-primary" /></p>
204                     </form>
205                 [% END # / IF selectframeworks %]
206
207                 [% IF ( addframeworks ) %]
208                     <h1>Web installer &rsaquo; Default data loaded</h1>
209
210                     <div id="steps">
211                         <ol>
212                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
213                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
214                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
215                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Set up database</li>
216                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Install basic configuration settings</li>
217                                 <ol>
218                                     <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Select your MARC flavor</li>
219                                     <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Selecting default settings</li>
220                                 </ol>
221                             <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
222                         </ol>
223                     </div>
224
225                     [% FOREACH lis IN list %]
226                         [% IF lis.level == 'mandatory' %]
227                             <h3>Mandatory data added</h3>
228                         [% ELSIF lis.level == 'optional' %]
229                             <h3>Optional data added</h3>
230                         [% ELSIF lis.level == 'mysql' %]
231                             <h3>MySQL data added</h3>
232                         [% ELSIF lis.level == 'localization' %]
233                             <h3>Localization data added</h3>
234                         [% ELSE %]
235                             <h3>[% lis.level FILTER ucfirst | html %] data added</h3>
236                         [% END %]
237                         <ul>
238                             [% FOREACH fwklis IN lis.fwklist %]
239                             <li>
240                                 [% fwklis.fwkname | html %]
241                                 [% IF ( fwklis.error ) %]<p class="bg-danger">[% fwklis.error | html %]</p>[% END %]
242                             </li>
243                             [% END %]
244                         </ul>
245                     [% END %]
246
247                     <h3>Basic installation complete.</h3>
248
249                     <p>In the next steps you will be guided through some basic requirements like defining Koha user with all administrative privileges (superlibrarian).</p>
250
251                     <form action="/cgi-bin/koha/installer/install.pl" method="post" name="finish">
252                         <h4>
253                             You can help the Koha community by sharing your statistics with us.
254                         </h4>
255                         <p>
256                             If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the Administration module.
257                         </p>
258
259                         <input type="hidden" name="step" value="3" />
260                         <input type="hidden" name="op" value="finish" />
261                         <p>
262                             <input value="Set up some of Koha's basic requirements" class="btn btn-primary" type="submit" />
263                         </p>
264                     </form>
265
266                 [% END # / IF addframeworks %]
267
268                 [% IF ( importdatastructure ) %]
269                     [% IF ( error ) %]
270                         <p>The following error occurred while importing the database structure:</p>
271                         <div class="alert alert-warning"><p>[% error | html %] </p></div>
272                         <p>Please contact your system administrator</p>
273                     [% ELSE %]
274                         <h1>Web installer &rsaquo; Success</h1>
275                         <div class="alert alert-success"><p>Database tables created</p></div>
276
277                         <div id="steps">
278                             <ol>
279                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
280                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
281                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
282                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Set up database</li>
283                                 <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Install basic configuration settings</li>
284                                 <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
285                             </ol>
286                         </div>
287
288                         <form action="install.pl" method="post">
289                             <input type="hidden" name="step" value="3" />
290                             <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
291                         </form>
292                     [% END %]
293                 [% END # / IF importdatastructure %]
294
295                 [% IF ( proposeimport ) %]
296                     <h1>Web installer &rsaquo; Set up database</h1>
297
298                     <div id="steps">
299                         <ol>
300                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
301                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
302                             <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
303                             <li class="current open"><i class="fa fa-square" aria-hidden="true"></i> Set up database</li>
304                             <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Install basic configuration settings</li>
305                             <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
306                         </ol>
307                     </div>
308
309                     <p>Now we're ready to create the database tables and fill them with some default data.</p>
310                     <form action="install.pl" method="post">
311                         <input type="hidden" name="step" value="3" />
312                         <input type="hidden" name="op" value="importdatastructure" />
313                         <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
314                     </form>
315                 [% END # / proposeimport %]
316
317                 [% IF ( default ) %]
318                     [% IF ( upgrading ) %]
319                         <h1>Web installer &rsaquo; Update database</h1>
320                         <p>We are upgrading from Koha [% dbversion | html %] to [% kohaversion | html %]</p>
321                         <p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
322                     [% ELSE %]
323                         <h1>Web installer &rsaquo; Install basic configuration settings</h1>
324
325                         <div id="steps">
326                             <ol>
327                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Choose your language</li>
328                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Check Perl dependencies</li>
329                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Database settings</li>
330                                 <li class="complete"><i class="fa fa-check-square" aria-hidden="true"></i> Set up database</li>
331                                 <li class="current open"><i class="fa fa-square" aria-hidden="true"></i> Install basic configuration settings</li>
332                                 <li class="open"><i class="fa fa-square" aria-hidden="true"></i> Onboarding</li>
333                             </ol>
334                         </div>
335
336                         <p>We are ready to do some basic configuration.</p>
337                         <form action="install.pl" method="post">
338                             <input type="hidden" name="step" value="3" />
339                             <input type="hidden" name="op" value="choosemarc" />
340                             <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
341                         </form>
342                     [% END %]
343                 [% END # / IF default %]
344
345                 [% IF ( updatestructure ) %]
346                     <h2>Updating database structure</h2>
347                     [% IF has_update_succeeds || success %]
348                         <p>Update report :</p>
349                     [% END %]
350
351                     [%# Success for old versions %]
352                     [% IF has_update_succeeds %]
353                         <ul>
354                             [% FOREACH l IN update_report %]
355                                 [% SET line = l.line %]
356                                 [% IF line.match('^Upgrade to') %]
357                                     <li>[% line | $raw %]</li>
358                                 [% ELSE %]
359                                     [% line | $raw %]<br/>
360                                 [% END %]
361                             [% END %]
362                         </ul>
363                     [% END %]
364
365                     [%# Success for new versions %]
366                     [% IF success.size %]
367                         <ul>
368                             [% FOR s IN success %]
369                                 [% FOR o IN s.output %]
370                                     <li>[% o | html %]</li>
371                                     [% IF s.output.size > 1 %]
372                                         [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %]
373                                     [% END %]
374                                 [% END %]
375                             [% END %]
376                         </ul>
377                     [% END %]
378
379                     [% IF atomic_updates.success.size %]
380                         <p>Atomic updates:</p>
381                         <ul>
382                             [% FOR s IN atomic_updates.success %]
383                                 [% FOR o IN s.output %]
384                                     <li>[% o | html %]</li>
385                                     [% IF s.output.size > 1 %]
386                                         [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %]
387                                     [% END %]
388                                 [% END %]
389                             [% END %]
390                         </ul>
391                     [% END %]
392
393                     [% IF has_update_errors OR error.size %]
394                         <p>Update errors :</p>
395                         [%# Errors for old versions %]
396                         [% IF has_update_errors %]
397                             <ul>
398                                 [% FOREACH update_error IN update_errors %]
399                                     <li class="update_error">[% update_error.line | html %]</li>
400                                 [% END %]
401                             </ul>
402                         [% END %]
403
404                         [%# Errors for new versions %]
405                         [% IF error.size %]
406                             <ul>
407                                 [% FOR e IN error %]
408                                     [% FOR o IN e.output %]
409                                         <li class="update_error">
410                                             [% o | html %]
411                                             <br/>
412                                             ERROR: [% e.error | html %]
413
414                                             [% IF e.output.size > 1 %]
415                                                 [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %]
416                                             [% END %]
417                                         </li>
418                                     [% END %]
419                                 [% END %]
420                             </ul>
421                         [% END %]
422                     [% END %]
423
424                     [% IF atomic_updates.error.size %]
425                         <p>Atomic update error :</p>
426                         <ul>
427                             [% FOR e IN atomic_updates.error %]
428                                 [% FOR o IN e.output %]
429                                     <li class="update_error">
430                                         [% o | html %]
431                                         <br/>
432                                         ERROR: [% e.error | html %]
433
434                                         [% IF e.output.size > 1 %]
435                                             [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %]
436                                         [% END %]
437                                     </li>
438                                 [% END %]
439                             [% END %]
440                         </ul>
441                     [% END %]
442
443                     [% UNLESS error OR has_update_errors %]
444                         <p>Everything went okay. Update done.</p>
445                         <p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
446                     [% ELSE %]
447                         <p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Try again</a></p>
448                     [% END %]
449                [% END # / IF updatestructure %]
450             </div> <!-- / #installer-step3 -->
451         </div> <!-- / .row -->
452     </div><!-- / .container-fluid -->
453
454 [% IF ( selectframeworks ) %]
455     [% MACRO jsinclude BLOCK %]
456         <script>
457             $(document).ready(function(){
458                 $(".selectall,.deselectall").on("click",function(e){
459                     e.preventDefault();
460                     var container = $(this).parent().parent();
461                     if( $(this).hasClass("selectall") ){
462                         var state = true;
463                     } else {
464                         var state = false;
465                     }
466                     $( container ).find("input").prop("checked", state);
467                     $( container ).find(".selectall,.deselectall").toggle();
468                     update_sample_libraries_dependencies();
469                 });
470                 let required_text = _("(requires sample libraries)");
471                 $("#sample_libraries_holidays, #sample_patrons").parent().after(" <span class='hint'>"+required_text+"</span>");
472                 function update_sample_libraries_dependencies(){
473                     let checked = $("#sample_libraries").prop("checked");
474                     $("#sample_libraries_holidays, #sample_patrons").prop("disabled", !checked);
475                     if (!checked) {
476                         $("#sample_libraries_holidays, #sample_patrons").prop("checked", false);
477                     }
478                 };
479                 $("#sample_libraries").on("change", update_sample_libraries_dependencies);
480                 $("#sample_libraries").change();
481             });
482         </script>
483     [% END %]
484 [% END %]
485
486 [% INCLUDE 'installer-intranet-bottom.inc' %]