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

(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 304-310 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
304
('MaxSearchResultsItemsPerRecordStatusCheck','20','','Max number of items per record for which to check transit and hold status','Integer'),
304
('MaxSearchResultsItemsPerRecordStatusCheck','20','','Max number of items per record for which to check transit and hold status','Integer'),
305
('MembershipExpiryDaysNotice','',NULL,'Send an account expiration notice that a patron\'s card is about to expire after','Integer'),
305
('MembershipExpiryDaysNotice','',NULL,'Send an account expiration notice that a patron\'s card is about to expire after','Integer'),
306
('MergeReportFields','',NULL,'Displayed fields for deleted MARC records after merge','Free'),
306
('MergeReportFields','',NULL,'Displayed fields for deleted MARC records after merge','Free'),
307
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
307
('minPasswordLength','8',NULL,'Specify the minimum length of a patron/staff password','free'),
308
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
308
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
309
('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'),
309
('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'),
310
('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
310
('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
(-)a/installer/onboarding.pl (-2 / +20 lines)
Lines 290-301 if ( $step == 5 ) { Link Here
290
    $step++ if Koha::IssuingRules->count;
290
    $step++ if Koha::IssuingRules->count;
291
}
291
}
292
292
293
if ( $step == 6 ) {
294
    if ( $op eq 'set_validate_min_password_length' ) {
295
        my $minPasswordLength   = $input->param('pref_minPasswordLength');
296
        warn $minPasswordLength;
297
        C4::Context->set_preference( 'minPasswordLength', $minPasswordLength );
298
        unless ($@) {
299
            push @messages, { code => 'success_on_update_minPasswordLength_syspref' };
300
            $step++;
301
        }
302
        else {
303
            push @messages, { code => 'error_on_update_minPasswordLength_syspref' };
304
        }
305
    }
306
}
307
293
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
308
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
294
$template_params->{libraries}   = $libraries;
309
$template_params->{libraries}   = $libraries;
295
310
296
if ( $step > 5 ) {
311
my $minPasswordLength = C4::Context->preference('minPasswordLength');
312
$template_params->{minPasswordLength} = $minPasswordLength;
313
314
if ( $step > 6 ) {
297
    $template_params->{all_done} = 1;    # If step 5 is complete, we are done!
315
    $template_params->{all_done} = 1;    # If step 5 is complete, we are done!
298
    $step = 5;
316
    $step = 6;
299
}
317
}
300
318
301
#Getting the appropriate template to display to the user
319
#Getting the appropriate template to display to the user
(-)a/koha-tmpl/intranet-tmpl/prog/css/installer.css (+4 lines)
Lines 241-243 span.breadcrumbs { Link Here
241
.deselectall.optional {
241
.deselectall.optional {
242
    display: none;
242
    display: none;
243
}
243
}
244
245
#passwordlengthhint {
246
    color:red;
247
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc (+4 lines)
Lines 33-37 Link Here
33
        [% CASE 'ERROR_password_has_whitespaces' %]
33
        [% CASE 'ERROR_password_has_whitespaces' %]
34
            <div class="alert alert-danger">The patron has not been created the entered password contained whitespaces</div>
34
            <div class="alert alert-danger">The patron has not been created the entered password contained whitespaces</div>
35
        [% CASE %][% message | html %]
35
        [% CASE %][% message | html %]
36
        [% CASE 'success_on_update_minPasswordLength_syspref' %]
37
            <div class="alert alert-success">Minimum password length set!</div>
38
        [% CASE 'error_on_update_minPasswordLength_syspref' %]
39
            <div class="alert alert-danger">Minimum password length not set!</div>
36
    [% END %]
40
    [% END %]
37
[% END %]
41
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-10 lines)
Lines 15-29 Link Here
15
            <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
15
            <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
16
                <h1 id="logo"><a href="#">Koha</a></h1>
16
                <h1 id="logo"><a href="#">Koha</a></h1>
17
17
18
                [% IF all_done %]
19
20
                    <h2>Web installer &rsaquo; Complete</h2>
21
                    [% INCLUDE 'onboarding_messages.inc' %]
22
                    <h3>Congratulations you have finished and are ready to use Koha</h3>
23
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
24
25
                [% ELSE %]
26
27
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
18
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
28
19
29
                    [% INCLUDE 'onboarding_messages.inc' %]
20
                    [% INCLUDE 'onboarding_messages.inc' %]
Lines 128-134 Link Here
128
119
129
                        <input type="submit" class="btn btn-primary" value="Submit" />
120
                        <input type="submit" class="btn btn-primary" value="Submit" />
130
                    </form>
121
                    </form>
131
                [% END %]
132
            </div> <!-- / #onboarding-step5 -->
122
            </div> <!-- / #onboarding-step5 -->
133
        </div> <!-- / .row -->
123
        </div> <!-- / .row -->
134
    </div><!-- / .container-fluid -->
124
    </div><!-- / .container-fluid -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt (-1 / +53 lines)
Line 0 Link Here
0
- 
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Web installer &rsaquo;
3
    [% IF all_done %]
4
        Complete
5
    [% ELSE %]
6
        Create circulation rule
7
    [% END %]
8
</title>
9
[% INCLUDE 'installer-doc-head-close.inc' %]
10
[% INCLUDE 'validator-strings.inc' %]
11
[% INCLUDE 'installer-strings.inc' %]
12
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
13
</head>
14
15
<body id="installer" class="installer">
16
    <div class="container-fluid">
17
        <div class="row">
18
            <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>
20
                [% IF all_done %]
21
                    <h2>Web installer &rsaquo; Complete</h2>
22
                    [% INCLUDE 'onboarding_messages.inc' %]
23
                    <h3>Congratulations you have finished and are ready to use Koha</h3>
24
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
25
                [% ELSE %]
26
                    <h2>Web installer &rsaquo; Set minPasswordLength system preference </h2>
27
                    [% INCLUDE 'onboarding_messages.inc' %]
28
29
                    The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to.
30
31
                    <form name="setMinPasswordLength" method="post" action="onboarding.pl">
32
                        <fieldset class="rows">
33
                            <input type="hidden" name="step" value="6"/>
34
                            <input type="hidden" name="op" value="set_validate_min_password_length" />
35
                            <ol>
36
                                <li>
37
                                    <label for="minPasswordname" class="required"> Set your minPasswordLength</label>
38
                                    <input type="number" id="pref_minPasswordLength" name="pref_minPasswordLength" value="[% minPasswordLength%]" min=1></input>
39
                                    <span class="required">Required</span>
40
                                </li>
41
                            </ol>
42
                            <p>
43
                               To amend the minPasswordLength system preference go to:
44
                               <span class="breadcrumbs">Administration &rsaquo; Global system preferences &rsaquo; Patrons </span>
45
                            </p>
46
                        </fieldset>
47
                        <input type="submit" class="btn btn-primary" value="Submit" />
48
                    </form>
49
                [% END %]
50
            </div> <!-- / #onboarding-step6 -->
51
        </div> <!-- / .row -->
52
53
[% INCLUDE 'intranet-bottom.inc' %]

Return to bug 6473