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