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

(-)a/installer/onboarding.pl (-3 / +34 lines)
Lines 31-36 use Koha::Patrons; Link Here
31
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
use Koha::IssuingRules;
33
use Koha::IssuingRules;
34
use Locale::Country;
34
35
35
#Setting variables
36
#Setting variables
36
my $input = new CGI;
37
my $input = new CGI;
Lines 271-284 if ( $step == 5 ) { Link Here
271
    }
272
    }
272
273
273
    $step++ if Koha::IssuingRules->count;
274
    $step++ if Koha::IssuingRules->count;
275
276
} if ($step == 6) {
277
    if ( $op eq 'add_usage_data_sysprefs') {
278
        my $usagestats = $input->param('usagestats');
279
        my $usagestatscountry = $input->param('usagestatscountry');
280
        my $usagestatslibraryname = $input->param('usagestatslibraryname');
281
        my $usagestatscountrytype = $input->param('usagestatscountrytype');
282
        my $usagestatslibraryurl = $input->param('usagestatslibraryurl');
283
284
        my %statsprefvalues = (
285
            "UsageStats"    => $usagestats,
286
            "UsageStatsCountry"  => $usagestatscountry,
287
            "UsageStatsLibraryName"   => $usagestatslibraryname,
288
            "UsageStatsCountryType"   => $usagestatscountrytype,
289
            "UsageStatsLibraryURL"    => $usagestatslibraryurl,
290
        );
291
292
        #Loop through the HEA syspref key value pairs
293
        while(my($pref, $value) = each %statsprefvalues ) {
294
            C4::Context->set_preference( $pref, $value );
295
        }
296
        unless ($@) {
297
            push @messages, { code => 'success_on_insert_circ_rule'};
298
        }
299
        else {
300
            push @messages, { code => 'error_on_insert_circ_rule' };
301
        }
302
        $step++;
303
        warn $op;
304
    }
274
}
305
}
275
306
276
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
307
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
277
$template_params->{libraries}   = $libraries;
308
$template_params->{libraries}   = $libraries;
278
309
279
if ( $step > 5 ) {
310
if ( $step > 6 ) {
280
    $template_params->{all_done} = 1;    # If step 5 is complete, we are done!
311
    $template_params->{all_done} = 1;    # If step 6 is complete, we are done!
281
    $step = 5;
312
    $step = 6;
282
}
313
}
283
314
284
#Getting the appropriate template to display to the user
315
#Getting the appropriate template to display to the user
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-15 lines)
Lines 1-10 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Web installer &rsaquo;
2
<title>Koha &rsaquo; Web installer &rsaquo;
3
    [% IF all_done %]
4
        Complete
5
    [% ELSE %]
6
        Create circulation rule
3
        Create circulation rule
7
    [% END %]
8
</title>
4
</title>
9
[% INCLUDE 'installer-doc-head-close.inc' %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
10
[% INCLUDE 'validator-strings.inc' %]
6
[% INCLUDE 'validator-strings.inc' %]
Lines 18-32 Link Here
18
            <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
14
            <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
19
                <h1 id="logo"><a href="#">Koha</a></h1>
15
                <h1 id="logo"><a href="#">Koha</a></h1>
20
16
21
                [% IF all_done %]
22
23
                    <h2>Web installer &rsaquo; Complete</h2>
24
                    [% INCLUDE 'onboarding_messages.inc' %]
25
                    <h3>Congratulations you have finished and are ready to use Koha</h3>
26
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
27
28
                [% ELSE %]
29
30
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
17
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
31
18
32
                    [% INCLUDE 'onboarding_messages.inc' %]
19
                    [% INCLUDE 'onboarding_messages.inc' %]
Lines 131-137 Link Here
131
118
132
                        <input type="submit" class="btn btn-primary" value="Submit" />
119
                        <input type="submit" class="btn btn-primary" value="Submit" />
133
                    </form>
120
                    </form>
134
                [% END %]
135
            </div> <!-- / #onboarding-step5 -->
121
            </div> <!-- / #onboarding-step5 -->
136
        </div> <!-- / .row -->
122
        </div> <!-- / .row -->
137
123
138
- 

Return to bug 21265