View | Details | Raw Unified | Return to bug 18346
Collapse All | Expand All

(-)a/installer/data/mysql/en/optional/patron_categories.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT INTO `categories` (`categorycode`, `description`, `enrolmentperiod`, `upperagelimit`, `dateofbirthrequired`, `finetype`, `bulk`, `enrolmentfee`, `overduenoticerequired`, `issuelimit`, `reservefee`, `category_type`) VALUES 
1
INSERT INTO `categories` (`categorycode`, `description`, `enrolmentperiod`, `upperagelimit`, `dateofbirthrequired`, `finetype`, `bulk`, `enrolmentfee`, `overduenoticerequired`, `issuelimit`, `reservefee`, `category_type`) VALUES
2
2
3
-- Adult Patrons
3
-- Adult Patrons
4
('PT','Patron',99,999,18,NULL,NULL,'0.000000',1,NULL,'0.000000','A'),
4
('PT','Patron',99,999,18,NULL,NULL,'0.000000',1,NULL,'0.000000','A'),
(-)a/installer/data/mysql/en/optional/patron_categories.txt (-5 / +1 lines)
Lines 1-6 Link Here
1
Sample patron types and categories: 
1
Sample patron types and categories. Types are currently hardcoded but you can manage categories after installation from the administration module.
2
3
Type:           Categories:
4
2
5
Adult patron - default patron type
3
Adult patron - default patron type
6
                PT  - Patron
4
                PT  - Patron
Lines 21-25 Professional - a member of an organization (organization is guarantor) Link Here
21
                T   - Teacher
19
                T   - Teacher
22
                S   - Staff
20
                S   - Staff
23
                B   - Board
21
                B   - Board
24
25
Types are currently hardcoded, but you can add/edit/delete categories after installation from the administration module.
(-)a/installer/data/mysql/en/optional/sample_holidays.txt (-4 / +1 lines)
Lines 1-4 Link Here
1
Sample holidays:
1
Sample holidays: Sunday, Christmas, New Year's
2
	Sundays
3
	Christmas
4
	New Year's
(-)a/installer/data/mysql/en/optional/sample_libraries.txt (-1 / +1 lines)
Line 1 Link Here
1
A few sample libraries.
1
Sample libraries.
(-)a/installer/data/mysql/en/optional/sample_z3950_servers.txt (+1 lines)
Lines 1-3 Link Here
1
Allow access to the following servers to search and download record information:
1
LIBRARY OF CONGRESS
2
LIBRARY OF CONGRESS
2
LIBRARY OF CONGRESS NAMES (authority records)
3
LIBRARY OF CONGRESS NAMES (authority records)
3
LIBRARY OF CONGRESS SUBJECTS (authority records)
4
LIBRARY OF CONGRESS SUBJECTS (authority records)
(-)a/installer/install.pl (-144 / +213 lines)
Lines 1-5 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
# This file is part of Koha.
4
#
5
# Copyright (C) 2017  Catalyst IT
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
3
use strict;
20
use strict;
4
use warnings;
21
use warnings;
5
use diagnostics;
22
use diagnostics;
Lines 40-49 if ( defined($language) ) { Link Here
40
my $installer = C4::Installer->new();
57
my $installer = C4::Installer->new();
41
my %info;
58
my %info;
42
$info{'dbname'} = C4::Context->config("database");
59
$info{'dbname'} = C4::Context->config("database");
43
$info{'dbms'} =
60
$info{'dbms'}   = (
44
  (   C4::Context->config("db_scheme")
61
      C4::Context->config("db_scheme")
45
    ? C4::Context->config("db_scheme")
62
    ? C4::Context->config("db_scheme")
46
    : "mysql" );
63
    : "mysql"
64
);
47
$info{'hostname'} = C4::Context->config("hostname");
65
$info{'hostname'} = C4::Context->config("hostname");
48
$info{'port'}     = C4::Context->config("port");
66
$info{'port'}     = C4::Context->config("port");
49
$info{'user'}     = C4::Context->config("user");
67
$info{'user'}     = C4::Context->config("user");
Lines 65-76 my $dbh = DBI->connect( Link Here
65
);
83
);
66
84
67
if ( $step && $step == 1 ) {
85
if ( $step && $step == 1 ) {
86
68
    #First Step (for both fresh installations and upgrades)
87
    #First Step (for both fresh installations and upgrades)
69
    #Checking ALL perl Modules and services needed are installed.
88
    #Checking ALL perl Modules and services needed are installed.
70
    #Whenever there is an error, adding a report to the page
89
    #Whenever there is an error, adding a report to the page
71
    my $op = $query->param('op') || 'noop';
90
    my $op = $query->param('op') || 'noop';
72
    $template->param( language => 1 );
91
    $template->param( language      => 1 );
73
    $template->param( 'checkmodule' => 1 ); # we start with the assumption that there are no problems and set this to 0 if there are
92
    $template->param( 'checkmodule' => 1 )
93
      ; # we start with the assumption that there are no problems and set this to 0 if there are
74
94
75
    unless ( $] >= 5.010000 ) {    # Bug 7375
95
    unless ( $] >= 5.010000 ) {    # Bug 7375
76
        $template->param( problems => 1, perlversion => 1, checkmodule => 0 );
96
        $template->param( problems => 1, perlversion => 1, checkmodule => 0 );
Lines 80-90 if ( $step && $step == 1 ) { Link Here
80
    $perl_modules->versions_info;
100
    $perl_modules->versions_info;
81
101
82
    my $modules = $perl_modules->get_attr('missing_pm');
102
    my $modules = $perl_modules->get_attr('missing_pm');
83
    if (scalar(@$modules)) {
103
    if ( scalar(@$modules) ) {
84
        my @components = ();
104
        my @components  = ();
85
        my $checkmodule = 1;
105
        my $checkmodule = 1;
86
        foreach (@$modules) {
106
        foreach (@$modules) {
87
            my ($module, $stats) = each %$_;
107
            my ( $module, $stats ) = each %$_;
88
            $checkmodule = 0 if $stats->{'required'};
108
            $checkmodule = 0 if $stats->{'required'};
89
            push(
109
            push(
90
                @components,
110
                @components,
Lines 96-109 if ( $step && $step == 1 ) { Link Here
96
                }
116
                }
97
            );
117
            );
98
        }
118
        }
99
        @components = sort {$a->{'name'} cmp $b->{'name'}} @components;
119
        @components = sort { $a->{'name'} cmp $b->{'name'} } @components;
100
        $template->param( missing_modules => \@components, checkmodule => $checkmodule, op => $op );
120
        $template->param(
121
            missing_modules => \@components,
122
            checkmodule     => $checkmodule,
123
            op              => $op
124
        );
101
    }
125
    }
102
}
126
}
103
elsif ( $step && $step == 2 ) {
127
elsif ( $step && $step == 2 ) {
104
#
128
105
#STEP 2 Check Database connection and access
129
    #STEP 2 Check Database connection and access
106
#
130
107
    $template->param(%info);
131
    $template->param(%info);
108
    my $checkdb = $query->param("checkdb");
132
    my $checkdb = $query->param("checkdb");
109
    $template->param( 'dbconnection' => $checkdb );
133
    $template->param( 'dbconnection' => $checkdb );
Lines 128-134 elsif ( $step && $step == 2 ) { Link Here
128
                my $grantaccess;
152
                my $grantaccess;
129
                while ( my ($line) = $rq->fetchrow ) {
153
                while ( my ($line) = $rq->fetchrow ) {
130
                    my $dbname = $info{dbname};
154
                    my $dbname = $info{dbname};
131
                    if ( $line =~ m/^GRANT (.*?) ON `$dbname`\.\*/ || index( $line, '*.*' ) > 0 ) {
155
                    if ( $line =~ m/^GRANT (.*?) ON `$dbname`\.\*/
156
                        || index( $line, '*.*' ) > 0 )
157
                    {
132
                        $grantaccess = 1
158
                        $grantaccess = 1
133
                          if (
159
                          if (
134
                            index( $line, 'ALL PRIVILEGES' ) > 0
160
                            index( $line, 'ALL PRIVILEGES' ) > 0
Lines 163-185 elsif ( $step && $step == 2 ) { Link Here
163
                    }
189
                    }
164
                }
190
                }
165
                $template->param( "checkgrantaccess" => $grantaccess );
191
                $template->param( "checkgrantaccess" => $grantaccess );
166
            }	# End mysql connect check...
192
            }    # End mysql connect check...
167
193
168
	    elsif ( $info{dbms} eq "Pg" ) {
194
            elsif ( $info{dbms} eq "Pg" ) {
169
		# Check if database has been created...
195
170
		my $rv = $dbh->do( "SELECT * FROM pg_catalog.pg_database WHERE datname = \'$info{dbname}\';" );
196
                # Check if database has been created...
171
		if ( $rv == 1 )	{
197
                my $rv = $dbh->do(
172
			$template->param( 'checkdatabasecreated' => 1 );
198
"SELECT * FROM pg_catalog.pg_database WHERE datname = \'$info{dbname}\';"
173
		}
199
                );
174
200
                if ( $rv == 1 ) {
175
		# Check if user has all necessary grants on this database...
201
                    $template->param( 'checkdatabasecreated' => 1 );
176
		my $rq = $dbh->do( "SELECT u.usesuper
202
                }
177
				    FROM pg_catalog.pg_user as u
203
178
				    WHERE u.usename = \'$info{user}\';" );
204
                # Check if user has all necessary grants on this database...
179
		if ( $rq == 1 ) {
205
                my $rq = $dbh->do(
180
			$template->param( "checkgrantaccess" => 1 );
206
                    "SELECT u.usesuper
181
		}
207
            FROM pg_catalog.pg_user as u
182
            }	# End Pg connect check...
208
            WHERE u.usename = \'$info{user}\';"
209
                );
210
                if ( $rq == 1 ) {
211
                    $template->param( "checkgrantaccess" => 1 );
212
                }
213
            }    # End Pg connect check...
183
        }
214
        }
184
        else {
215
        else {
185
            $template->param( "error" => DBI::err, "message" => DBI::errstr );
216
            $template->param( "error" => DBI::err, "message" => DBI::errstr );
Lines 187-197 elsif ( $step && $step == 2 ) { Link Here
187
    }
218
    }
188
}
219
}
189
elsif ( $step && $step == 3 ) {
220
elsif ( $step && $step == 3 ) {
190
#
221
191
#
222
    # STEP 3 : database setup
192
# STEP 3 : database setup
223
193
#
194
#
195
    my $op = $query->param('op');
224
    my $op = $query->param('op');
196
    if ( $op && $op eq 'finished' ) {
225
    if ( $op && $op eq 'finished' ) {
197
        #
226
        #
Lines 203-220 elsif ( $step && $step == 3 ) { Link Here
203
    elsif ( $op && $op eq 'finish' ) {
232
    elsif ( $op && $op eq 'finish' ) {
204
        $installer->set_version_syspref();
233
        $installer->set_version_syspref();
205
234
206
        # Installation is finished.
235
# Installation is finished.
207
        # We just deny anybody access to install
236
# We just deny anybody access to install
208
        # And we redirect people to mainpage.
237
# And we redirect people to mainpage.
209
        # The installer will have to relogin since we do not pass cookie to redirection.
238
# The installer will have to relogin since we do not pass cookie to redirection.
210
        $template->param( "$op" => 1 );
239
        $template->param( "$op" => 1 );
211
    }
240
    }
241
212
    elsif ( $op && $op eq 'addframeworks' ) {
242
    elsif ( $op && $op eq 'addframeworks' ) {
213
    #
214
    # 1ST install, 3rd sub-step : insert the SQL files the user has selected
215
    #
216
243
217
        my ($fwk_language, $list) = $installer->load_sql_in_order($all_languages, $query->param('framework'));
244
        # 1ST install, 3rd sub-step : insert the SQL files the user has selected
245
246
        my ( $fwk_language, $list ) =
247
          $installer->load_sql_in_order( $all_languages,
248
            $query->param('framework') );
218
        $template->param(
249
        $template->param(
219
            "fwklanguage" => $fwk_language,
250
            "fwklanguage" => $fwk_language,
220
            "list"        => $list
251
            "list"        => $list
Lines 224-265 elsif ( $step && $step == 3 ) { Link Here
224
        $template->param( "$op" => 1 );
255
        $template->param( "$op" => 1 );
225
    }
256
    }
226
    elsif ( $op && $op eq 'selectframeworks' ) {
257
    elsif ( $op && $op eq 'selectframeworks' ) {
227
        #
258
#
228
        #
259
#
229
        # 1ST install, 2nd sub-step : show the user the sql datas he can insert in the database.
260
# 1ST install, 2nd sub-step : show the user the sql datas he can insert in the database.
230
        #
261
#
231
        #
262
#
232
        # (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks)
263
# (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks)
233
264
234
        #Framework Selection
265
#Framework Selection
235
        #sql data for import are supposed to be located in installer/data/<language>/<level>
266
#sql data for import are supposed to be located in installer/data/<language>/<level>
236
        # Where <language> is en|fr or any international abbreviation (provided language hash is updated... This will be a problem with internationlisation.)
267
# Where <language> is en|fr or any international abbreviation (provided language hash is updated... This will be a problem with internationlisation.)
237
        # Where <level> is a category of requirement : required, recommended optional
268
# Where <level> is a category of requirement : required, recommended optional
238
        # level should contain :
269
# level should contain :
239
        #   SQL File for import With a readable name.
270
#   SQL File for import With a readable name.
240
        #   txt File that explains what this SQL File is meant for.
271
#   txt File that explains what this SQL File is meant for.
241
        # Could be VERY useful to have A Big file for a kind of library.
272
# Could be VERY useful to have A Big file for a kind of library.
242
        # But could also be useful to have some Authorised values data set prepared here.
273
# But could also be useful to have some Authorised values data set prepared here.
243
        # Framework Selection is achieved through checking boxes.
274
# Framework Selection is achieved through checking boxes.
244
        my $langchoice = $query->param('fwklanguage');
275
        my $langchoice = $query->param('fwklanguage');
245
        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
276
        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
246
	$langchoice =~ s/[^a-zA-Z_-]*//g;
277
        $langchoice =~ s/[^a-zA-Z_-]*//g;
247
        my $marcflavour = $query->param('marcflavour');
278
        my $marcflavour = $query->param('marcflavour');
248
        if ($marcflavour){
279
        if ($marcflavour) {
249
            $installer->set_marcflavour_syspref($marcflavour);
280
            $installer->set_marcflavour_syspref($marcflavour);
250
        };
281
        }
251
        $marcflavour = C4::Context->preference('marcflavour') unless ($marcflavour);
282
        $marcflavour = C4::Context->preference('marcflavour')
283
          unless ($marcflavour);
284
252
        #Insert into database the selected marcflavour
285
        #Insert into database the selected marcflavour
253
        undef $/;
286
        undef $/;
254
        my ($marc_defaulted_to_en, $fwklist) = $installer->marc_framework_sql_list($langchoice, $marcflavour);
287
        my ( $marc_defaulted_to_en, $fwklist ) =
255
        $template->param('en_marc_frameworks' => $marc_defaulted_to_en);
288
          $installer->marc_framework_sql_list( $langchoice, $marcflavour );
256
        $template->param( "frameworksloop" => $fwklist );
289
        $template->param( 'en_marc_frameworks' => $marc_defaulted_to_en );
257
        $template->param( "marcflavour" => ucfirst($marcflavour));
290
        $template->param( "frameworksloop"     => $fwklist );
258
291
        $template->param( "marcflavour"        => ucfirst($marcflavour) );
259
        my ($sample_defaulted_to_en, $levellist) = $installer->sample_data_sql_list($langchoice);
292
260
        $template->param( "en_sample_data" => $sample_defaulted_to_en);
293
        my ( $sample_defaulted_to_en, $levellist ) =
261
        $template->param( "levelloop" => $levellist );
294
          $installer->sample_data_sql_list($langchoice);
262
        $template->param( "$op"       => 1 );
295
        $template->param( "en_sample_data" => $sample_defaulted_to_en );
296
        $template->param( "levelloop"      => $levellist );
297
        $template->param( "$op"            => 1 );
298
299
        my $setup = $query->param('setup');
300
        $template->param( "setup" => $setup );
301
263
    }
302
    }
264
    elsif ( $op && $op eq 'choosemarc' ) {
303
    elsif ( $op && $op eq 'choosemarc' ) {
265
        #
304
        #
Lines 268-313 elsif ( $step && $step == 3 ) { Link Here
268
        #
307
        #
269
        #
308
        #
270
309
271
        #Choose Marc Flavour
310
#Choose Marc Flavour
272
        #sql data are supposed to be located in installer/data/<dbms>/<language>/marcflavour/marcflavourname
311
#sql data are supposed to be located in installer/data/<dbms>/<language>/marcflavour/marcflavourname
273
	# Where <dbms> is database type according to DBD syntax
312
# Where <dbms> is database type according to DBD syntax
274
        # Where <language> is en|fr or any international abbreviation (provided language hash is updated... This will be a problem with internationlisation.)
313
# Where <language> is en|fr or any international abbreviation (provided language hash is updated... This will be a problem with internationlisation.)
275
        # Where <level> is a category of requirement : required, recommended optional
314
# Where <level> is a category of requirement : required, recommended optional
276
        # level should contain :
315
# level should contain :
277
        #   SQL File for import With a readable name.
316
#   SQL File for import With a readable name.
278
        #   txt File taht explains what this SQL File is meant for.
317
#   txt File taht explains what this SQL File is meant for.
279
        # Could be VERY useful to have A Big file for a kind of library.
318
# Could be VERY useful to have A Big file for a kind of library.
280
        # But could also be useful to have some Authorised values data set prepared here.
319
# But could also be useful to have some Authorised values data set prepared here.
281
        # Marcflavour Selection is achieved through radiobuttons.
320
# Marcflavour Selection is achieved through radiobuttons.
282
        my $langchoice = $query->param('fwklanguage');
321
        my $langchoice = $query->param('fwklanguage');
322
283
        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
323
        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
284
	$langchoice =~ s/[^a-zA-Z_-]*//g;
324
        $langchoice =~ s/[^a-zA-Z_-]*//g;
285
        my $dir =
325
        my $dir =
286
          C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
326
          C4::Context->config('intranetdir')
287
        unless (opendir( MYDIR, $dir )) {
327
          . "/installer/data/$info{dbms}/$langchoice/marcflavour";
288
            if ($langchoice eq 'en') {
328
        unless ( opendir( MYDIR, $dir ) ) {
329
            if ( $langchoice eq 'en' ) {
289
                warn "cannot open MARC frameworks directory $dir";
330
                warn "cannot open MARC frameworks directory $dir";
290
            } else {
331
            }
332
            else {
291
                # if no translated MARC framework is available,
333
                # if no translated MARC framework is available,
292
                # default to English
334
                # default to English
293
                $dir = C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/en/marcflavour";
335
                $dir = C4::Context->config('intranetdir')
294
                opendir(MYDIR, $dir) or warn "cannot open English MARC frameworks directory $dir";
336
                  . "/installer/data/$info{dbms}/en/marcflavour";
337
                opendir( MYDIR, $dir )
338
                  or warn "cannot open English MARC frameworks directory $dir";
295
            }
339
            }
296
        }
340
        }
297
        my @listdir = grep { !/^\./ && -d "$dir/$_" } readdir(MYDIR);
341
        my @listdir = grep { !/^\./ && -d "$dir/$_" } readdir(MYDIR);
298
        closedir MYDIR;
342
        closedir MYDIR;
299
        my $marcflavour=C4::Context->preference("marcflavour");
343
        my $marcflavour = C4::Context->preference("marcflavour");
300
        my @flavourlist;
344
        my @flavourlist;
301
        foreach my $marc (@listdir) {
345
        foreach my $marc (@listdir) {
302
            my %cell=(
346
            my %cell = (
303
            "label"=> ucfirst($marc),
347
                "label"   => ucfirst($marc),
304
            "code"=>uc($marc),
348
                "code"    => uc($marc),
305
            "checked"=> defined($marcflavour) ? uc($marc) eq $marcflavour : 0);
349
                "checked" => defined($marcflavour)
350
                ? uc($marc) eq $marcflavour
351
                : 0
352
            );
353
306
#             $cell{"description"}= do { local $/ = undef; open INPUT "<$dir/$marc.txt"||"";<INPUT> };
354
#             $cell{"description"}= do { local $/ = undef; open INPUT "<$dir/$marc.txt"||"";<INPUT> };
307
            push @flavourlist, \%cell;
355
            push @flavourlist, \%cell;
308
        }
356
        }
309
        $template->param( "flavourloop" => \@flavourlist );
357
        $template->param( "flavourloop" => \@flavourlist );
310
        $template->param( "$op"       => 1 );
358
        $template->param( "$op"         => 1 );
311
    }
359
    }
312
    elsif ( $op && $op eq 'importdatastructure' ) {
360
    elsif ( $op && $op eq 'importdatastructure' ) {
313
        #
361
        #
Lines 327-333 elsif ( $step && $step == 3 ) { Link Here
327
        #
375
        #
328
        #Do updatedatabase And report
376
        #Do updatedatabase And report
329
377
330
        if ( ! defined $ENV{PERL5LIB} ) {
378
        if ( !defined $ENV{PERL5LIB} ) {
331
            my $find = "C4/Context.pm";
379
            my $find = "C4/Context.pm";
332
            my $path = $INC{$find};
380
            my $path = $INC{$find};
333
            $path =~ s/\Q$find\E//;
381
            $path =~ s/\Q$find\E//;
Lines 335-394 elsif ( $step && $step == 3 ) { Link Here
335
            warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n";
383
            warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n";
336
        }
384
        }
337
385
338
        my $now = POSIX::strftime( "%Y-%m-%dT%H:%M:%S", localtime() );
386
        my $now         = POSIX::strftime( "%Y-%m-%dT%H:%M:%S", localtime() );
339
        my $logdir = C4::Context->config('logdir');
387
        my $logdir      = C4::Context->config('logdir');
340
        my $dbversion = C4::Context->preference('Version');
388
        my $dbversion   = C4::Context->preference('Version');
341
        my $kohaversion = Koha::version;
389
        my $kohaversion = Koha::version;
342
        $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/;
390
        $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/;
343
391
344
        my $filename_suffix = join '_', $now, $dbversion, $kohaversion;
392
        my $filename_suffix = join '_', $now, $dbversion, $kohaversion;
345
        my ( $logfilepath, $logfilepath_errors ) = ( chk_log($logdir, "updatedatabase_$filename_suffix"), chk_log($logdir, "updatedatabase-error_$filename_suffix") );
393
        my ( $logfilepath, $logfilepath_errors ) = (
394
            chk_log( $logdir, "updatedatabase_$filename_suffix" ),
395
            chk_log( $logdir, "updatedatabase-error_$filename_suffix" )
396
        );
346
397
347
        my $cmd = C4::Context->config("intranetdir") . "/installer/data/$info{dbms}/updatedatabase.pl >> $logfilepath 2>> $logfilepath_errors";
398
        my $cmd = C4::Context->config("intranetdir")
399
          . "/installer/data/$info{dbms}/updatedatabase.pl >> $logfilepath 2>> $logfilepath_errors";
348
400
349
        system($cmd );
401
        system($cmd );
350
402
351
        my $fh;
403
        my $fh;
352
        open( $fh, "<", $logfilepath ) or die "Cannot open log file $logfilepath: $!";
404
        open( $fh, "<", $logfilepath )
405
          or die "Cannot open log file $logfilepath: $!";
353
        my @report = <$fh>;
406
        my @report = <$fh>;
354
        close $fh;
407
        close $fh;
355
        if (@report) {
408
        if (@report) {
356
            $template->param( update_report => [ map { { line => $_ } } split( /\n/, join( '', @report ) ) ] );
409
            $template->param( update_report =>
410
                  [ map { { line => $_ } } split( /\n/, join( '', @report ) ) ]
411
            );
357
            $template->param( has_update_succeeds => 1 );
412
            $template->param( has_update_succeeds => 1 );
358
        } else {
359
            eval{ `rm $logfilepath` };
360
        }
413
        }
361
        open( $fh, "<", $logfilepath_errors ) or die "Cannot open log file $logfilepath_errors: $!";
414
        else {
415
            eval { `rm $logfilepath` };
416
        }
417
        open( $fh, "<", $logfilepath_errors )
418
          or die "Cannot open log file $logfilepath_errors: $!";
362
        @report = <$fh>;
419
        @report = <$fh>;
363
        close $fh;
420
        close $fh;
364
        if (@report) {
421
        if (@report) {
365
            $template->param( update_errors => [ map { { line => $_ } } split( /\n/, join( '', @report ) ) ] );
422
            $template->param( update_errors =>
423
                  [ map { { line => $_ } } split( /\n/, join( '', @report ) ) ]
424
            );
366
            $template->param( has_update_errors => 1 );
425
            $template->param( has_update_errors => 1 );
367
            warn "The following errors were returned while attempting to run the updatedatabase.pl script:\n";
426
            warn
427
"The following errors were returned while attempting to run the updatedatabase.pl script:\n";
368
            foreach my $line (@report) { warn "$line\n"; }
428
            foreach my $line (@report) { warn "$line\n"; }
369
        } else {
429
        }
370
            eval{ `rm $logfilepath_errors` };
430
        else {
431
            eval { `rm $logfilepath_errors` };
371
        }
432
        }
372
        $template->param( $op => 1 );
433
        $template->param( $op => 1 );
373
    }
434
    }
374
    else {
435
    else {
375
        #
436
#
376
        # check whether it's a 1st install or an update
437
# check whether it's a 1st install or an update
377
        #
438
#
378
        #Check if there are enough tables.
439
#Check if there are enough tables.
379
        # Paul has cleaned up tables so reduced the count
440
# Paul has cleaned up tables so reduced the count
380
        #I put it there because it implied a data import if condition was not satisfied.
441
#I put it there because it implied a data import if condition was not satisfied.
381
        my $dbh = DBI->connect(
442
        my $dbh = DBI->connect(
382
    		"DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}"
443
    		"DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}"
383
		. ( $info{port} ? ";port=$info{port}" : "" )
444
		. ( $info{port} ? ";port=$info{port}" : "" )
384
                . ( $info{tlsoptions} ? $info{tlsoptions} : "" ),
445
                . ( $info{tlsoptions} ? $info{tlsoptions} : "" ),
385
            	$info{'user'}, $info{'password'}
446
            	$info{'user'}, $info{'password'}
386
        );
447
        );
387
	my $rq;
448
        my $rq;
388
        if ( $info{dbms} eq 'mysql' ) { $rq = $dbh->prepare( "SHOW TABLES" ); }
449
        if ( $info{dbms} eq 'mysql' ) { $rq = $dbh->prepare("SHOW TABLES"); }
389
	elsif ( $info{dbms} eq 'Pg' ) { $rq = $dbh->prepare( "SELECT *
450
        elsif ( $info{dbms} eq 'Pg' ) {
390
								FROM information_schema.tables
451
            $rq = $dbh->prepare(
391
								WHERE table_schema='public' and table_type='BASE TABLE';" ); }
452
                "SELECT *
453
                FROM information_schema.tables
454
                WHERE table_schema='public' and table_type='BASE TABLE';"
455
            );
456
        }
392
        $rq->execute;
457
        $rq->execute;
393
        my $data = $rq->fetchall_arrayref( {} );
458
        my $data = $rq->fetchall_arrayref( {} );
394
        my $count = scalar(@$data);
459
        my $count = scalar(@$data);
Lines 399-421 elsif ( $step && $step == 3 ) { Link Here
399
            $template->param( "count" => $count, "proposeimport" => 1 );
464
            $template->param( "count" => $count, "proposeimport" => 1 );
400
        }
465
        }
401
        else {
466
        else {
402
            #
467
           #
403
            # we have tables, propose to select files to upload or updatedatabase
468
           # we have tables, propose to select files to upload or updatedatabase
404
            #
469
           #
405
            $template->param( "count" => $count, "default" => 1 );
470
            $template->param( "count" => $count, "default" => 1 );
406
            #
471
     #
407
            # 1st part of step 3 : check if there is a databaseversion systempreference
472
     # 1st part of step 3 : check if there is a databaseversion systempreference
408
            # if there is, then we just need to upgrade
473
     # if there is, then we just need to upgrade
409
            # if there is none, then we need to install the database
474
     # if there is none, then we need to install the database
410
            #
475
     #
411
            if (C4::Context->preference('Version')) {
476
            if ( C4::Context->preference('Version') ) {
412
                my $dbversion = C4::Context->preference('Version');
477
                my $dbversion = C4::Context->preference('Version');
413
                $dbversion =~ /(.*)\.(..)(..)(...)/;
478
                $dbversion =~ /(.*)\.(..)(..)(...)/;
414
                $dbversion = "$1.$2.$3.$4";
479
                $dbversion = "$1.$2.$3.$4";
415
                $template->param("upgrading" => 1,
480
                $template->param(
416
                                "dbversion" => $dbversion,
481
                    "upgrading"   => 1,
417
                                "kohaversion" => Koha::version(),
482
                    "dbversion"   => $dbversion,
418
                                );
483
                    "kohaversion" => Koha::version(),
484
                );
419
            }
485
            }
420
        }
486
        }
421
    }
487
    }
Lines 433-439 else { Link Here
433
        if ( $rq->execute ) {
499
        if ( $rq->execute ) {
434
            my ($version) = $rq->fetchrow;
500
            my ($version) = $rq->fetchrow;
435
            if ($version) {
501
            if ($version) {
436
                print $query->redirect("/cgi-bin/koha/installer/install.pl?step=3");
502
                print $query->redirect(
503
                    "/cgi-bin/koha/installer/install.pl?step=3");
437
                exit;
504
                exit;
438
            }
505
            }
439
        }
506
        }
Lines 441-453 else { Link Here
441
}
508
}
442
output_html_with_http_headers $query, $cookie, $template->output;
509
output_html_with_http_headers $query, $cookie, $template->output;
443
510
444
sub chk_log { #returns a logfile in $dir or - if that failed - in temp dir
511
sub chk_log {    #returns a logfile in $dir or - if that failed - in temp dir
445
    my ($dir, $name) = @_;
512
    my ( $dir, $name ) = @_;
446
    my $fn=$dir.'/'.$name.'.log';
513
    my $fn = $dir . '/' . $name . '.log';
447
    if( ! open my $fh, '>', $fn ) {
514
    if ( !open my $fh, '>', $fn ) {
448
        $name.= '_XXXX';
515
        $name .= '_XXXX';
449
        require File::Temp;
516
        require File::Temp;
450
        ($fh, $fn)= File::Temp::tempfile( $name, TMPDIR => 1, SUFFIX => '.log');
517
        ( $fh, $fn ) =
518
          File::Temp::tempfile( $name, TMPDIR => 1, SUFFIX => '.log' );
519
451
        #if this should not work, let croak take over
520
        #if this should not work, let croak take over
452
    }
521
    }
453
    return $fn;
522
    return $fn;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +1 lines)
Lines 6-12 var debug = "[% debug %]"; Link Here
6
var dformat  = "[% dateformat %]";
6
var dformat  = "[% dateformat %]";
7
var sentmsg = 0;
7
var sentmsg = 0;
8
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
8
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
9
var MSG_PLEASE_ENTER_A_VALID_DATE = _("Please enter a valid date (should match %s).");
9
var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s)."));
10
10
11
function is_valid_date(date) {
11
function is_valid_date(date) {
12
    // An empty string is considered as a valid date for convenient reasons.
12
    // An empty string is considered as a valid date for convenient reasons.
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc (+15 lines)
Lines 1-5 Link Here
1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
2
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
3
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.css" />
4
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap.min.css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/font-awesome/css/font-awesome.min.css" />
6
<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print.css" />
3
<style type="text/css" media="screen">
7
<style type="text/css" media="screen">
4
8
5
[% IF ( login ) %]
9
[% IF ( login ) %]
Lines 69-74 td input { font-size: 1.5em; } Link Here
69
73
70
</style>
74
</style>
71
75
76
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min.js"></script>
77
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min.js"></script>
78
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.js"></script>
79
<script type="text/javascript" src="[% interface %]/lib/shortcut/shortcut.js"></script>
80
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
81
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
82
<script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script>
83
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script>
84
<!-- koha core js -->
85
<script type="text/javascript" src="[% interface %]/[% theme %]/js/staff-global.js"></script>
86
72
<script type="text/javascript">
87
<script type="text/javascript">
73
    //<![CDATA[
88
    //<![CDATA[
74
        function _(s) { return s } // dummy function for gettext
89
        function _(s) { return s } // dummy function for gettext
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (-1 / +1 lines)
Lines 93-99 Link Here
93
                            </li>
93
                            </li>
94
                            <li>
94
                            <li>
95
                                <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
95
                                <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
96
                                <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
96
                                <input type="text" class="enrollmentperiod datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
97
                            </li>
97
                            </li>
98
                        </ol>
98
                        </ol>
99
                    </fieldset>
99
                    </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-122 / +177 lines)
Lines 2-130 Link Here
2
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
2
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
<div>
4
<div>
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 3</h1>
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web  installer &rsaquo; Step 3</h1>
6
6
7
[% IF ( selectframeworks ) %]
7
[% IF ( selectframeworks ) %]
8
    <script type="text/javascript">
8
    <script type="text/javascript">
9
    //<![CDATA[
9
//<![CDATA[
10
10
11
    var surl = unescape(window.location.pathname);
11
var surl = unescape(window.location.pathname);
12
12
13
    function doLoad()
13
function doLoad()
14
    {
14
{
15
        // the timeout value should be the same as in the "refresh" meta-tag
15
    // the timeout value should be the same as in the "refresh" meta-tag
16
        setTimeout( "refresh()", 2*1000 );
16
    setTimeout( "refresh()", 2*1000 );
17
    }
17
}
18
18
19
    function refresh(value)
19
function refresh(value)
20
    {
20
{
21
        //  The argument to the location.reload function determines
21
    //  The argument to the location.reload function determines
22
        //  if the browser should retrieve the document from the
22
    //  if the browser should retrieve the document from the
23
        //  web-server.  In our example all we need to do is cause
23
    //  web-server.  In our example all we need to do is cause
24
        //  the JavaScript block in the document body to be
24
    //  the JavaScript block in the document body to be
25
        //  re-evaluated.  If we needed to pull the document from
25
    //  re-evaluated.  If we needed to pull the document from
26
        //  the web-server again (such as where the document contents
26
    //  the web-server again (such as where the document contents
27
        //  change dynamically) we would pass the argument as 'true'.
27
    //  change dynamically) we would pass the argument as 'true'.
28
        //
28
    //
29
        surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
29
    surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
30
30
31
        window.location.replace( surl );
31
    window.location.replace( surl );
32
    }
32
}
33
33
34
    function selectAllFrameworks()
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++)
35
    {
41
    {
36
        //  A handy short link that selects all available checkboxes
42
        if (checkboxes[i].type == 'checkbox')
37
        //  on the page.
38
        //
39
        var checkboxes = document.getElementsByTagName("input");
40
        for (var i = 0; i < checkboxes.length; i++)
41
        {
43
        {
42
            if (checkboxes[i].type == 'checkbox')
44
            checkboxes[i].checked = true;
43
            {
44
                checkboxes[i].checked = true;
45
            }
46
        }
45
        }
47
48
        //  Prevent event propergation.
49
        return false;
50
    }
46
    }
51
47
52
    function Hide(link)
48
    //  Prevent event propergation.
53
    {
49
    return false;
54
        //  Toggle the display of a given element on the page.
50
}
55
        //
51
56
        subfield = document.getElementById('bloc'+link);
52
function Hide(link)
57
        var initstyle = subfield.style.display;
53
{
58
        if (initstyle == 'block') subfield.style.display = 'none' ;
54
    //  Toggle the display of a given element on the page.
59
        if (initstyle == 'none') subfield.style.display = 'block' ;
55
    //
60
    }
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
61
62
    //]]>
62
//]]>
63
    </script>
63
</script>
64
[% END %]
64
[% END %]
65
66
65
[% IF ( finish ) %]
67
[% IF ( finish ) %]
66
    <h1>Congratulations, installation complete</h1>
68
    <h1>Congratulations, installation complete</h1>
67
    <p>If this page does not redirect in 5 seconds, click <a href="/">here</a>.</p>
69
    <p>If this page does not redirect in 10 seconds, click <a href="/">here</a>.</p>
68
[% END %]
70
[% END %]
71
72
69
[% IF ( choosemarc ) %]
73
[% IF ( choosemarc ) %]
70
    <h2 align="center">Select your MARC flavor</h2>
74
    <h2 align="center">Choose your setup</h2>
75
    <p>Basic setup selects recommended settings by default.</p>
71
    <form name="frameworkselection" method="post" action="install.pl">
76
    <form name="frameworkselection" method="post" action="install.pl">
72
    <input type="hidden" name="step" value="3" />
77
    <input type="hidden" name="step" value="3" />
73
    <input type="hidden" name="op" value="selectframeworks" />
78
    <input type="hidden" name="op" value="selectframeworks"/>
74
    <p>
79
80
    <div>
81
        <input type="radio" name="setup" value="Basic" checked="checked">Basic<br/>
82
        <input type="radio" name="setup" value="Advanced"/>Advanced<br/>
83
    </div>
84
85
    <h2 align="center">Select your MARC flavor</h2>
86
    <p>MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is more commonly used globally, whereas UNIMARC tends to be used in Europe. </p>
87
75
    [% FOREACH flavourloo IN flavourloop %]
88
    [% FOREACH flavourloo IN flavourloop %]
76
    <div>
89
    <div>
77
            [% IF ( flavourloo.checked ) %]
90
            [% IF ( flavourloo.label == "Unimarc") %]
78
                <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked /> [% flavourloo.label %] <br/>
91
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]<br/>
79
            [% ELSE %]
92
            [% ELSE %]
80
                <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/>
93
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
81
            [% END %]
94
            [% END %]
82
    </div>
95
    </div>
83
    [% END %]
96
    [% END %]
84
    </p>
97
85
    <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
98
        <p>Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
99
86
    </form>
100
    </form>
101
87
[% END %]
102
[% END %]
88
103
89
[% IF ( selectframeworks ) %]
104
[% IF ( selectframeworks ) %]
90
    <h2 align="center">Selecting Default Settings</h2>
105
        <h2 align= "center"> [% setup %] setup</h2>
91
    <script type="text/javascript">
106
        <h2 align="center">Selecting Default Settings</h2>
92
        var linklabel = _("Select all sample data");
93
        document.write('<p><a href="#" onclick="return selectAllFrameworks();">'+linklabel+'</a></p>');
94
    </script>
95
    <form name="frameworkselection" method="post" action="install.pl">
96
    <input type="hidden" name="step" value="3" />
97
    <input type="hidden" name="op" value="addframeworks" />
98
107
108
        [% IF setup == "Advanced" %]
109
            <script type="text/javascript">
110
                var linklabel = _("Select all options");
111
                document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
112
            </script>
113
        [% END %]
114
        <form name="frameworkselection" method="post" action="install.pl">
115
            <input type="hidden" name="step" value="3" />
116
            <input type="hidden" name="op" value="addframeworks" />
99
    [% IF ( frameworksloop ) %]
117
    [% IF ( frameworksloop ) %]
100
    <h2>MARC frameworks: [% marcflavour %]</h2>
118
        <h2>MARC frameworks: [% marcflavour %]</h2>
101
    [% IF ( en_marc_frameworks ) %]
119
        [% IF ( en_marc_frameworks ) %]
102
        <h4><span class="error">No MARC frameworks are available for your language.
120
            <h4><span class="error">No MARC frameworks are available for your language.
103
                Defaulting to the frameworks supplied for English (en)<span></h4>
121
                    Defaulting to the frameworks supplied for English (en)<span></h4>
104
    [% END %]
122
        [% END %]
105
    [% FOREACH frameworksloo IN frameworksloop %]
123
        [% FOREACH frameworksloo IN frameworksloop %]
106
    <div>
124
           <div>
107
    <h3>[% frameworksloo.label %]</h3>
125
           <h3>[% frameworksloo.label %]</h3>
108
    [% FOREACH framework IN frameworksloo.frameworks %]
126
           [% FOREACH framework IN frameworksloo.frameworks %]
109
        <table style="border:1px;vertical-align:top;">
127
                <table style="border:1px;vertical-align:top;">
110
        <tr>
128
                <tr>
111
        <td style="vertical-align:top;">
129
                    <td style = "border:1px; vertical-align:top;">
112
            [% IF ( framework.checked ) %]
130
                        [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
113
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
131
                            <input type="hidden" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
114
            [% ELSE %]
132
                        [% ELSE %]
115
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
133
                            <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
116
            [% END %]
134
                        [% END %]
117
        </td>
135
                    </td>
118
        <td>
136
                    <td>
119
            <label for="[% framework.fwkname %]">
137
                    [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
120
                [% framework.fwkdescription %]
138
                        <ul>
121
                <em>([% framework.fwkname %])</em>
139
                            <li>
122
            </label>
140
                                <label for="[% framework.fwkname %]">
123
        </td>
141
                                    [% framework.fwkdescription %]
124
        </table>
142
                                    <em>([% framework.fwkname %])</em>
125
    [% END %]
143
                                </label>
126
    </div>
144
                            </li>
127
    [% END %]
145
                        </ul>
146
                    </td>
147
                    [% ELSE %]
148
                    <td>
149
                        <label for= "[% framework.fwkname %]">
150
                            [% framework.fwkdescription %]
151
                            <em>([% framework.fwkname %])</em>
152
                        </label>
153
                    </td>
154
                    [% END %]
155
                </tr>
156
                </table>
157
           [% END %]
158
           </div>
159
        [% END %]
128
    <h2>Other data</h2>
160
    <h2>Other data</h2>
129
    [% END %]
161
    [% END %]
130
    [% IF ( en_sample_data ) %]
162
    [% IF ( en_sample_data ) %]
Lines 132-158 Link Here
132
                Defaulting to the samples supplied for English (en)<span></h4>
164
                Defaulting to the samples supplied for English (en)<span></h4>
133
    [% END %]
165
    [% END %]
134
    [% FOREACH levelloo IN levelloop %]
166
    [% FOREACH levelloo IN levelloop %]
135
    <div>
167
        <div>
136
    <h3>[% levelloo.label %]</h3>
168
        <h3>[% levelloo.label %]</h3>
137
    [% FOREACH framework IN levelloo.frameworks %]
169
138
        <table style="border:1px;vertical-align:top;">
170
        [% IF (setup == "Basic" && levelloo.label == "Optional") %]
139
        <tr>
171
            <script type="text/javascript">
140
        <td style="vertical-align:top;">
172
                var linklabel = _("Select all options");
141
            [% IF ( framework.checked ) %]
173
                document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
142
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
174
            </script>
143
            [% ELSE %]
175
        [% END %]
144
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
176
145
            [% END %]
177
        [% FOREACH framework IN levelloo.frameworks %]
146
        </td>
178
            <table style="border:1px;vertical-align:top;">
147
        <td>
179
            <tr>
148
            <label for="[% framework.fwkname %]">
180
                <td style="vertical-align:top;">
149
                [% framework.fwkdescription %]
181
                [% IF (levelloo.label == "Default" ) && (setup=="Basic")%]
150
                <em>([% framework.fwkname %])</em>
182
                     <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
151
            </label>
183
                [% ELSE %]
152
        </td>
184
                     <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]"/>
153
        </table>
185
                [% END %]
154
    [% END %]
186
                </td>
155
    </div>
187
                <td>
188
                [% IF (levelloo.label == "Default") && (setup=="Basic")%]
189
                <ul>
190
                    <li>
191
                        <label for="[% framework.fwkname %]">
192
                            [% framework.fwkdescription %]
193
                            <em>([% framework.fwkname %])</em>
194
                        </label>
195
                    </li>
196
                </ul>
197
                </td>
198
                [% ELSE %]
199
                <td>
200
                    <label for= "[% framework.fwkname %]">
201
                        [% framework.fwkdescription %]
202
                        <em>([% framework.fwkname %])</em>
203
                    </label>
204
                </td>
205
                [% END %]
206
            </tr>
207
            </table>
208
        [% END %]
209
        </div>
156
    [% END %]
210
    [% END %]
157
    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
211
    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
158
    please be patient.</p>
212
    please be patient.</p>
Lines 181-187 Link Here
181
        <form name="finish">
235
        <form name="finish">
182
        <input type="hidden" name="step" value="3" />
236
        <input type="hidden" name="step" value="3" />
183
        <input type="hidden" name="op" value="finish" />
237
        <input type="hidden" name="op" value="finish" />
184
        <input type="submit" value="Finish" /></form>
238
        <input type="submit" value="Set up Koha with the onboarding tool"/>
239
        </form>
185
        </p>
240
        </p>
186
    </p>
241
    </p>
187
[% END %]
242
[% END %]
Lines 214-235 Link Here
214
    </form>
269
    </form>
215
[% END %]
270
[% END %]
216
271
217
218
[% IF ( default ) %]
272
[% IF ( default ) %]
219
    [% IF ( upgrading ) %]
273
    [% IF ( upgrading ) %]
220
        <p>
274
        <p>
221
            We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must <a href="install.pl?step=3&amp;op=updatestructure" class="button">update your database</a>
275
            We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database.
276
        <br>
277
        <a href="install.pl?step=3&amp;op=updatestructure" class="button"><button>Update Database</button></a>
222
        </p>
278
        </p>
223
    [% ELSE %]
279
    [% ELSE %]
224
        <p>We are ready to do some basic configuration. Please
280
        <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation:
225
            <a href="install.pl?step=3&amp;op=choosemarc" class="button">install basic configuration settings</a>
281
        <br>
226
            to continue the installation.
282
        <br>
227
        </p>
283
            <a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Install Basic Configuration Settings</button></a>
284
228
    [% END %]
285
    [% END %]
229
[% END %]
286
[% END %]
230
287
231
232
233
[% IF ( updatestructure ) %]
288
[% IF ( updatestructure ) %]
234
  <div><h2 align="center">Updating database structure</h2>
289
  <div><h2 align="center">Updating database structure</h2>
235
  [% IF ( has_update_succeeds ) %]
290
  [% IF ( has_update_succeeds ) %]
Lines 251-257 Link Here
251
 [% UNLESS ( has_update_errors ) %]
306
 [% UNLESS ( has_update_errors ) %]
252
    <p>Everything went OK, update done.</p>
307
    <p>Everything went OK, update done.</p>
253
  [% END %]
308
  [% END %]
254
<a href="install.pl?step=3&amp;op=finished" class="button">Continue to log in to Koha</a>
309
<a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Back to Installation</button></a>
255
  </div>
310
  </div>
256
[% END %]
311
[% END %]
257
312
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-2 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
2
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha staff client</title>
2
<title>Koha staff client</title>
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/mainpage.css" />
3
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/mainpage.css" />
(-)a/xt/sample_notices.t (-2 / +1 lines)
Lines 22-28 use Test::More qw(no_plan); Link Here
22
22
23
23
24
my $root_dir = 'installer/data/mysql';
24
my $root_dir = 'installer/data/mysql';
25
my $base_notices_file = "en/mandatory/sample_notices.sql";
25
my $base_notices_file = "en/default/sample_notices.sql";
26
my @trans_notices_files = qw(
26
my @trans_notices_files = qw(
27
    fr-FR/1-Obligatoire/sample_notices.sql
27
    fr-FR/1-Obligatoire/sample_notices.sql
28
    fr-CA/obligatoire/sample_notices.sql
28
    fr-CA/obligatoire/sample_notices.sql
29
- 

Return to bug 18346