Bug 17855 - Followup patch following requests in comments 176 and 177
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / installer / step3.tt
1 [% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 3</title>
2 [% IF ( finish ) %]<meta http-equiv="refresh" content="5; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
3 [% INCLUDE 'installer-doc-head-close.inc' %]
4 <div>
5 <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web  installer &rsaquo; Step 3</h1>
6
7 [% IF ( selectframeworks ) %]
8     <script type="text/javascript">
9 //<![CDATA[
10
11 var surl = unescape(window.location.pathname);
12
13 function doLoad()
14 {
15     // the timeout value should be the same as in the "refresh" meta-tag
16     setTimeout( "refresh()", 2*1000 );
17 }
18
19 function refresh(value)
20 {
21     //  The argument to the location.reload function determines
22     //  if the browser should retrieve the document from the
23     //  web-server.  In our example all we need to do is cause
24     //  the JavaScript block in the document body to be
25     //  re-evaluated.  If we needed to pull the document from
26     //  the web-server again (such as where the document contents
27     //  change dynamically) we would pass the argument as 'true'.
28     //
29     surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
30
31     window.location.replace( surl );
32 }
33
34 function selectAllFrameworks()
35 {
36     //  A handy short link that selects all available checkboxes
37     //  on the page.
38     //
39     var checkboxes = document.getElementsByTagName("input");
40     for (var i = 0; i < checkboxes.length; i++)
41     {
42         if (checkboxes[i].type == 'checkbox')
43         {
44             checkboxes[i].checked = true;
45         }
46     }
47
48     //  Prevent event propergation.
49     return false;
50 }
51
52 function Hide(link)
53 {
54     //  Toggle the display of a given element on the page.
55     //
56     subfield = document.getElementById('bloc'+link);
57     var initstyle = subfield.style.display;
58     if (initstyle == 'block') subfield.style.display = 'none' ;
59     if (initstyle == 'none') subfield.style.display = 'block' ;
60 }
61
62 //]]>
63 </script>
64 [% END %]
65
66
67 [% IF ( finish ) %]
68     <h1>Congratulations, installation complete</h1>
69     <p>If this page does not redirect in 10 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.</p>
70 [% END %]
71
72
73 [% IF ( choosemarc ) %]
74    <h2 align="center">Select your MARC flavor</h2>
75        <form name="frameworkselection" method="post" action="install.pl">
76            <input type="hidden" name="step" value="3" />
77            <input type="hidden" name="op" value="selectframeworks" />
78            <p>
79            [% FOREACH flavourloo IN flavourloop %]
80            <div>
81               [% IF ( flavourloo.checked ) %]
82                   <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked /> [% flavourloo.label %] <br/>
83               [% ELSE %]
84                   <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/>
85               [% END %]
86            </div>
87            [% END %]
88            </p>
89            <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
90            </form>
91 [% END %]
92
93 [% IF ( selectframeworks ) %]
94 <h2 align="center">Selecting Default Settings</h2>
95     <script type="text/javascript">
96        var linklabel = _("Select all sample data");
97        document.write('<p><a href="#" onclick="return selectAllFrameworks();">'+linklabel+'</a></p>');
98     </script>
99     <form name="frameworkselection" method="post" action="install.pl">
100     <input type="hidden" name="step" value="3" />
101     <input type="hidden" name="op" value="addframeworks" />
102
103     [% IF ( frameworksloop ) %]
104     <h2>MARC frameworks: [% marcflavour %]</h2>
105     [% IF ( en_marc_frameworks ) %]
106          <h4><span class="error">No MARC frameworks are available for your language.
107                 Defaulting to the frameworks supplied for English (en)<span></h4>
108     [% END %]
109     [% FOREACH frameworksloo IN frameworksloop %]
110     <div>
111     <h3>[% frameworksloo.label %]</h3>
112     [% FOREACH framework IN frameworksloo.frameworks %]
113        <table style="border:1px;vertical-align:top;">
114        <tr>
115        <td style="vertical-align:top;">
116           [% IF ( framework.checked ) %]
117                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
118           [% ELSE %]
119                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
120           [% END %]
121        </td>
122        <td>
123           <label for="[% framework.fwkname %]">
124                [% framework.fwkdescription %]
125                <em>([% framework.fwkname %])</em>
126            </label>
127        </td>
128        </table>
129      [% END %]
130      </div>
131      [% END %]
132      <h2>Other data</h2>
133      [% END %]
134      [% IF ( en_sample_data ) %]
135          <h4><span class="error">No sample data and settings are available for your language.
136                  Defaulting to the samples supplied for English (en)<span></h4>
137      [% END %]
138      [% FOREACH levelloo IN levelloop %]
139      <div>
140      <h3>[% levelloo.label %]</h3>
141      [% FOREACH framework IN levelloo.frameworks %]
142         <table style="border:1px;vertical-align:top;">
143         <tr>
144         <td style="vertical-align:top;">
145             [% IF ( framework.checked ) %]
146                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
147             [% ELSE %]
148                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
149             [% END %]
150         </td>
151         <td>
152                 <label for="[% framework.fwkname %]">
153                     [% framework.fwkdescription %]
154                     <em>([% framework.fwkname %])</em>
155                 </label>
156         </td>
157         </table>
158      [% END %]
159      </div>
160      [% END %]
161      <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
162      please be patient.</p>
163      <p><input type="submit" value="Import &gt;&gt;" />
164      </p>
165      </form>
166 [% END %]
167
168
169 [% IF ( addframeworks ) %]
170     [% FOREACH lis IN list %]
171     <h3>[% lis.level %] data added</h3>
172     <ul>
173     [% FOREACH fwklis IN lis.fwklist %]
174         <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li>
175     [% END %]
176     </ul>
177     [% END %]
178     <h3>All done!</h3>
179     <p>Installation complete.<br />
180         <p>
181             You can help the Koha community by sharing your statistics with us.
182             <br>If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the admin module.
183         </p>
184         <p>Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool.
185         <form name="finish">
186         <input type="hidden" name="step" value="3" />
187         <input type="hidden" name="op" value="finish" />
188         <input type="submit" value="Set up Koha with the onboarding tool"/>
189         </form>
190         </p>
191     </p>
192 [% END %]
193
194
195 [% IF ( importdatastructure ) %]
196     [% IF ( error ) %]
197         <p>The following error occurred while importing the database structure:</p>
198         <p class="error">[% error %] </p>
199         <p>Please contact your system administrator</p>
200     [% ELSE %]
201         <h2 align="center">Success</h2>
202         <ul>
203         <li>Database tables created</li>
204         </ul>
205         <form action="install.pl">
206         <input type="hidden" name="step" value="3" />
207             <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
208         </form>
209     [% END %]
210 [% END %]
211
212
213 [% IF ( proposeimport ) %]
214     <p>Now we're ready to create the database tables and fill them with some default data.</p>
215     <form action="install.pl">
216     <input type="hidden" name="step" value="3" />
217     <input type="hidden" name="op" value="importdatastructure" />
218     <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
219     </form>
220 [% END %]
221
222 [% IF ( default ) %]
223     [% IF ( upgrading ) %]
224         <p>
225             We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database.
226         <br>
227         <a href="install.pl?step=3&amp;op=updatestructure" class="button">Update your database</a>
228         </p>
229     [% ELSE %]
230         <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation:
231         <br>
232         <br>
233             <a href="install.pl?step=3&amp;op=choosemarc" class="button">Install basic configuration settings</a>
234
235     [% END %]
236 [% END %]
237
238 [% IF ( updatestructure ) %]
239   <div><h2 align="center">Updating database structure</h2>
240   [% IF ( has_update_succeeds ) %]
241   <p>Update report :</p>
242     <ul>
243       [% FOREACH update_repor IN update_report %]
244           <li>[% update_repor.line |html %]</li>
245       [% END %]
246     </ul>
247   [% END %]
248   [% IF ( has_update_errors ) %]
249   <p>Update errors :</p>
250     <ul>
251       [% FOREACH update_error IN update_errors %]
252           <li class="update_error">[% update_error.line |html %]</li>
253       [% END %]
254     </ul>
255   [% END %]
256  [% UNLESS ( has_update_errors ) %]
257     <p>Everything went OK, update done.</p>
258   [% END %]
259 <a href="install.pl?step=3&amp;op=finished" class="button">Continue to log in to Koha</a>
260   </div>
261 [% END %]
262
263 </div>
264 </body>
265 </html>