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

(-)a/installer/onboarding.pl (-20 / +20 lines)
Lines 136-142 if ( $step == 2 ) { Link Here
136
136
137
    $step++ if Koha::Patron::Categories->count;
137
    $step++ if Koha::Patron::Categories->count;
138
}
138
}
139
139
if ( $step == 3 ) {
140
if ( $step == 3 ) {
141
    if ( $op eq 'set_validate_min_password_length' ) {
142
        my $minPasswordLength   = $input->param('pref_minPasswordLength');
143
        C4::Context->set_preference( 'minPasswordLength', $minPasswordLength );
144
        unless ($@) {
145
            push @messages, { code => 'success_on_update_minPasswordLength_syspref' };
146
            $step++;
147
        }
148
        else {
149
            push @messages, { code => 'error_on_update_minPasswordLength_syspref' };
150
        }
151
    } 
152
}
153
154
if ( $step == 4 ) {
140
    if ( $op eq 'add_validate_patron' ) {
155
    if ( $op eq 'add_validate_patron' ) {
141
156
142
        #Create a patron
157
        #Create a patron
Lines 202-208 if ( $step == 3 ) { Link Here
202
217
203
    $step++ if Koha::Patrons->search( { flags => 1 } )->count;
218
    $step++ if Koha::Patrons->search( { flags => 1 } )->count;
204
}
219
}
205
if ( $step == 4 ) {
220
221
if ( $step == 5 ) {
206
    if ( $op eq 'add_validate_itemtype' ) {
222
    if ( $op eq 'add_validate_itemtype' ) {
207
        my $description   = $input->param('description');
223
        my $description   = $input->param('description');
208
        my $itemtype_code = $input->param('itemtype');
224
        my $itemtype_code = $input->param('itemtype');
Lines 226-234 if ( $step == 4 ) { Link Here
226
242
227
    $step++ if Koha::ItemTypes->count;
243
    $step++ if Koha::ItemTypes->count;
228
}
244
}
229
if ( $step == 5 ) {
230
245
231
    if ( $op eq 'add_validate_circ_rule' ) {
246
if ( $step == 6 ) {
247
   if ( $op eq 'add_validate_circ_rule' ) {
232
248
233
        #If no libraries exist then set the $branch value to *
249
        #If no libraries exist then set the $branch value to *
234
        my $branch = $input->param('branch') || '*';
250
        my $branch = $input->param('branch') || '*';
Lines 286-310 if ( $step == 5 ) { Link Here
286
            }
302
            }
287
        }
303
        }
288
    }
304
    }
289
290
    $step++ if Koha::IssuingRules->count;
305
    $step++ if Koha::IssuingRules->count;
291
}
306
}
292
307
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
308
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
308
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
309
$template_params->{libraries}   = $libraries;
309
$template_params->{libraries}   = $libraries;
310
310
Lines 312-318 my $minPasswordLength = C4::Context->preference('minPasswordLength'); Link Here
312
$template_params->{minPasswordLength} = $minPasswordLength;
312
$template_params->{minPasswordLength} = $minPasswordLength;
313
313
314
if ( $step > 6 ) {
314
if ( $step > 6 ) {
315
    $template_params->{all_done} = 1;    # If step 5 is complete, we are done!
315
    $template_params->{all_done} = 1;    # If step 6 is complete, we are done!
316
    $step = 6;
316
    $step = 6;
317
}
317
}
318
318
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-103 / +30 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
2
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Web installer &rsaquo; Create Koha administrator patron</title>
2
<title>Koha &rsaquo; Web installer &rsaquo;
3
    [% IF all_done %]
4
        Complete
5
    [% ELSE %]
6
        Create circulation rule
7
    [% END %]
8
</title>
4
[% INCLUDE 'installer-doc-head-close.inc' %]
9
[% INCLUDE 'installer-doc-head-close.inc' %]
5
</head>
10
</head>
6
11
Lines 9-122 Link Here
9
        <div class="row">
14
        <div class="row">
10
            <div id="onboarding-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
15
            <div id="onboarding-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
11
                <h1 id="logo"><a href="#">Koha</a></h1>
16
                <h1 id="logo"><a href="#">Koha</a></h1>
12
                <h2>Web installer &rsaquo; Create Koha administrator patron</h2>
17
                <h2>Web installer &rsaquo; Set minPasswordLength system preference </h2>
13
18
                    [% INCLUDE 'onboarding_messages.inc' %]
14
                [% INCLUDE 'onboarding_messages.inc' %]
19
15
20
                    The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to.
16
                <p>
21
17
                Now we will create a patron with superlibrarian permissions. Log in with this to access Koha as a staff member with all permissions.
22
                    <form name="setMinPasswordLength" method="post" action="onboarding.pl">
18
                </p>
23
                        <fieldset class="rows">
19
                <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
24
                            <input type="hidden" name="step" value="3"/>
20
                    <fieldset class="rows">
25
                            <input type="hidden" name="op" value="set_validate_min_password_length" />
21
                        <input type="hidden" name="step" value="3" />
26
                            <ol>
22
                        <input type="hidden" name="op" value="add_validate_patron" />
27
                                <li>
23
                        <h3>Administrator identity</h3>
28
                                    <label for="minPasswordname" class="required"> Set your minPasswordLength</label>
24
                        <ol>
29
                                    <input type="number" id="pref_minPasswordLength" name="pref_minPasswordLength" value="[% minPasswordLength%]" min=1></input>
25
                            <li>
30
                                    <span class="required">Required</span>
26
                                <label for="surname" class="required">Surname: </label>
31
                                </li>
27
                                <input type="text" id="surname" name="surname" value="[% surname | html %]" class="required" required="required" />
32
                            </ol>
28
                                <span class="required">Required</span>
33
                            <p>
29
                            </li>
34
                               To amend the minPasswordLength system preference go to:
30
                            <li>
35
                               <span class="breadcrumbs">Administration &rsaquo; Global system preferences &rsaquo; Patrons </span>
31
                                <label for="firstname" class="required">First name: </label>
36
                            </p>
32
                                <input  type="text" name="firstname" id="firstname" size="20" value="[% firstname | html %]" class="required" required="required">
37
                        </fieldset>
33
                                <span class="required">Required</span>
38
                        <input type="submit" class="btn btn-primary" value="Submit" />
34
                            </li>
39
                    </form>
35
                        </ol>
36
37
                        <ol>
38
                            <li>
39
                                <label for="cardnumber" class="required">Card number: </label>
40
                                [% IF patrons && patrons > 1 %]
41
                                    <input type="text" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
42
                                [% ELSE %]
43
                                    <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
44
                                [% END %]
45
                                <span class="required">Required</span>
46
                            </li>
47
                            <li>
48
49
                                <!--require a foreach loop to get all the values for the library that the user has either imported (in web installer) or created in the first step of this onboarding tool-->
50
                                <label for="libraries" class="required"> Library: </label>
51
                                <select name="libraries" size="1" id="libraries">
52
                                    [% FOREACH library IN libraries %]
53
                                        <option value="[% library.branchcode | html %]"> [% library.branchname | html %] </option>
54
                                    [% END %]
55
                                </select>
56
                                <span class="required"> Required</span>
57
                            </li>
58
                            <li>
59
                                <label for="categorycode_entry" class="required"> Patron category</label>
60
                                <select id="categorycode_entry" name="categorycode_entry">
61
                                    [% FOREACH category IN categories %]
62
                                        <option value = "[% category.categorycode | html %]">[% category.description | html %]</option>
63
                                    [% END %]
64
                                </select>
65
                                <span class="required">Required</span><br><br>
66
                                <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
67
                            </li>
68
                        </ol>
69
70
                            <h3>Administrator account permissions</h3>
71
                        <ol>
72
                            <li>
73
                                <input type="hidden" name="newflags" value="1" />
74
                                <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian" />
75
                                <code> superlibrarian</code>
76
                            </li>
77
                        </ol>
78
79
                            <h3>Administrator login</h3>
80
                        <ol>
81
                            <li>
82
                                <label for="userid" class="required">Username: </label>
83
                                <input type="text" name="userid" id ="userid" size="20" value="[% userid | html %]" class="required" required="required" />
84
                                <span class="required">Required</span>
85
                            </li>
86
                            <li>
87
                                <label for="password" class="required">Password: </label>
88
                                <input type="password" name="password" id="password" size="20" value="[% member.password | html %]" class="required" required="required">
89
                                <span class="required">Required</span>
90
                            </li>
91
                            <li>
92
                                <label for="password2" class="required">Confirm password: </label>
93
                                <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
94
                                <span class="required">Required</span>
95
                            </li>
96
                        </ol>
97
                        <p>
98
                            To create another patron, go to:
99
                            <span class="breadcrumbs">Patrons &rsaquo; New patron</span>
100
                        </p>
101
                        <p>
102
                            To edit patron permissions, go to:
103
                            <span class="breadcrumbs">More &rsaquo; Set permissions</span>
104
                        </p>
105
                    </fieldset>
106
107
                    <input type="submit" class="btn btn-primary" value="Submit" />
108
                </form>
109
            </div> <!-- / #onboarding-step3 -->
40
            </div> <!-- / #onboarding-step3 -->
110
        </div> <!-- / .row -->
41
        </div> <!-- / .row -->
111
    </div><!-- / .container-fluid -->
112
42
113
[% MACRO jsinclude BLOCK %]
43
[% MACRO jsinclude BLOCK %]
114
    [% INCLUDE 'validator-strings.inc' %]
44
    [% INCLUDE 'validator-strings.inc' %]
115
    [% INCLUDE 'installer-strings.inc' %]
45
    [% INCLUDE 'installer-strings.inc' %]
116
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
46
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
117
    [% PROCESS 'password_check.inc' %]
118
    [% PROCESS 'add_password_check' new_password => 'password' %]
119
[% END %]
47
[% END %]
120
48
121
[% INCLUDE 'installer-intranet-bottom.inc' %]
49
[% INCLUDE 'installer-intranet-bottom.inc' %]
122
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-18 / +85 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Web installer &rsaquo; Create a new item type </title>
3
<title>Koha &rsaquo; Web installer &rsaquo; Create Koha administrator patron</title>
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'installer-doc-head-close.inc' %]
4
</head>
5
</head>
5
6
Lines 8-46 Link Here
8
        <div class="row">
9
        <div class="row">
9
            <div id="onboarding-step4" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
10
            <div id="onboarding-step4" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
10
                <h1 id="logo"><a href="#">Koha</a></h1>
11
                <h1 id="logo"><a href="#">Koha</a></h1>
11
                <h2>Web installer &rsaquo; Create a new item type </h2>
12
                <h2>Web installer &rsaquo; Create Koha administrator patron</h2>
12
13
13
                [% INCLUDE 'onboarding_messages.inc' %]
14
                [% INCLUDE 'onboarding_messages.inc' %]
14
15
15
                <!--Create a item type screen 1-->
16
                <p>
16
17
                Now we will create a patron with superlibrarian permissions. Log in with this to access Koha as a staff member with all permissions.
17
                    <p> Item types are used to group related items. Examples of item types might be books, CDs, or DVDs.</p>
18
                </p>
18
                    <p> When adding to your institution's catalog you will create an item of a particular item type.</p>
19
                <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
19
                    <p> Importantl: Item types are what you apply circulation rules to. Circulation rules govern how your institution will lend its items: Checkout length, renewal policy, hold policy, etc. For example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for checking out any DVD.</p>
20
21
                    <form id="createitemform" method="post" action="onboarding.pl">
22
                    <fieldset class="rows">
20
                    <fieldset class="rows">
23
                        <input type="hidden" name="step" value="4" />
21
                        <input type="hidden" name="step" value="4" />
24
                        <input type="hidden" name="op" value="add_validate_itemtype" />
22
                        <input type="hidden" name="op" value="add_validate_patron" />
23
                        <h3>Administrator identity</h3>
25
                        <ol>
24
                        <ol>
26
                            <li>
25
                            <li>
27
                                <label for="itemtype" class="required">Item type code: </label>
26
                                <label for="surname" class="required">Surname: </label>
28
                                <input type="text" name="itemtype" pattern="[0-9A-Za-z]{1,10}" id="itemtype" size="10" maxlength="10"  class="required" required="required" value="[% itemtype.itemtype | html %]" />
27
                                <input type="text" id="surname" name="surname" value="[% surname | html %]" class="required" required="required" />
28
                                <span class="required">Required</span>
29
                            </li>
30
                            <li>
31
                                <label for="firstname" class="required">First name: </label>
32
                                <input  type="text" name="firstname" id="firstname" size="20" value="[% firstname | html %]" class="required" required="required">
29
                                <span class="required">Required</span>
33
                                <span class="required">Required</span>
30
                            </li>
34
                            </li>
35
                        </ol>
31
36
37
                        <ol>
32
                            <li>
38
                            <li>
33
                                <label for="description" class="required">Description: </label>
39
                                <label for="cardnumber" class="required">Card number: </label>
34
                                <input type="text" name="description" id="description" size="42" value="[% itemtype.description | html %]" class="required" required="required">
40
                                [% IF patrons && patrons > 1 %]
41
                                    <input type="text" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
42
                                [% ELSE %]
43
                                    <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
44
                                [% END %]
35
                                <span class="required">Required</span>
45
                                <span class="required">Required</span>
36
                            </li>
46
                            </li>
47
                            <li>
48
49
                                <!--require a foreach loop to get all the values for the library that the user has either imported (in web installer) or created in the first step of this onboarding tool-->
50
                                <label for="libraries" class="required"> Library: </label>
51
                                <select name="libraries" size="1" id="libraries">
52
                                    [% FOREACH library IN libraries %]
53
                                        <option value="[% library.branchcode | html %]"> [% library.branchname | html %] </option>
54
                                    [% END %]
55
                                </select>
56
                                <span class="required"> Required</span>
57
                            </li>
58
                            <li>
59
                                <label for="categorycode_entry" class="required"> Patron category</label>
60
                                <select id="categorycode_entry" name="categorycode_entry">
61
                                    [% FOREACH category IN categories %]
62
                                        <option value = "[% category.categorycode | html %]">[% category.description | html %]</option>
63
                                    [% END %]
64
                                </select>
65
                                <span class="required">Required</span><br><br>
66
                                <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
67
                            </li>
37
                        </ol>
68
                        </ol>
38
69
39
                        <p> To create another item type later and for more settings go to:
70
                            <h3>Administrator account permissions</h3>
40
                            <span class="breadcrumbs"> Administration &rsaquo; Item types </span>
71
                        <ol>
72
                            <li>
73
                                <input type="hidden" name="newflags" value="1" />
74
                                <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian" />
75
                                <code> superlibrarian</code>
76
                            </li>
77
                        </ol>
78
79
                            <h3>Administrator login</h3>
80
                        <ol>
81
                            <li>
82
                                <label for="userid" class="required">Username: </label>
83
                                <input type="text" name="userid" id ="userid" size="20" value="[% userid | html %]" class="required" required="required" />
84
                                <span class="required">Required</span>
85
                            </li>
86
                            <li>
87
                                <label for="password" class="required">Password: </label>
88
                                <input type="password" name="password" id="password" size="20" value="[% member.password | html %]" class="required" required="required">
89
                                <span class="required">Required</span>
90
                            </li>
91
                            <li>
92
                                <label for="password2" class="required">Confirm password: </label>
93
                                <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
94
                                <span class="required">Required</span>
95
                            </li>
96
                        </ol>
97
                        <p>
98
                            To create another patron, go to:
99
                            <span class="breadcrumbs">Patrons &rsaquo; New patron</span>
100
                        </p>
101
                        <p>
102
                            To edit patron permissions, go to:
103
                            <span class="breadcrumbs">More &rsaquo; Set permissions</span>
41
                        </p>
104
                        </p>
42
                        <input type="submit" class="btn btn-primary" value="Submit" />
43
                    </fieldset>
105
                    </fieldset>
106
107
                    <input type="submit" class="btn btn-primary" value="Submit" />
44
                </form>
108
                </form>
45
            </div> <!-- / #onboarding-step4 -->
109
            </div> <!-- / #onboarding-step4 -->
46
        </div> <!-- / .row -->
110
        </div> <!-- / .row -->
Lines 50-55 Link Here
50
    [% INCLUDE 'validator-strings.inc' %]
114
    [% INCLUDE 'validator-strings.inc' %]
51
    [% INCLUDE 'installer-strings.inc' %]
115
    [% INCLUDE 'installer-strings.inc' %]
52
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
116
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
117
    [% PROCESS 'password_check.inc' %]
118
    [% PROCESS 'add_password_check' new_password => 'password' %]
53
[% END %]
119
[% END %]
54
120
55
[% INCLUDE 'installer-intranet-bottom.inc' %]
121
[% INCLUDE 'installer-intranet-bottom.inc' %]
122
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-112 / +35 lines)
Lines 1-11 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; Create a new item type </title>
3
    [% IF all_done %]
4
        Complete
5
    [% ELSE %]
6
        Create circulation rule
7
    [% END %]
8
</title>
9
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
10
</head>
4
</head>
11
5
Lines 14-124 Link Here
14
        <div class="row">
8
        <div class="row">
15
            <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
9
            <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>
10
                <h1 id="logo"><a href="#">Koha</a></h1>
17
11
                <h2>Web installer &rsaquo; Create a new item type </h2>
18
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
12
19
13
                [% INCLUDE 'onboarding_messages.inc' %]
20
                    [% INCLUDE 'onboarding_messages.inc' %]
14
21
15
                <!--Create an item type screen 1-->
22
                    <form name="createcirculationrule" method="post" action="onboarding.pl">
16
23
                        <fieldset class="rows">
17
                    <p> Item types are used to group related items. Examples of item types might be books, CDs, or DVDs.</p>
24
                            <input type="hidden" name="step" value="5"/>
18
                    <p> When adding to your institution's catalog you will create an item of a particular item type.</p>
25
                            <input type="hidden" name="op" value="add_validate_circ_rule" />
19
                    <p> Important: Item types are what you apply circulation rules to. Circulation rules govern how your institution will lend its items: Checkout length, renewal policy, hold policy, etc. For example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for checking out any DVD.</p>
26
                            <ol>
20
27
                                <li>
21
                    <form id="createitemform" method="post" action="onboarding.pl">
28
                                    <label for="branchname" class="required"> Library branch</label>
22
                    <fieldset class="rows">
29
                                    <select name="branch" id="branchname" required="required">
23
                        <input type="hidden" name="step" value="5" />
30
                                        <option value=""> Choose</option>
24
                        <input type="hidden" name="op" value="add_validate_itemtype" />
31
                                        <option value="*" selected="selected">All</option>
25
                        <ol>
32
                                        [% FOREACH library IN libraries %]
26
                            <li>
33
                                            <option value="[% library.branchcode | html %]"> [% library.branchname | html %]</option>
27
                                <label for="itemtype" class="required">Item type code: </label>
34
                                        [% END %]
28
                                <input type="text" name="itemtype" pattern="[0-9A-Za-z]{1,10}" id="itemtype" size="10" maxlength="10"  class="required" required="required" value="[% itemtype.itemtype | html %]" />
35
                                    </select>
29
                                <span class="required">Required</span>
36
                                    <span class="required">Required</span>
30
                            </li>
37
                                </li>
31
38
                                <li>
32
                            <li>
39
                                    <label for="categorycode" class="required">Patron category: </label>
33
                                <label for="description" class="required">Description: </label>
40
                                    <select name="categorycode" id="categorycode" required="required">
34
                                <input type="text" name="description" id="description" size="42" value="[% itemtype.description | html %]" class="required" required="required">
41
                                        <option value=""> Choose</option>
35
                                <span class="required">Required</span>
42
                                        <option value="*" selected="selected">All</option>
36
                            </li>
43
                                        [% FOREACH category IN categories %]
37
                        </ol>
44
                                            <option value = "[% category.categorycode | html %]"> [% category.description | html %]</option>
38
45
                                        [%END%]
39
                        <p> To create another item type later and for more settings go to:
46
                                    </select>
40
                            <span class="breadcrumbs"> Administration &rsaquo; Item types </span>
47
                                    <span class="required">Required</span>
41
                        </p>
48
                                </li>
49
50
                                <li>
51
                                    <label for="itemtype"> Item type: </label>
52
                                    <select id="itemtype" name="itemtype" required="required">
53
                                        <option value=""> Choose </option>
54
                                        <option value="*" selected="selected">All</option>
55
                                        [% FOREACH item IN itemtypes %]
56
                                            <option value = "[% item.itemtype | html %]"> [% item.itemtype | html %]
57
                                        [%END%]
58
                                    </select>
59
                                    <span class="required"> Required</span>
60
                                </li>
61
                                <li>
62
                                    <label for="maxissueqty" class="required">Current checkouts allowed: </label>
63
                                    <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" value="50" class="required" required="required" />
64
                                    <span class="required">Required</span>
65
                                </li>
66
67
                                <li>
68
                                    <label for="issuelength" class="required">Loan period: </label>
69
                                    <input type="number" min="0" name="issuelength" id="issuelength" size="10" value="14" class="required" required="required" />
70
                                    <span class="required">Required</span>
71
                                </li>
72
                                <li>
73
                                    <label for="lengthunit">Units: </label>
74
                                    <select name="lengthunit" id="lengthunit" required="required">
75
                                        <option value=""> Choose </option>
76
                                        [% SET units = 'days' %]
77
                                        [% IF category %]
78
                                            [% SET default_privacy = category.default_privacy %]
79
                                        [% END %]
80
81
                                        [% SWITCH units %]
82
                                        [% CASE 'days' %]
83
                                            <option value="days" selected="selected">Days</option>
84
                                            <option value="hours">Hours</option>
85
                                        [% CASE 'hours' %]
86
                                            <option value="days">Days</option>
87
                                            <option value="hours" selected="selected">Hours</option>
88
                                        [% END %]
89
                                    </select>
90
                                </li>
91
                                <li>
92
                                    <label for="renewalsallowed" class="required">Renewals allowed: </label>
93
                                    <input type="number" min="0" name="renewalsallowed" id="renewalsallowed" size="10" max="10" value="10" class="required" required="required" />
94
                                    <span class="required">Required</span>
95
                                </li>
96
97
                                <li>
98
                                    <label for="renewalperiod" class="required">Renewals period: </label>
99
                                    <input type="number" min="0" name="renewalperiod" id="renewalperiod" size="10" value="14" class="required" required="required" />
100
                                    <span class="required">Required</span>
101
                                </li>
102
103
                                <li>
104
                                    <label for="onshelfholds">On shelf holds allowed: </label>
105
                                    <select name="onshelfholds" id="onshelfholds" required="required">
106
                                        <option value="">Choose</option>
107
                                        <option value="1" selected="selected">Yes</option>
108
                                        <option value="0">If any unavailable</option>
109
                                        <option value="2">If all unavailable</option>
110
                                    </select>
111
                                </li>
112
                            </ol>
113
                            <p>
114
                                To create circulation rule, go to:
115
                                <span class="breadcrumbs">Administration &rsaquo; Circulation and fine rules </span>
116
                            </p>
117
118
                        </fieldset>
119
120
                        <input type="submit" class="btn btn-primary" value="Submit" />
42
                        <input type="submit" class="btn btn-primary" value="Submit" />
121
                    </form>
43
                    </fieldset>
44
                </form>
122
            </div> <!-- / #onboarding-step5 -->
45
            </div> <!-- / #onboarding-step5 -->
123
        </div> <!-- / .row -->
46
        </div> <!-- / .row -->
124
    </div><!-- / .container-fluid -->
47
    </div><!-- / .container-fluid -->
Lines 129-132 Link Here
129
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
52
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
130
[% END %]
53
[% END %]
131
54
132
[% INCLUDE 'installer-intranet-bottom.inc' %]
55
[% INCLUDE 'installer-intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt (-16 / +99 lines)
Lines 7-53 Link Here
7
    [% END %]
7
    [% END %]
8
</title>
8
</title>
9
[% INCLUDE 'installer-doc-head-close.inc' %]
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>
10
</head>
14
11
15
<body id="installer" class="installer">
12
<body id="installer" class="installer">
16
    <div class="container-fluid">
13
    <div class="container-fluid">
17
        <div class="row">
14
        <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">
15
            <div id="onboarding-step6" 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>
16
                <h1 id="logo"><a href="#">Koha</a></h1>
20
                [% IF all_done %]
17
                [% IF all_done %]
21
                    <h2>Web installer &rsaquo; Complete</h2>
18
                    <h2>Web installer &rsaquo; Complete</h2>
22
                    [% INCLUDE 'onboarding_messages.inc' %]
19
                    [% INCLUDE 'onboarding_messages.inc' %]
23
                    <h3>Congratulations you have finished and are ready to use Koha</h3>
20
                    <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>
21
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
25
                [% ELSE %]
22
                [% ELSE %]
26
                    <h2>Web installer &rsaquo; Set minPasswordLength system preference </h2>
23
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
27
                    [% INCLUDE 'onboarding_messages.inc' %]
24
                    [% INCLUDE 'onboarding_messages.inc' %]
28
25
29
                    The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to.
26
                    <form name="createcirculationrule" method="post" action="onboarding.pl">
30
31
                    <form name="setMinPasswordLength" method="post" action="onboarding.pl">
32
                        <fieldset class="rows">
27
                        <fieldset class="rows">
33
                            <input type="hidden" name="step" value="6"/>
28
                            <input type="hidden" name="step" value="6"/>
34
                            <input type="hidden" name="op" value="set_validate_min_password_length" />
29
                            <input type="hidden" name="op" value="add_validate_circ_rule" />
35
                            <ol>
30
                            <ol>
36
                                <li>
31
                                <li>
37
                                    <label for="minPasswordname" class="required"> Set your minPasswordLength</label>
32
                                    <label for="branchname" class="required"> Library branch</label>
38
                                    <input type="number" id="pref_minPasswordLength" name="pref_minPasswordLength" value="[% minPasswordLength%]" min=1></input>
33
                                    <select name="branch" id="branchname" required="required">
34
                                        <option value=""> Choose</option>
35
                                        <option value="*" selected="selected">All</option>
36
                                        [% FOREACH library IN libraries %]
37
                                            <option value="[% library.branchcode | html %]"> [% library.branchname | html %]</option>
38
                                        [% END %]
39
                                    </select>
40
                                    <span class="required">Required</span>
41
                                </li>
42
                                <li>
43
                                    <label for="categorycode" class="required">Patron category: </label>
44
                                    <select name="categorycode" id="categorycode" required="required">
45
                                        <option value=""> Choose</option>
46
                                        <option value="*" selected="selected">All</option>
47
                                        [% FOREACH category IN categories %]
48
                                            <option value = "[% category.categorycode | html %]"> [% category.description | html %]</option>
49
                                        [%END%]
50
                                    </select>
51
                                    <span class="required">Required</span>
52
                                </li>
53
54
                                <li>
55
                                    <label for="itemtype"> Item type: </label>
56
                                    <select id="itemtype" name="itemtype" required="required">
57
                                        <option value=""> Choose </option>
58
                                        <option value="*" selected="selected">All</option>
59
                                        [% FOREACH item IN itemtypes %]
60
                                            <option value = "[% item.itemtype | html %]"> [% item.itemtype | html %]
61
                                        [%END%]
62
                                    </select>
63
                                    <span class="required"> Required</span>
64
                                </li>
65
                                <li>
66
                                    <label for="maxissueqty" class="required">Current checkouts allowed: </label>
67
                                    <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" value="50" class="required" required="required" />
68
                                    <span class="required">Required</span>
69
                                </li>
70
71
                                <li>
72
                                    <label for="issuelength" class="required">Loan period: </label>
73
                                    <input type="number" min="0" name="issuelength" id="issuelength" size="10" value="14" class="required" required="required" />
74
                                    <span class="required">Required</span>
75
                                </li>
76
                                <li>
77
                                    <label for="lengthunit">Units: </label>
78
                                    <select name="lengthunit" id="lengthunit" required="required">
79
                                        <option value=""> Choose </option>
80
                                        [% SET units = 'days' %]
81
                                        [% IF category %]
82
                                            [% SET default_privacy = category.default_privacy %]
83
                                        [% END %]
84
85
                                        [% SWITCH units %]
86
                                        [% CASE 'days' %]
87
                                            <option value="days" selected="selected">Days</option>
88
                                            <option value="hours">Hours</option>
89
                                        [% CASE 'hours' %]
90
                                            <option value="days">Days</option>
91
                                            <option value="hours" selected="selected">Hours</option>
92
                                        [% END %]
93
                                    </select>
94
                                </li>
95
                                <li>
96
                                    <label for="renewalsallowed" class="required">Renewals allowed: </label>
97
                                    <input type="number" min="0" name="renewalsallowed" id="renewalsallowed" size="10" max="10" value="10" class="required" required="required" />
39
                                    <span class="required">Required</span>
98
                                    <span class="required">Required</span>
40
                                </li>
99
                                </li>
100
101
                                <li>
102
                                    <label for="renewalperiod" class="required">Renewals period: </label>
103
                                    <input type="number" min="0" name="renewalperiod" id="renewalperiod" size="10" value="14" class="required" required="required" />
104
                                    <span class="required">Required</span>
105
                                </li>
106
107
                                <li>
108
                                    <label for="onshelfholds">On shelf holds allowed: </label>
109
                                    <select name="onshelfholds" id="onshelfholds" required="required">
110
                                        <option value="">Choose</option>
111
                                        <option value="1" selected="selected">Yes</option>
112
                                        <option value="0">If any unavailable</option>
113
                                        <option value="2">If all unavailable</option>
114
                                    </select>
115
                                </li>
41
                            </ol>
116
                            </ol>
42
                            <p>
117
                            <p>
43
                               To amend the minPasswordLength system preference go to:
118
                                To create circulation rule, go to:
44
                               <span class="breadcrumbs">Administration &rsaquo; Global system preferences &rsaquo; Patrons </span>
119
                                <span class="breadcrumbs">Administration &rsaquo; Circulation and fine rules </span>
45
                            </p>
120
                            </p>
121
46
                        </fieldset>
122
                        </fieldset>
123
47
                        <input type="submit" class="btn btn-primary" value="Submit" />
124
                        <input type="submit" class="btn btn-primary" value="Submit" />
48
                    </form>
125
                    </form>
49
                [% END %]
126
                [% END %]
50
            </div> <!-- / #onboarding-step6 -->
127
            </div> <!-- / #onboarding-step6 -->
51
        </div> <!-- / .row -->
128
        </div> <!-- / .row -->
129
    </div><!-- / .container-fluid -->
130
131
[% MACRO jsinclude BLOCK %]
132
    [% INCLUDE 'validator-strings.inc' %]
133
    [% INCLUDE 'installer-strings.inc' %]
134
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
135
[% END %]
52
136
53
[% INCLUDE 'intranet-bottom.inc' %]
137
[% INCLUDE 'installer-intranet-bottom.inc' %]
54
- 

Return to bug 18308