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

(-)a/installer/onboarding.pl (-18 / +31 lines)
Lines 56-61 my $schema = Koha::Database->new()->schema(); Link Here
56
56
57
my @messages;
57
my @messages;
58
58
59
#Create library
59
if ( $step == 1 ) {
60
if ( $step == 1 ) {
60
61
61
    if ( $op eq 'add_validate_library' ) {
62
    if ( $op eq 'add_validate_library' ) {
Lines 84-90 if ( $step == 1 ) { Link Here
84
85
85
    $step++ if Koha::Libraries->count;
86
    $step++ if Koha::Libraries->count;
86
}
87
}
88
89
#Create patron category
87
if ( $step == 2 ) {
90
if ( $step == 2 ) {
91
88
    if ( $op eq "add_validate_category" ) {
92
    if ( $op eq "add_validate_category" ) {
89
93
90
        my $searchfield = $input->param('description') // q||;
94
        my $searchfield = $input->param('description') // q||;
Lines 136-145 if ( $step == 2 ) { Link Here
136
140
137
    $step++ if Koha::Patron::Categories->count;
141
    $step++ if Koha::Patron::Categories->count;
138
}
142
}
143
144
#Set minPasswordLength syspref
139
if ( $step == 3 ) {
145
if ( $step == 3 ) {
146
147
    if ( $op eq 'set_validate_min_password_length' ) {
148
        my $minPasswordLength   = $input->param('pref_minPasswordLength');
149
        warn $minPasswordLength;
150
        C4::Context->set_preference( 'minPasswordLength', $minPasswordLength );
151
        unless ($@) {
152
            push @messages, { code => 'success_on_update_minPasswordLength_syspref' };
153
            $step++;
154
        }
155
        else {
156
            push @messages, { code => 'error_on_update_minPasswordLength_syspref' };
157
        }
158
    }
159
}
160
161
#Create Koha administrator
162
if ( $step == 4 ) {
163
140
    if ( $op eq 'add_validate_patron' ) {
164
    if ( $op eq 'add_validate_patron' ) {
141
165
142
        #Create a patron
143
        my $firstpassword  = $input->param('password')  || '';
166
        my $firstpassword  = $input->param('password')  || '';
144
        my $secondpassword = $input->param('password2') || '';
167
        my $secondpassword = $input->param('password2') || '';
145
        my $cardnumber     = $input->param('cardnumber');
168
        my $cardnumber     = $input->param('cardnumber');
Lines 202-208 if ( $step == 3 ) { Link Here
202
225
203
    $step++ if Koha::Patrons->search( { flags => 1 } )->count;
226
    $step++ if Koha::Patrons->search( { flags => 1 } )->count;
204
}
227
}
205
if ( $step == 4 ) {
228
229
#Create item type
230
if ( $step == 5 ) {
231
206
    if ( $op eq 'add_validate_itemtype' ) {
232
    if ( $op eq 'add_validate_itemtype' ) {
207
        my $description   = $input->param('description');
233
        my $description   = $input->param('description');
208
        my $itemtype_code = $input->param('itemtype');
234
        my $itemtype_code = $input->param('itemtype');
Lines 226-232 if ( $step == 4 ) { Link Here
226
252
227
    $step++ if Koha::ItemTypes->count;
253
    $step++ if Koha::ItemTypes->count;
228
}
254
}
229
if ( $step == 5 ) {
255
256
#Create circulation rule
257
if ( $step == 6 ) {
230
258
231
    if ( $op eq 'add_validate_circ_rule' ) {
259
    if ( $op eq 'add_validate_circ_rule' ) {
232
260
Lines 290-310 if ( $step == 5 ) { Link Here
290
    $step++ if Koha::IssuingRules->count;
318
    $step++ if Koha::IssuingRules->count;
291
}
319
}
292
320
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'] }, );
321
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
309
$template_params->{libraries}   = $libraries;
322
$template_params->{libraries}   = $libraries;
310
323
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-99 / +28 lines)
Lines 1-8 Link Here
1
<<<<<<< HEAD
1
[% USE Koha %]
2
[% USE Koha %]
2
[% USE raw %]
3
[% USE raw %]
3
[% USE Asset %]
4
[% USE Asset %]
5
=======
6
>>>>>>> Bug 18308: Changed ordering of onboarding steps
4
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Web installer &rsaquo; Create Koha administrator patron</title>
8
<title>Koha &rsaquo; Web installer &rsaquo; Set minPasswordLength system preference</title>
6
[% INCLUDE 'installer-doc-head-close.inc' %]
9
[% INCLUDE 'installer-doc-head-close.inc' %]
7
</head>
10
</head>
8
11
Lines 11-116 Link Here
11
        <div class="row">
14
        <div class="row">
12
            <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">
13
                <h1 id="logo"><a href="#">Koha</a></h1>
16
                <h1 id="logo"><a href="#">Koha</a></h1>
14
                <h2>Web installer &rsaquo; Create Koha administrator patron</h2>
15
17
16
                [% INCLUDE 'onboarding_messages.inc' %]
18
                    <h2>Web installer &rsaquo; Set minPasswordLength system preference </h2>
17
19
18
                <p>
20
                    [% INCLUDE 'onboarding_messages.inc' %]
19
                Now we will create a patron with superlibrarian permissions. Log in with this to access Koha as a staff member with all permissions.
21
20
                </p>
22
                    The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to.
21
                <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
23
                    <form name="setMinPasswordLength" method="post" action="onboarding.pl">
22
                    <fieldset class="rows">
24
                        <fieldset class="rows">
23
                        <input type="hidden" name="step" value="3" />
25
                            <input type="hidden" name="step" value="3"/>
24
                        <input type="hidden" name="op" value="add_validate_patron" />
26
                            <input type="hidden" name="op" value="set_validate_min_password_length" />
25
                        <h3>Administrator identity</h3>
27
                            <ol>
26
                        <ol>
28
                                <li>
27
                            <li>
29
                                    <label for="minPasswordname" class="required"> Set your minPasswordLength</label>
28
                                <label for="surname" class="required">Surname: </label>
30
                                    <input type="number" id="pref_minPasswordLength" name="pref_minPasswordLength" value="[% minPasswordLength | html %]" min=1></input>
29
                                <input type="text" id="surname" name="surname" value="[% surname | html %]" class="required" required="required" />
31
                                    <span class="required">Required</span>
30
                                <span class="required">Required</span>
32
                                </li>
31
                            </li>
33
                            </ol>
32
                            <li>
34
                            <p>
33
                                <label for="firstname" class="required">First name: </label>
35
                               To amend the minPasswordLength system preference go to:
34
                                <input  type="text" name="firstname" id="firstname" size="20" value="[% firstname | html %]" class="required" required="required">
36
                               <span class="breadcrumbs">Administration &rsaquo; Global system preferences &rsaquo; Patrons </span>
35
                                <span class="required">Required</span>
37
                            </p>
36
                            </li>
38
                        </fieldset>
37
                        </ol>
39
                        <input type="submit" class="btn btn-primary" value="Submit" />
38
40
                    </form>
39
                        <ol>
40
                            <li>
41
                                <label for="cardnumber" class="required">Card number: </label>
42
                                [% IF patrons && patrons > 1 %]
43
                                    <input type="text" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
44
                                [% ELSE %]
45
                                    <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
46
                                [% END %]
47
                                <span class="required">Required</span>
48
                            </li>
49
                            <li>
50
51
                                <!--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-->
52
                                <label for="libraries" class="required"> Library: </label>
53
                                <select name="libraries" size="1" id="libraries">
54
                                    [% FOREACH library IN libraries %]
55
                                        <option value="[% library.branchcode | html %]"> [% library.branchname | html %] </option>
56
                                    [% END %]
57
                                </select>
58
                                <span class="required"> Required</span>
59
                            </li>
60
                            <li>
61
                                <label for="categorycode_entry" class="required"> Patron category</label>
62
                                <select id="categorycode_entry" name="categorycode_entry">
63
                                    [% FOREACH category IN categories %]
64
                                        <option value = "[% category.categorycode | html %]">[% category.description | html %]</option>
65
                                    [% END %]
66
                                </select>
67
                                <span class="required">Required</span><br><br>
68
                                <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
69
                            </li>
70
                        </ol>
71
72
                            <h3>Administrator account permissions</h3>
73
                        <ol>
74
                            <li>
75
                                <input type="hidden" name="newflags" value="1" />
76
                                <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian" />
77
                                <code> superlibrarian</code>
78
                            </li>
79
                        </ol>
80
81
                            <h3>Administrator login</h3>
82
                        <ol>
83
                            <li>
84
                                <label for="userid" class="required">Username: </label>
85
                                <input type="text" name="userid" id ="userid" size="20" value="[% userid | html %]" class="required" required="required" />
86
                                <span class="required">Required</span>
87
                            </li>
88
                            <li>
89
                                <label for="password" class="required">Password: </label>
90
                                <input type="password" name="password" id="password" size="20" value="[% member.password | html %]" class="required" required="required">
91
                                <span class="required">Required</span>
92
                            </li>
93
                            <li>
94
                                <label for="password2" class="required">Confirm password: </label>
95
                                <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
96
                                <span class="required">Required</span>
97
                            </li>
98
                        </ol>
99
                        <p>
100
                            To create another patron, go to:
101
                            <span class="breadcrumbs">Patrons &rsaquo; New patron</span>
102
                        </p>
103
                        <p>
104
                            To edit patron permissions, go to:
105
                            <span class="breadcrumbs">More &rsaquo; Set permissions</span>
106
                        </p>
107
                    </fieldset>
108
109
                    <input type="submit" class="btn btn-primary" value="Submit" />
110
                </form>
111
            </div> <!-- / #onboarding-step3 -->
41
            </div> <!-- / #onboarding-step3 -->
112
        </div> <!-- / .row -->
42
        </div> <!-- / .row -->
113
    </div><!-- / .container-fluid -->
43
    </div> <!-- / .container-fluid -->
114
44
115
[% MACRO jsinclude BLOCK %]
45
[% MACRO jsinclude BLOCK %]
116
    [% INCLUDE 'validator-strings.inc' %]
46
    [% INCLUDE 'validator-strings.inc' %]
Lines 121-124 Link Here
121
[% END %]
51
[% END %]
122
52
123
[% INCLUDE 'installer-intranet-bottom.inc' %]
53
[% INCLUDE 'installer-intranet-bottom.inc' %]
124
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-18 / +84 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>
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>
37
                        </ol>
77
                        </ol>
38
78
39
                        <p> To create another item type later and for more settings go to:
79
                            <h3>Administrator login</h3>
40
                            <span class="breadcrumbs"> Administration &rsaquo; Item types </span>
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' %]
(-)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> 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>
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 (-12 / +94 lines)
Lines 3-9 Link Here
3
    [% IF all_done %]
3
    [% IF all_done %]
4
        Complete
4
        Complete
5
    [% ELSE %]
5
    [% ELSE %]
6
        Set minPasswordLength system preference
6
        Create circulation rule
7
    [% END %]
7
    [% END %]
8
</title>
8
</title>
9
[% INCLUDE 'installer-doc-head-close.inc' %]
9
[% INCLUDE 'installer-doc-head-close.inc' %]
Lines 12-53 Link Here
12
<body id="installer" class="installer">
12
<body id="installer" class="installer">
13
    <div class="container-fluid">
13
    <div class="container-fluid">
14
        <div class="row">
14
        <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">
15
            <div id="onboarding-step6" 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
                [% IF all_done %]
18
                [% IF all_done %]
18
                    <h2>Web installer &rsaquo; Complete</h2>
19
                    <h2>Web installer &rsaquo; Complete</h2>
19
                    [% INCLUDE 'onboarding_messages.inc' %]
20
                    [% INCLUDE 'onboarding_messages.inc' %]
20
                    <h3>Congratulations you have finished and are ready to use Koha</h3>
21
                    <h3>Congratulations, you have finished and are ready to use Koha</h3>
21
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
22
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
22
                [% ELSE %]
23
                [% ELSE %]
23
24
24
                    <h2>Web installer &rsaquo; Set minPasswordLength system preference </h2>
25
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
25
26
26
                    [% INCLUDE 'onboarding_messages.inc' %]
27
                    [% INCLUDE 'onboarding_messages.inc' %]
27
28
28
                    The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to.
29
                    <form name="createcirculationrule" method="post" action="onboarding.pl">
29
                    <form name="setMinPasswordLength" method="post" action="onboarding.pl">
30
                        <fieldset class="rows">
30
                        <fieldset class="rows">
31
                            <input type="hidden" name="step" value="6"/>
31
                            <input type="hidden" name="step" value="6"/>
32
                            <input type="hidden" name="op" value="set_validate_min_password_length" />
32
                            <input type="hidden" name="op" value="add_validate_circ_rule" />
33
                            <ol>
33
                            <ol>
34
                                <li>
34
                                <li>
35
                                    <label for="minPasswordname" class="required"> Set your minPasswordLength</label>
35
                                    <label for="branchname" class="required"> Library branch</label>
36
                                    <input type="number" id="pref_minPasswordLength" name="pref_minPasswordLength" value="[% minPasswordLength%]" min=1></input>
36
                                    <select name="branch" id="branchname" required="required">
37
                                        <option value=""> Choose</option>
38
                                        <option value="*" selected="selected">All</option>
39
                                        [% FOREACH library IN libraries %]
40
                                            <option value="[% library.branchcode | html %]"> [% library.branchname | html %]</option>
41
                                        [% END %]
42
                                    </select>
43
                                    <span class="required">Required</span>
44
                                </li>
45
                                <li>
46
                                    <label for="categorycode" class="required">Patron category: </label>
47
                                    <select name="categorycode" id="categorycode" required="required">
48
                                        <option value=""> Choose</option>
49
                                        <option value="*" selected="selected">All</option>
50
                                        [% FOREACH category IN categories %]
51
                                            <option value = "[% category.categorycode | html %]"> [% category.description | html %]</option>
52
                                        [%END%]
53
                                    </select>
37
                                    <span class="required">Required</span>
54
                                    <span class="required">Required</span>
38
                                </li>
55
                                </li>
56
57
                                <li>
58
                                    <label for="itemtype"> Item type: </label>
59
                                    <select id="itemtype" name="itemtype" required="required">
60
                                        <option value=""> Choose </option>
61
                                        <option value="*" selected="selected">All</option>
62
                                        [% FOREACH item IN itemtypes %]
63
                                            <option value = "[% item.itemtype | html %]"> [% item.itemtype | html %]
64
                                        [%END%]
65
                                    </select>
66
                                    <span class="required"> Required</span>
67
                                </li>
68
                                <li>
69
                                    <label for="maxissueqty" class="required">Current checkouts allowed: </label>
70
                                    <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" value="50" class="required" required="required" />
71
                                    <span class="required">Required</span>
72
                                </li>
73
74
                                <li>
75
                                    <label for="issuelength" class="required">Loan period: </label>
76
                                    <input type="number" min="0" name="issuelength" id="issuelength" size="10" value="14" class="required" required="required" />
77
                                    <span class="required">Required</span>
78
                                </li>
79
                                <li>
80
                                    <label for="lengthunit">Units: </label>
81
                                    <select name="lengthunit" id="lengthunit" required="required">
82
                                        <option value=""> Choose </option>
83
                                        [% SET units = 'days' %]
84
                                        [% IF category %]
85
                                            [% SET default_privacy = category.default_privacy %]
86
                                        [% END %]
87
88
                                        [% SWITCH units %]
89
                                        [% CASE 'days' %]
90
                                            <option value="days" selected="selected">Days</option>
91
                                            <option value="hours">Hours</option>
92
                                        [% CASE 'hours' %]
93
                                            <option value="days">Days</option>
94
                                            <option value="hours" selected="selected">Hours</option>
95
                                        [% END %]
96
                                    </select>
97
                                </li>
98
                                <li>
99
                                    <label for="renewalsallowed" class="required">Renewals allowed: </label>
100
                                    <input type="number" min="0" name="renewalsallowed" id="renewalsallowed" size="10" max="10" value="10" class="required" required="required" />
101
                                    <span class="required">Required</span>
102
                                </li>
103
104
                                <li>
105
                                    <label for="renewalperiod" class="required">Renewals period: </label>
106
                                    <input type="number" min="0" name="renewalperiod" id="renewalperiod" size="10" value="14" class="required" required="required" />
107
                                    <span class="required">Required</span>
108
                                </li>
109
110
                                <li>
111
                                    <label for="onshelfholds">On shelf holds allowed: </label>
112
                                    <select name="onshelfholds" id="onshelfholds" required="required">
113
                                        <option value="">Choose</option>
114
                                        <option value="1" selected="selected">Yes</option>
115
                                        <option value="0">If any unavailable</option>
116
                                        <option value="2">If all unavailable</option>
117
                                    </select>
118
                                </li>
39
                            </ol>
119
                            </ol>
40
                            <p>
120
                            <p>
41
                               To amend the minPasswordLength system preference go to:
121
                                To create circulation rule, go to:
42
                               <span class="breadcrumbs">Administration &rsaquo; Global system preferences &rsaquo; Patrons </span>
122
                                <span class="breadcrumbs">Administration &rsaquo; Circulation and fine rules </span>
43
                            </p>
123
                            </p>
124
44
                        </fieldset>
125
                        </fieldset>
126
45
                        <input type="submit" class="btn btn-primary" value="Submit" />
127
                        <input type="submit" class="btn btn-primary" value="Submit" />
46
                    </form>
128
                    </form>
47
                [% END %]
129
                [% END %]
48
            </div> <!-- / #onboarding-step6 -->
130
            </div> <!-- / #onboarding-step6 -->
49
        </div> <!-- / .row -->
131
        </div> <!-- / .row -->
50
    </div> <!-- / #container-fluid -->
132
    </div><!-- / .container-fluid -->
51
133
52
[% MACRO jsinclude BLOCK %]
134
[% MACRO jsinclude BLOCK %]
53
    [% INCLUDE 'validator-strings.inc' %]
135
    [% INCLUDE 'validator-strings.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep8.tt (-1 / +140 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
</head>
11
12
<body id="installer" class="installer">
13
    <div class="container-fluid">
14
        <div class="row">
15
            <div id="onboarding-step7" 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>
17
18
                [% IF all_done %]
19
                    <h2>Web installer &rsaquo; Complete</h2>
20
                    [% INCLUDE 'onboarding_messages.inc' %]
21
                    <h3>Congratulations, you have finished and are ready to use Koha</h3>
22
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
23
                [% ELSE %]
24
25
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
26
27
                    [% INCLUDE 'onboarding_messages.inc' %]
28
29
                    <form name="createcirculationrule" method="post" action="onboarding.pl">
30
                        <fieldset class="rows">
31
                            <input type="hidden" name="step" value="7"/>
32
                            <input type="hidden" name="op" value="add_validate_circ_rule" />
33
                            <ol>
34
                                <li>
35
                                    <label for="branchname" class="required"> Library branch</label>
36
                                    <select name="branch" id="branchname" required="required">
37
                                        <option value=""> Choose</option>
38
                                        <option value="*" selected="selected">All</option>
39
                                        [% FOREACH library IN libraries %]
40
                                            <option value="[% library.branchcode | html %]"> [% library.branchname | html %]</option>
41
                                        [% END %]
42
                                    </select>
43
                                    <span class="required">Required</span>
44
                                </li>
45
                                <li>
46
                                    <label for="categorycode" class="required">Patron category: </label>
47
                                    <select name="categorycode" id="categorycode" required="required">
48
                                        <option value=""> Choose</option>
49
                                        <option value="*" selected="selected">All</option>
50
                                        [% FOREACH category IN categories %]
51
                                            <option value = "[% category.categorycode | html %]"> [% category.description | html %]</option>
52
                                        [%END%]
53
                                    </select>
54
                                    <span class="required">Required</span>
55
                                </li>
56
57
                                <li>
58
                                    <label for="itemtype"> Item type: </label>
59
                                    <select id="itemtype" name="itemtype" required="required">
60
                                        <option value=""> Choose </option>
61
                                        <option value="*" selected="selected">All</option>
62
                                        [% FOREACH item IN itemtypes %]
63
                                            <option value = "[% item.itemtype | html %]"> [% item.itemtype | html %]
64
                                        [%END%]
65
                                    </select>
66
                                    <span class="required"> Required</span>
67
                                </li>
68
                                <li>
69
                                    <label for="maxissueqty" class="required">Current checkouts allowed: </label>
70
                                    <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" value="50" class="required" required="required" />
71
                                    <span class="required">Required</span>
72
                                </li>
73
74
                                <li>
75
                                    <label for="issuelength" class="required">Loan period: </label>
76
                                    <input type="number" min="0" name="issuelength" id="issuelength" size="10" value="14" class="required" required="required" />
77
                                    <span class="required">Required</span>
78
                                </li>
79
                                <li>
80
                                    <label for="lengthunit">Units: </label>
81
                                    <select name="lengthunit" id="lengthunit" required="required">
82
                                        <option value=""> Choose </option>
83
                                        [% SET units = 'days' %]
84
                                        [% IF category %]
85
                                            [% SET default_privacy = category.default_privacy %]
86
                                        [% END %]
87
88
                                        [% SWITCH units %]
89
                                        [% CASE 'days' %]
90
                                            <option value="days" selected="selected">Days</option>
91
                                            <option value="hours">Hours</option>
92
                                        [% CASE 'hours' %]
93
                                            <option value="days">Days</option>
94
                                            <option value="hours" selected="selected">Hours</option>
95
                                        [% END %]
96
                                    </select>
97
                                </li>
98
                                <li>
99
                                    <label for="renewalsallowed" class="required">Renewals allowed: </label>
100
                                    <input type="number" min="0" name="renewalsallowed" id="renewalsallowed" size="10" max="10" value="10" class="required" required="required" />
101
                                    <span class="required">Required</span>
102
                                </li>
103
104
                                <li>
105
                                    <label for="renewalperiod" class="required">Renewals period: </label>
106
                                    <input type="number" min="0" name="renewalperiod" id="renewalperiod" size="10" value="14" class="required" required="required" />
107
                                    <span class="required">Required</span>
108
                                </li>
109
110
                                <li>
111
                                    <label for="onshelfholds">On shelf holds allowed: </label>
112
                                    <select name="onshelfholds" id="onshelfholds" required="required">
113
                                        <option value="">Choose</option>
114
                                        <option value="1" selected="selected">Yes</option>
115
                                        <option value="0">If any unavailable</option>
116
                                        <option value="2">If all unavailable</option>
117
                                    </select>
118
                                </li>
119
                            </ol>
120
                            <p>
121
                                To create another circulation rule, go to:
122
                                <span class="breadcrumbs">Administration &rsaquo; Circulation and fine rules </span>
123
                            </p>
124
125
                        </fieldset>
126
127
                        <input type="submit" class="btn btn-primary" value="Submit" />
128
                    </form>
129
                [% END %]
130
            </div> <!-- / #onboarding-step7 -->
131
        </div> <!-- / .row -->
132
    </div><!-- / .container-fluid -->
133
134
[% MACRO jsinclude BLOCK %]
135
    [% INCLUDE 'validator-strings.inc' %]
136
    [% INCLUDE 'installer-strings.inc' %]
137
    <script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
138
[% END %]
139
140
[% INCLUDE 'installer-intranet-bottom.inc' %]

Return to bug 18308