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

(-)a/koha-tmpl/intranet-tmpl/prog/css/installer.css (+243 lines)
Line 0 Link Here
1
body {
2
    background-color: #EEE;
3
    text-align: left;
4
    font-family: arial, verdana, helvetica, sans-serif;
5
}
6
7
h1 {
8
    font-size: 161.6%;
9
    font-weight: bold;
10
}
11
12
h2 {
13
    background-color: #eee;
14
    border-radius: 4px;
15
    font-size: 146.5%;
16
    font-weight: bold;
17
    text-shadow: 1px 1px 0px #FFF;
18
    padding: .5em;
19
}
20
21
h3 {
22
    color: #003366;
23
    font-size: 131%;
24
    font-weight: bold;
25
}
26
27
hr {
28
    margin-top: .5em;
29
    margin-bottom: .5em;
30
}
31
32
.installer-main {
33
    background-color: #FFF;
34
    border-radius: 5px;
35
    margin-top: 3%;
36
    margin-bottom: 3%;
37
    padding: 1em;
38
    -webkit-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5);
39
    -moz-box-shadow:    0px 2px 2px 0px rgba(50, 50, 50, 0.5);
40
    box-shadow:         0px 2px 2px 0px rgba(50, 50, 50, 0.5);
41
}
42
43
ul, ol { padding: 5px 5px 5px 20px; }
44
45
#logo {
46
    background: url(../img/koha-logo.gif) no-repeat top center;
47
    margin-top: 0;
48
    margin-bottom: .5em;
49
}
50
51
#logo a {
52
    display: block;
53
    text-indent: -1000px;
54
    height: 74px;
55
    border-bottom: none;
56
}
57
58
.bg-danger {
59
    padding: .2em .4em;
60
}
61
62
.step a, .step input { font-size: 2em; }
63
64
td input { font-size: 1.5em; }
65
66
.step, th { text-align: right; }
67
68
#bloc25, .bloc25 {
69
        float:left;
70
        border:1px solid #000000;
71
        margin:0px;
72
        padding:0px;
73
74
}
75
76
#footer {
77
        text-align: center;
78
        border-top: 1px solid #ccc;
79
        padding-top: 1em;
80
        font-style: italic;
81
}
82
83
.update_error {
84
        color: red;
85
        font-weight: bold;
86
}
87
88
.checkbox {
89
    margin-bottom: 1em;
90
}
91
92
fieldset.rows {
93
    border-width: 0;
94
    float: left;
95
    font-size: 90%;
96
    clear: left;
97
    margin: .9em 0 0 0;
98
    padding: 0;
99
    width: 100%;
100
}
101
102
fieldset.rows legend {
103
    border: 0;
104
    margin-left: 1em;
105
    font-weight: bold;
106
    font-size: 110%;
107
    margin-bottom: 0;
108
}
109
110
fieldset.rows label,
111
fieldset.rows span.label {
112
    float: left;
113
    font-weight: bold;
114
    width: 9em;
115
    margin-right: 1em;
116
    text-align: right;
117
}
118
119
fieldset.rows span.label {
120
    display: inline;
121
    padding: .2em .6em .3em;
122
    font-size: inherit;
123
    font-weight: bold;
124
    line-height: 1;
125
    color: inherit;
126
    text-align: right;
127
    white-space: normal;
128
    vertical-align: baseline;
129
    border-radius: 0;
130
}
131
132
fieldset.rows fieldset {
133
    background-color: transparent;
134
    border-width: 1px;
135
    margin: 1em;
136
    padding: .3em;
137
}
138
139
fieldset.rows ol {
140
    padding: 1em 1em 0 1em;
141
    list-style-type: none;
142
}
143
144
fieldset.rows li {
145
    float: left;
146
    clear: left;
147
    padding-bottom: 1em;
148
    list-style-type: none;
149
    width: 100%;
150
}
151
152
fieldset.rows .hint {
153
    margin-left: 10.5em;
154
    margin-right: 4em;
155
    margin-top: .5em;
156
    font-size: 96%;
157
    color: #666;
158
}
159
160
fieldset.rows label.error {
161
    color: #cc0000;
162
    float: none;
163
    margin-left: 1em;
164
    width: auto;
165
}
166
167
fieldset.rows ol {
168
    padding: 0 1em 0 1em;
169
}
170
171
172
label.required,
173
span.required {
174
    color : #C00;
175
}
176
177
span.required {
178
    font-style : italic;
179
    margin-left : .5em;
180
}
181
182
.breadcrumbs {
183
    background-color: #e6f0f2;
184
    margin: 1em 0;
185
    padding: .4em 2em;
186
}
187
188
/* Override core jQueryUI widgets */
189
.ui-widget-content { border: 1px solid #B9D8D9; background: #ffffff none; color: #222222; }
190
.ui-widget-header { border: 1px solid #B9D8D9; background: #E6F0F2 none; color: #222222; font-weight: bold; }
191
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B9D8D9; background: #F4F8F9 none; font-weight: normal; color: #555555; }
192
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121; }
193
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff none; font-weight: normal; color: #212121; }
194
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #FED22F; background: #FFF4C6; color: #363636; }
195
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec; color: #cd0a0a; }
196
197
.ui-widget,
198
.ui-widget input,
199
.ui-widget select,
200
.ui-widget textarea,
201
.ui-widget button {
202
    font-family : inherit;
203
    font-size : inherit;
204
}
205
206
/* jQuery UI Datepicker */
207
.ui-datepicker table {
208
    width: 100%;
209
    font-size: .9em;
210
    border : 0;
211
    border-collapse: collapse;
212
    margin:0 0 .4em;
213
}
214
215
.ui-datepicker th {
216
    background : transparent none;
217
    padding: .7em .3em;
218
    text-align: center;
219
    font-weight: bold;
220
    border: 0;
221
}
222
223
.ui-datepicker-trigger {
224
    vertical-align: middle;
225
    margin : 0 3px;
226
}
227
.ui-datepicker {
228
    box-shadow: 1px 1px 3px 0 #666;
229
}
230
231
span.breadcrumbs {
232
    display: block;
233
}
234
235
.selectall,
236
.deselectall {
237
    display: inline-block;
238
}
239
240
.selectall.mandatory,
241
.deselectall.optional {
242
    display: none;
243
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc (-81 / +2 lines)
Lines 2-93 Link Here
2
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
2
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
3
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.css" />
3
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.css" />
4
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap.min.css" />
4
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap.min.css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/font-awesome/css/font-awesome.min.css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/installer.css" />
6
<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print.css" />
7
<style type="text/css" media="screen">
8
9
[% IF ( login ) %]
10
    @import url([% interface %]/[% theme %]/css/login.css);
11
[% END %]
12
13
html { background: #eee; }
14
15
body {
16
        background: #fff;
17
        color: #000;
18
        font-family: Georgia, "Times New Roman", Times, serif;
19
        margin-left: 20%;
20
        margin-right: 20%;
21
        padding: .2em 2em;
22
}
23
24
h1 {
25
        color: #006;
26
        font-size: 2em;
27
        font-weight: normal;
28
        vertical-align:middle;
29
}
30
31
h2 { font-size: 1.75em; }
32
33
h3 {
34
        color: #006;
35
        font-size: 1.5em;
36
        font-weight: lighter;
37
}
38
39
p, li, dt {
40
        line-height: 140%;
41
        padding-bottom: 2px;
42
}
43
44
ul, ol { padding: 5px 5px 5px 20px; }
45
46
#logo { margin-bottom: 2em; }
47
48
.step a, .step input { font-size: 2em; }
49
50
td input { font-size: 1.5em; }
51
52
.step, th { text-align: right; }
53
54
#bloc25, .bloc25 {
55
        float:left;
56
        border:1px solid #000000;
57
        margin:0px;
58
        padding:0px;
59
60
}
61
62
#footer {
63
        text-align: center;
64
        border-top: 1px solid #ccc;
65
        padding-top: 1em;
66
        font-style: italic;
67
}
68
69
.update_error {
70
        color: red;
71
        font-weight: bold;
72
}
73
74
</style>
75
6
76
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min.js"></script>
7
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min.js"></script>
77
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min.js"></script>
8
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min.js"></script>
78
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.js"></script>
9
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.js"></script>
79
<script type="text/javascript" src="[% interface %]/lib/shortcut/shortcut.js"></script>
80
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
81
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
82
<script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script>
10
<script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script>
83
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script>
11
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script>
84
<!-- koha core js -->
85
<script type="text/javascript" src="[% interface %]/[% theme %]/js/staff-global.js"></script>
86
87
<script type="text/javascript">
12
<script type="text/javascript">
88
    //<![CDATA[
13
    function _(s) { return s } // dummy function for gettext
89
        function _(s) { return s } // dummy function for gettext
90
    //]]>
91
</script>
14
</script>
92
</head>
93
<body id="installer" class="installer">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc (+7 lines)
Line 0 Link Here
1
<script type="text/javascript">
2
    var MSG_LETTERS_ONLY=(_("Please only enter letters."));
3
    var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match"));
4
    var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date."));
5
    var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrollment period."));
6
    var MSG_LETTERS_NUMBERS_ONLY=(_("Please only enter letters or numbers."));
7
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc (-17 / +28 lines)
Lines 1-20 Link Here
1
[% FOR m IN messages %]
1
[% FOR m IN messages %]
2
    <div class="dialog [% m.type %]">
2
    [% SWITCH m.code %]
3
        [% SWITCH m.code %]
3
        [% CASE 'success_on_insert_library' %]
4
        [% CASE 'success_on_insert_library' %]<span>Library created!</span>
4
            <div class="alert alert-success">Library created!</div>
5
        [% CASE 'error_on_insert_library' %]<span>Library already exists and cannot be modified!</span>
5
        [% CASE 'error_on_insert_library' %]
6
        [% CASE 'success_on_insert_category' %]<span>Patron category created!</span>
6
            <div class="alert alert-danger">Library already exists and cannot be modified!</div>
7
        [% CASE 'error_on_insert_category' %]<span>Patron category already exists and cannot be modified!</span>
7
        [% CASE 'success_on_insert_category' %]
8
        [% CASE 'success_on_insert_patron' %]<span>Administrator Patron created!</span>
8
            <div class="alert alert-success">Patron category created!</div>
9
        [% CASE 'error_on_insert_patron' %]<span>The patron has not been created! Cardnumber or Userid may already exist.</span>
9
        [% CASE 'error_on_insert_category' %]
10
        [% CASE 'ERROR_cardnumber_already_exists' %]<span>Cardnumber already in use.</span>
10
            <div class="alert alert-danger">Patron category already exists and cannot be modified!</div>
11
        [% CASE 'ERROR_cardnumber_length' %]<span>Cardnumber length is incorrect.</span>
11
        [% CASE 'success_on_insert_patron' %]
12
        [% CASE 'ERROR_password_mismatch' %]<span>Passwords do not match.</span>
12
            <div class="alert alert-success">Administrator account created!</div>
13
        [% CASE 'success_on_insert_itemtype' %]<span>New item type created!</span>
13
        [% CASE 'error_on_insert_patron' %]
14
        [% CASE 'error_on_insert_itemtype' %]<span>Item type already exists!</span>
14
            <div class="alert alert-danger">The patron has not been created! Cardnumber or Userid may already exist.</div>
15
        [% CASE 'success_on_insert_circ_rule' %]<span>Circulation rule created!</span>
15
        [% CASE 'ERROR_cardnumber_already_exists' %]
16
        [% CASE 'error_on_insert_circ_rule' %]<span>Circulation rule not created!</span>
16
            <div class="alert alert-danger">Card number already in use.</div>
17
        [% CASE 'ERROR_cardnumber_length' %]
18
            <div class="alert alert-danger">Card number length is incorrect.</div>
19
        [% CASE 'ERROR_password_mismatch' %]
20
            <div class="alert alert-danger">Passwords do not match.</div>
21
        [% CASE 'success_on_insert_itemtype' %]
22
            <div class="alert alert-success">New item type created!</div>
23
        [% CASE 'error_on_insert_itemtype' %]
24
            <div class="alert alert-danger">Item type already exists!</div>
25
        [% CASE 'success_on_insert_circ_rule' %]
26
            <div class="alert alert-success">Circulation rule created!</div>
27
        [% CASE 'error_on_insert_circ_rule' %]
28
            <div class="alert alert-danger">Circulation rule not created!</div>
17
        [% CASE %][% message %]
29
        [% CASE %][% message %]
18
        [% END %]
30
    [% END %]
19
    </div>
20
[% END %]
31
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt (-42 / +54 lines)
Lines 1-52 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; 
3
<title>Koha &rsaquo;
4
    [% IF ( nopermission ) %]Access denied[% END %]
4
    [% IF ( nopermission ) %]Access denied[% END %]
5
    [% IF ( timed_out ) %]Session timed out[% END %]
5
    [% IF ( timed_out ) %]Session timed out[% END %]
6
    [% IF ( different_ip ) %]IP address change[% END %]
6
    [% IF ( different_ip ) %]IP address change[% END %]
7
    [% IF ( invalid_username_or_password ) %]Invalid username or password[% END %]
7
    [% IF ( invalid_username_or_password ) %]Invalid username or password[% END %]
8
    [% IF ( loginprompt ) %]Log in to Koha[% END %]
8
    [% IF ( loginprompt ) %]Log in to the Koha web installer[% END %]
9
</title>
9
</title>
10
11
[% INCLUDE 'installer-doc-head-close.inc' %]
10
[% INCLUDE 'installer-doc-head-close.inc' %]
12
<div id="login">
11
</head>
13
<h1><a>Koha [%- Koha.Version.release -%] installer</a></h1>
12
14
[% IF ( nopermission ) %]
13
<body id="installer" class="installer">
15
<div id="login_error"><strong>Error: </strong>Unauthorized user <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div>
14
    <div class="container-fluid">
16
[% END %]
15
        <div class="row">
17
16
            <div id="installer-login" class="installer-main col-sm-6 col-sm-offset-3 col-md-6 col-md-offset-3">
18
[% IF ( timed_out ) %]
17
19
<div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div>
18
                <h1 id="logo"><a href="#">Koha</a></h1>
20
[% END %]
19
21
20
                [% IF ( nopermission ) %]
22
[% IF ( different_ip ) %]
21
                    <div id="login_error"><strong>Error: </strong>Unauthorized user <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div>
23
<div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div>
22
                [% END %]
24
[% END %]
23
25
24
                [% IF ( timed_out ) %]
26
[% IF ( invalid_username_or_password ) %]
25
                <div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div>
27
<div id="login_error"><strong>Error: </strong>Invalid username or password</div>
26
                [% END %]
28
[% END %]
27
29
28
                [% IF ( different_ip ) %]
30
[% IF ( loginprompt ) %]
29
                <div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div>
31
<!-- login prompt time-->
30
                [% END %]
32
<form action="/cgi-bin/koha/installer/install.pl" method="post" name="mainform" id="mainform">
31
33
[% FOREACH INPUT IN INPUTS %]
32
                [% IF ( invalid_username_or_password ) %]
34
    <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" />
33
                <div id="login_error"><strong>Error: </strong>Invalid username or password</div>
35
[% END %]
34
                [% END %]
36
<h3>Welcome to the Koha web installer</h3>
35
37
<p>Before we begin, please verify you have the correct credentials to continue. Please log in
36
                [% IF ( loginprompt ) %]
38
with the username and password given to you by your systems administrator and located in your
37
                    <h2>Welcome to the Koha [%- Koha.Version.release -%] web installer</h2>
39
<code>koha-conf.xml</code> configuration file.</p>
38
40
<p>Please enter your username and password:</p>
39
                    <p>Before we begin, please verify you have the correct credentials to continue. Please log in with the username and password given to you by your systems administrator and located in your <code>koha-conf.xml</code> configuration file.</p>
41
<p><label>Username:<br />
40
42
<input type="text" name="userid" id="userid" class="input" value="[% userid %]" size="20" tabindex="1" /></label>
41
                    <form action="[% url %]" method="post" id="mainform">
43
</p>
42
                        [% FOREACH INPUT IN INPUTS %]
44
<p><label>Password:<br />
43
                            <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" />
45
<input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" /></label>
44
                        [% END %]
46
</p>
45
47
<p class="submit"><input id="submit" type="submit" value="Login" tabindex="4" /></p>
46
                        <fieldset>
48
</form>
47
                            <legend>Please enter your username and password</legend>
49
48
50
[% END %]
49
                            <div class="form-group">
50
                                <label>Username:</label>
51
                                <input type="text" class="form-control" name="userid" id="userid" value="[% userid %]" size="20" tabindex="1" />
52
                            </div>
53
                            <div class="form-group">
54
                                <label>Password:</label>
55
                                <input type="password" class="form-control" name="password" id="password" value="" size="20" tabindex="2" />
56
                            </div>
57
                            <input id="submit" type="submit" class="btn btn-primary" value="Log in" tabindex="3" />
58
                        </fieldset>
59
                    </form>
60
                [% END %]
61
            </div>
62
        </div>
51
63
52
[% INCLUDE 'intranet-bottom.inc' %]
64
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt (-76 / +92 lines)
Lines 1-82 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Web installer &rsaquo; Step 1</title>
2
<title>Koha &rsaquo; Web installer &rsaquo;
3
[% INCLUDE 'installer-doc-head-close.inc' %]
3
    [% UNLESS ( language ) %] Choose your language [% END %]
4
<div>
4
    [% IF ( language ) %]
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 1</h1>
5
        [% UNLESS ( checkmodule ) %]
6
[% UNLESS ( language ) %]
6
            [% IF ( missing_modules ) %]
7
<p>You are about to install Koha.</p>
7
                Perl modules missing
8
9
<p>Please pick your language from the following list. If your language is not
10
listed, please inform your systems administrator.</p>
11
<form name="language" method="post">
12
<select name="language">
13
[% IF ( installer_languages_loop ) %]
14
        [% FOREACH installer_languages_loo IN installer_languages_loop %]
15
            [% IF ( installer_languages_loo.plural ) %]
16
            <optgroup label="[% installer_languages_loo.language %]">
17
            [% FOREACH sublanguages_loo IN installer_languages_loo.sublanguages_loop %]
18
                <option value="[% sublanguages_loo.rfc4646_subtag %]">[% IF ( sublanguages_loo.native_description ) %][% sublanguages_loo.native_description %][% ELSE %][% sublanguages_loo.rfc4646_subtag %][% END %]</option>
19
            [% END %]
8
            [% END %]
20
            </optgroup>
9
            [% IF ( problems ) %]
21
            [% ELSE %]
10
                Perl version obsolete
22
		<option value="[% installer_languages_loo.rfc4646_subtag %]">[% IF ( installer_languages_loo.native_description ) %][% installer_languages_loo.native_description %][% ELSE %][% installer_languages_loo.rfc4646_subtag %][% END %]</option>
23
            [% END %]
11
            [% END %]
24
        [% END %]
12
        [% END %]
25
[% END %]
13
        Check Perl dependencies
26
</select>
27
</p>
28
29
<p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
30
</form>
31
[% END %]
32
[% IF ( language ) %]
33
  [% IF ( checkmodule ) %]
34
  <p>All required Perl modules appear to be installed.<br />
35
  [% ELSE %]
36
  [% IF ( missing_modules ) %]
37
  <p><b>Warning: </b>Some Perl modules are missing.<br />Modules in red must be installed before you may continue.<br />
38
  <ul>
39
  [% FOREACH missing_module IN missing_modules %]
40
    [% IF ( missing_module.require ) %]
41
    <li style="color:#FF0000;font-weight:bold;">[% missing_module.name %]
42
    [% ELSE %]
43
    <li>[% missing_module.name %]
44
    [% END %]
14
    [% END %]
45
      <br /> Version: [% missing_module.version %]
15
</title>
46
      <br /> Usage: [% missing_module.usage %]
16
[% INCLUDE 'installer-doc-head-close.inc' %]
47
    </li>
17
48
  [% END %]
18
<div class="container-fluid">
49
  [% END %]
19
    <div class="row">
50
  [% IF ( problems ) %]
20
        <div id="installer-step1" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
51
  <p>I encountered some problems.</p>
21
52
   <ul>
22
            <h1 id="logo"><a href="#">Koha</a></h1>
53
    [% IF ( perlversion ) %]
23
54
    <li>Your Perl version seems to be obsolete.
24
            [% UNLESS ( language ) %]
55
      Please upgrade to a newer version of Perl (at least Version 5.10).</li>
25
                <h2>Web installer &rsaquo; Choose your language</h2>
56
    [% END %]
26
                <p>You are about to install Koha.</p>
57
   </ul>
27
58
  [% END %]
28
                <p>Please pick your language from the following list. If your language is not listed, please inform your system administrator.</p>
59
  [% END %]
29
60
<form name="checkmodules" action="install.pl">
30
                <form name="language" method="post" action="install.pl">
61
[% IF ( checkmodule ) %]
31
                    <div class="form-group">
62
[% IF (op == 'noop') %]
32
                        <label for="language">Select a language: </label>
63
<input type="hidden" name="step" value="2" />
33
                        <select id="language" name="language">
64
[% ELSE %]
34
                            [% IF ( installer_languages_loop ) %]
65
<input type="hidden" name="step" value="3" />
35
                                [% FOREACH installer_languages_loo IN installer_languages_loop %]
66
<input type="hidden" name="op" value="[% op %]" />
36
                                    [% IF ( installer_languages_loo.plural ) %]
67
<input type="hidden" name="checkmodule" value="[% checkmodule %]"/>
37
                                        <optgroup label="[% installer_languages_loo.language %]">
68
[% END %]
38
                                            [% FOREACH sublanguages_loo IN installer_languages_loo.sublanguages_loop %]
69
<p> All dependencies installed.</p>
39
                                                <option value="[% sublanguages_loo.rfc4646_subtag %]">[% IF ( sublanguages_loo.native_description ) %][% sublanguages_loo.native_description %][% ELSE %][% sublanguages_loo.rfc4646_subtag %][% END %]</option>
70
<p>Please click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
40
                                            [% END %]
71
[% ELSE %]
41
                                        </optgroup>
72
[% IF (op == 'noop') %]
42
                                    [% ELSE %]
73
<input type="hidden" name="step" value="1" />
43
                                        <option value="[% installer_languages_loo.rfc4646_subtag %]">[% IF ( installer_languages_loo.native_description ) %][% installer_languages_loo.native_description %][% ELSE %][% installer_languages_loo.rfc4646_subtag %][% END %]</option>
74
[% ELSE %]
44
                                    [% END %]
75
<input type="hidden" name="step" value="1" />
45
                                [% END %]
76
<input type="hidden" name="op" value="[% op %]" />
46
                            [% END %]
77
[% END %]
47
                        </select>
78
<p>Click to recheck dependencies <input value="Recheck" type="submit" /></p>
48
                    </div>
79
[% END %]
49
80
</form>
50
                    <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
81
[% END %]
51
                </form>
52
            [% END %]
53
54
            [% IF ( language ) %]
55
                [% UNLESS ( checkmodule ) %]
56
                    [% IF ( missing_modules ) %]
57
                        <h2>Web installer &rsaquo; Perl modules missing</h2>
58
                        <p>Some Perl modules are missing. <span class="label label-danger">Required</span> modules <b>must</b> be installed before you may continue.<br />
59
                        <ul>
60
                            [% FOREACH missing_module IN missing_modules %]
61
                                <li><strong>[% missing_module.name %]</strong> [% IF ( missing_module.require ) %]<span class="label label-danger">Required</span>[% END %]
62
                                    <br /> Version: [% missing_module.version %]
63
                                    <br /> Usage: [% missing_module.usage %]
64
                                </li>
65
                            [% END %]
66
                        </ul>
67
                    [% END %]
68
69
                    [% IF ( problems ) %]
70
                        <h2>Web installer &rsaquo; Perl version too old</h2>
71
                        <p>I encountered some problems.</p>
72
                        <ul>
73
                            [% IF ( perlversion ) %]
74
                                <li>Your Perl version is out of date. Please upgrade to a newer version of Perl (at least version 5.10).</li>
75
                            [% END %]
76
                        </ul>
77
                    [% END %]
78
79
                    <form name="checkmodules" action="install.pl">
80
                        <input type="hidden" name="step" value="1" />
81
                        <p> <input value="Recheck dependencies" class="btn btn-primary" type="submit" /></p>
82
                    </form>
83
84
                [% ELSE # IF checkmodule %]
85
                    <h2>Web installer &rsaquo; Check Perl dependencies</h2>
86
                    <p>All required Perl modules appear to be installed.</p>
87
                    <p> All dependencies installed.</p>
88
89
                    <form name="checkmodules" role="form" action="install.pl">
90
                        <input type="hidden" name="step" value="2" />
91
                        <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
92
                    </form>
93
                [% END # IF checkmodule%]
94
            [% END # IF language %]
95
        </div> <!-- / #installer-step1 -->
96
    </div> <!-- / .row -->
97
82
[% INCLUDE 'intranet-bottom.inc' %]
98
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt (-62 / +72 lines)
Lines 1-63 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 2</title>
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Database settings</title>
2
[% INCLUDE 'installer-doc-head-close.inc' %]
2
[% INCLUDE 'installer-doc-head-close.inc' %]
3
<div>
3
</head>
4
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 2</h1>
4
5
<h2 align="center">Database settings:</h2>
5
<body id="installer" class="installer">
6
<ul>
6
    <div class="container-fluid">
7
<li><em>database type : </em>[% dbms %]</li>
7
        <div class="row">
8
<li><em>database name : </em>[% dbname %]</li>
8
            <div id="installer-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
9
<li><em>database host : </em>[% hostname %]</li>
9
10
<li><em>database port : </em>[% port %] (probably OK if blank)</li>
10
                <h1 id="logo"><a href="#">Koha</a></h1>
11
<li><em>database user : </em>[% user %]</li>
11
                <h2>Web installer &rsaquo; Database settings</h2>
12
</ul>
12
                <h3>Database settings:</h3>
13
<div>
13
                <ul>
14
[% IF ( dbconnection ) %]
14
                    <li><em>Database type : </em> <code>[% dbms %]</code></li>
15
<form name="checkdbparameters" type="post" action="install.pl">
15
                    <li><em>Database name : </em> <code>[% dbname %]</code></li>
16
  [% IF ( checkdatabaseaccess ) %]
16
                    <li><em>Database host : </em> <code>[% hostname %]</code></li>
17
  <p>Connection established.</p>
17
                    <li><em>Database port : </em> <code>[% port %]</code> (probably okay if blank)</li>
18
     [% IF ( checkdatabasecreated ) %]
18
                    <li><em>Database user : </em> <code>[% user %]</code></li>
19
  <p>Database <code>[% dbname %]</code> exists.</p>
19
                </ul>
20
        [% IF ( checkgrantaccess ) %]
20
21
  <p>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</p>
21
                [% IF ( dbconnection ) %]
22
        [% ELSE %]
22
                    <form name="checkdbparameters" method="post" action="install.pl">
23
  <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code></p>
23
                        [% IF ( checkdatabaseaccess ) %]
24
  <p class="tip">Ask for or make a change in the user's privileges. Need help? See
24
                            <div class="alert alert-success" role="alert"><p>Connection established.</p></div>
25
    [% IF dbms == 'mysql' %]<a href="https://dev.mysql.com/doc/refman/5.5/en/grant.html">
25
                            [% IF ( checkdatabasecreated ) %]
26
    [% ELSE %]<a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">
26
                                <ul>
27
    [% END %]this page</a>.
27
                                    <li>Database <code>[% dbname %]</code> exists.</li>
28
  </p>
28
                                [% IF ( checkgrantaccess ) %]
29
  <p class="tip">
29
                                    <li>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</li>
30
    User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code>
30
                                    </ul>
31
  </p>
31
                                [% ELSE %]
32
        [% END %]
32
                                    </ul>
33
      [% ELSE %]
33
                                    <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code> </p>
34
  <p class="error">No database named <code>[% dbname %]</code> detected.</p>
34
                                    <p class="tip"> Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %]
35
  <p class="tip">Please create the database before continuing.</p>
35
                                            <a href="http://dev.mysql.com/doc/refman/4.1/en/grant.html">
36
      [% END %]
36
                                        [% ELSE %]
37
   [% ELSE %]
37
                                            <a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">
38
    <div class="error">[% error %] : [% message %]
38
                                        [% END %]
39
    </div>
39
                                        this page</a>. User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code>
40
    <div class="tip">
40
                                    </p>
41
      <ul>
41
                                [% END %]
42
      <li>Check that your database is running.</li>
42
                            [% ELSE %]
43
      <li>Check your database settings in <code>koha-conf.xml</code>. </li>
43
                                <div class="alert alert-danger" role="alert"><p>No database named <code>[% dbname %]</code> detected.</p></div>
44
      <li>Check the hostname setting in <code>koha-conf.xml</code>. 
44
                                <p>Please create the database before continuing.</p>
45
      Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</li>
45
                            [% END %]
46
    </div>
46
                        [% ELSE %]
47
    <p>Please correct these errors and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again.
47
                            <div class="alert alert-warning" role="alert">[% error %] : [% message %]</div>
48
  [% END %]
48
                            <div class="tip">
49
  [% IF ( error ) %][% ELSE %]
49
                                <ul>
50
<input type="hidden" name="step" value="3" />
50
                                    <li>Check that your database is running.</li>
51
<p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
51
                                    <li>Check your database settings in <code>koha-conf.xml</code>. </li>
52
[% END %]
52
                                    <li>Check the hostname setting in <code>koha-conf.xml</code>.
53
</form>
53
                                    Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</li>
54
[% ELSE %]
54
                                </ul>
55
<form name="checkinformation" type="post" action="install.pl">
55
                            </div>
56
<input type="hidden" name="step" value="2" />
56
                            <p>Please correct these errors and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again.
57
<input type="hidden" name="checkdb" value="1" />
57
                        [% END %]
58
<p> Please click 'Next' to continue if this information is correct <input value="Next &gt;&gt;" type="submit" /></p>
58
                        [% UNLESS ( error ) %]
59
</form>
59
                            <input type="hidden" name="step" value="3" />
60
[% END %]
60
                            <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
61
</div>
61
                        [% END %]
62
</body>
62
                    </form>
63
</html>
63
                [% ELSE %]
64
                    <form name="checkinformation" method="post" action="install.pl">
65
                        <input type="hidden" name="step" value="2" />
66
                        <input type="hidden" name="checkdb" value="1" />
67
                        <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
68
                    </form>
69
                [% END # / IF dbconnection %]
70
            </div> <!-- / #installer-step2 -->
71
        </div> <!-- / .row -->
72
73
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-248 / +255 lines)
Lines 1-265 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 3</title>
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% IF ( finish ) %]<meta http-equiv="refresh" content="5; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
<div>
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web  installer &rsaquo; Step 3</h1>
6
7
[% IF ( selectframeworks ) %]
8
    <script type="text/javascript">
9
//<![CDATA[
10
11
var surl = unescape(window.location.pathname);
12
13
function doLoad()
14
{
15
    // the timeout value should be the same as in the "refresh" meta-tag
16
    setTimeout( "refresh()", 2*1000 );
17
}
18
19
function refresh(value)
20
{
21
    //  The argument to the location.reload function determines
22
    //  if the browser should retrieve the document from the
23
    //  web-server.  In our example all we need to do is cause
24
    //  the JavaScript block in the document body to be
25
    //  re-evaluated.  If we needed to pull the document from
26
    //  the web-server again (such as where the document contents
27
    //  change dynamically) we would pass the argument as 'true'.
28
    //
29
    surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
30
31
    window.location.replace( surl );
32
}
33
34
function selectAllFrameworks()
35
{
36
    //  A handy short link that selects all available checkboxes
37
    //  on the page.
38
    //
39
    var checkboxes = document.getElementsByTagName("input");
40
    for (var i = 0; i < checkboxes.length; i++)
41
    {
42
        if (checkboxes[i].type == 'checkbox')
43
        {
44
            checkboxes[i].checked = true;
45
        }
46
    }
47
48
    //  Prevent event propergation.
49
    return false;
50
}
51
52
function Hide(link)
53
{
54
    //  Toggle the display of a given element on the page.
55
    //
56
    subfield = document.getElementById('bloc'+link);
57
    var initstyle = subfield.style.display;
58
    if (initstyle == 'block') subfield.style.display = 'none' ;
59
    if (initstyle == 'none') subfield.style.display = 'block' ;
60
}
61
62
//]]>
63
</script>
64
[% END %]
65
66
2
67
[% IF ( finish ) %]
3
<title>Koha &rsaquo; Web installer &rsaquo;
68
    <h1>Congratulations, installation complete</h1>
4
     [% IF ( proposeimport ) %]
69
    <p>If this page does not redirect in 10 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.</p>
5
         Set up database
70
[% END %]
71
72
73
[% IF ( choosemarc ) %]
74
   <h2 align="center">Select your MARC flavor</h2>
75
       <form name="frameworkselection" method="post" action="install.pl">
76
           <input type="hidden" name="step" value="3" />
77
           <input type="hidden" name="op" value="selectframeworks" />
78
           <p>
79
           [% FOREACH flavourloo IN flavourloop %]
80
           <div>
81
              [% IF ( flavourloo.checked ) %]
82
                  <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked /> [% flavourloo.label %] <br/>
83
              [% ELSE %]
84
                  <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/>
85
              [% END %]
86
           </div>
87
           [% END %]
88
           </p>
89
           <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
90
           </form>
91
[% END %]
92
93
[% IF ( selectframeworks ) %]
94
<h2 align="center">Selecting Default Settings</h2>
95
    <script type="text/javascript">
96
       var linklabel = _("Select all sample data");
97
       document.write('<p><a href="#" onclick="return selectAllFrameworks();">'+linklabel+'</a></p>');
98
    </script>
99
    <form name="frameworkselection" method="post" action="install.pl">
100
    <input type="hidden" name="step" value="3" />
101
    <input type="hidden" name="op" value="addframeworks" />
102
103
    [% IF ( frameworksloop ) %]
104
    <h2>MARC frameworks: [% marcflavour %]</h2>
105
    [% IF ( en_marc_frameworks ) %]
106
         <h4><span class="error">No MARC frameworks are available for your language.
107
                Defaulting to the frameworks supplied for English (en)<span></h4>
108
    [% END %]
109
    [% FOREACH frameworksloo IN frameworksloop %]
110
    <div>
111
    <h3>[% frameworksloo.label %]</h3>
112
    [% FOREACH framework IN frameworksloo.frameworks %]
113
       <table style="border:1px;vertical-align:top;">
114
       <tr>
115
       <td style="vertical-align:top;">
116
          [% IF ( framework.checked ) %]
117
               <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
118
          [% ELSE %]
119
               <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
120
          [% END %]
121
       </td>
122
       <td>
123
          <label for="[% framework.fwkname %]">
124
               [% framework.fwkdescription %]
125
               <em>([% framework.fwkname %])</em>
126
           </label>
127
       </td>
128
       </table>
129
     [% END %]
6
     [% END %]
130
     </div>
7
     [% IF ( importdatastructure ) %]
8
         [% IF ( error ) %]
9
           Error creating database tables
10
         [% ELSE %]
11
           Database tables created
12
         [% END %]
131
     [% END %]
13
     [% END %]
132
     <h2>Other data</h2>
14
     [% IF ( default ) %]
15
        [% IF ( upgrading ) %]
16
            Update database
17
        [% ELSE %]
18
            Install basic configuration settings
19
        [% END %]
133
     [% END %]
20
     [% END %]
134
     [% IF ( en_sample_data ) %]
21
     [% IF ( choosemarc ) %]
135
         <h4><span class="error">No sample data and settings are available for your language.
22
        Select your MARC flavor
136
                 Defaulting to the samples supplied for English (en)<span></h4>
137
     [% END %]
23
     [% END %]
138
     [% FOREACH levelloo IN levelloop %]
24
     [% IF ( selectframeworks ) %]
139
     <div>
25
        Selecting default settings
140
     <h3>[% levelloo.label %]</h3>
141
     [% FOREACH framework IN levelloo.frameworks %]
142
        <table style="border:1px;vertical-align:top;">
143
        <tr>
144
        <td style="vertical-align:top;">
145
            [% IF ( framework.checked ) %]
146
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
147
            [% ELSE %]
148
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
149
            [% END %]
150
        </td>
151
        <td>
152
                <label for="[% framework.fwkname %]">
153
                    [% framework.fwkdescription %]
154
                    <em>([% framework.fwkname %])</em>
155
                </label>
156
        </td>
157
        </table>
158
     [% END %]
26
     [% END %]
159
     </div>
27
     [% IF ( addframeworks ) %]
28
        Default data loaded
160
     [% END %]
29
     [% END %]
161
     <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
30
     [% IF ( finish ) %]
162
     please be patient.</p>
31
        Installation complete
163
     <p><input type="submit" value="Import &gt;&gt;" />
32
     [% END %]
164
     </p>
33
</title>
165
     </form>
166
[% END %]
167
34
35
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
36
[% INCLUDE 'installer-doc-head-close.inc' %]
37
</head>
168
38
169
[% IF ( addframeworks ) %]
39
<body id="installer" class="installer">
170
    [% FOREACH lis IN list %]
40
    <div class="container-fluid">
171
    <h3>[% lis.level %] data added</h3>
41
        <div class="row">
172
    <ul>
42
            <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
173
    [% FOREACH fwklis IN lis.fwklist %]
43
                <h1 id="logo"><a href="#">Koha</a></h1>
174
        <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li>
44
                [% IF ( finish ) %]
175
    [% END %]
45
                    <h2>Web installer &rsaquo; Installation complete</h2>
176
    </ul>
46
                    <h3>Congratulations, installation complete</h3>
177
    [% END %]
47
                    <p>
178
    <h3>All done!</h3>
48
                        If this page does not redirect in 10 seconds, <a href="/cgi-bin/koha/installer/onboarding.pl">start onboarding process</a>.
179
    <p>Installation complete.<br />
49
                    </p>
180
        <p>
50
                [% END %]
181
            You can help the Koha community by sharing your statistics with us.
182
            <br>If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the admin module.
183
        </p>
184
        <p>Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool.
185
        <form name="finish">
186
        <input type="hidden" name="step" value="3" />
187
        <input type="hidden" name="op" value="finish" />
188
        <input type="submit" value="Set up Koha with the onboarding tool"/>
189
        </form>
190
        </p>
191
    </p>
192
[% END %]
193
51
52
                [% IF ( choosemarc ) %]
53
                    <h2>Select your MARC flavor</h2>
194
54
195
[% IF ( importdatastructure ) %]
55
                    <form name="frameworkselection" method="post" action="install.pl">
196
    [% IF ( error ) %]
56
                        <input type="hidden" name="step" value="3" />
197
        <p>The following error occurred while importing the database structure:</p>
57
                        <input type="hidden" name="op" value="selectframeworks" />
198
        <p class="error">[% error %] </p>
199
        <p>Please contact your system administrator</p>
200
    [% ELSE %]
201
        <h2 align="center">Success</h2>
202
        <ul>
203
        <li>Database tables created</li>
204
        </ul>
205
        <form action="install.pl">
206
        <input type="hidden" name="step" value="3" />
207
            <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
208
        </form>
209
    [% END %]
210
[% END %]
211
58
59
                        <p>MARC stands for Machine Readable Cataloging. A MARC record contains bibliographic information about an item. MARC21 is used globally, whereas UNIMARC tends to be used in Europe. </p>
212
60
213
[% IF ( proposeimport ) %]
61
                        [% FOREACH flavourloo IN flavourloop %]
214
    <p>Now we're ready to create the database tables and fill them with some default data.</p>
62
                            [% IF ( flavourloo.label == "Unimarc") %]
215
    <form action="install.pl">
63
                                 <p>
216
    <input type="hidden" name="step" value="3" />
64
                                     <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]</label>
217
    <input type="hidden" name="op" value="importdatastructure" />
65
                                 </p>
218
    <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
66
                            [% ELSE %]
219
    </form>
67
                                 <p>
220
[% END %]
68
                                     <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %]</label>
69
                                 </p>
70
                            [% END %]
71
                        [% END %]
72
                        <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
73
                    </form>
74
                [% END # / IF choosemarc %]
221
75
222
[% IF ( default ) %]
76
                [% IF ( selectframeworks ) %]
223
    [% IF ( upgrading ) %]
77
                    <h2>Web installer &rsaquo; Selecting default settings</h2>
224
        <p>
78
225
            We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database.
79
226
        <br>
80
                    <form name="frameworkselection" method="post" action="install.pl">
227
        <a href="install.pl?step=3&amp;op=updatestructure" class="button">Update your database</a>
81
                        <input type="hidden" name="step" value="3" />
228
        </p>
82
                        <input type="hidden" name="op" value="addframeworks" />
229
    [% ELSE %]
83
                        [% IF ( frameworksloop ) %]
230
        <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation:
84
                            <h3>MARC frameworks: [% marcflavour %]</h3>
231
        <br>
85
                            [% IF ( en_marc_frameworks ) %]
232
        <br>
86
                                <h4><span class="error">No MARC frameworks are available for your language.
233
            <a href="install.pl?step=3&amp;op=choosemarc" class="button">Install basic configuration settings</a>
87
                                Defaulting to the frameworks supplied for English (en)<span></h4>
234
88
                            [% END %]
235
    [% END %]
89
                            [% FOREACH frameworksloo IN frameworksloop %]
236
[% END %]
90
                                <h4>[% frameworksloo.label %]</h4>
91
92
                                <div class="checkboxes">
237
93
238
[% IF ( updatestructure ) %]
94
                                    <p>
239
  <div><h2 align="center">Updating database structure</h2>
95
                                        <a class="selectall [% frameworksloo.label FILTER lower %]" href="#">Select all [% frameworksloo.label FILTER lower %] data</a>
240
  [% IF ( has_update_succeeds ) %]
96
                                        <a class="deselectall [% frameworksloo.label FILTER lower %]" href="#">Select no [% frameworksloo.label FILTER lower %] data</a>
241
  <p>Update report :</p>
97
                                    </p>
242
    <ul>
98
243
      [% FOREACH update_repor IN update_report %]
99
                                    [% FOREACH framework IN frameworksloo.frameworks %]
244
          <li>[% update_repor.line |html %]</li>
100
                                        <div class="checkbox">
245
      [% END %]
101
                                            <label>
246
    </ul>
102
                                                [% IF ( framework.checked ) %]
247
  [% END %]
103
                                                    <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" checked="checked" />
248
  [% IF ( has_update_errors ) %]
104
                                                [% ELSE %]
249
  <p>Update errors :</p>
105
                                                    <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
250
    <ul>
106
                                                [% END %]
251
      [% FOREACH update_error IN update_errors %]
107
                                                [% framework.fwkdescription %]
252
          <li class="update_error">[% update_error.line |html %]</li>
108
                                                <em>([% framework.fwkname %])</em>
253
      [% END %]
109
                                            </label>
254
    </ul>
110
                                        </div>
255
  [% END %]
111
                                        <hr />
256
 [% UNLESS ( has_update_errors ) %]
112
                                    [% END # / FOREACH framework %]
257
    <p>Everything went OK, update done.</p>
113
                                </div>
258
  [% END %]
114
                            [% END # / FOREACH frameworksloo %]
259
<a href="install.pl?step=3&amp;op=finished" class="button">Continue to log in to Koha</a>
115
                        [% END # / IF frameworkdsloop %]
260
  </div>
116
117
                        <h3>Other data</h3>
118
119
                        [% IF ( en_sample_data ) %]
120
                            <h4><span class="error">No sample data and settings are available for your language.
121
                            Defaulting to the samples supplied for English (en)<span></h4>
122
                        [% END %]
123
124
                        [% FOREACH levelloo IN levelloop %]
125
                            <h4>[% levelloo.label %]</h4>
126
127
                            <div class="checkboxes">
128
129
                                <p>
130
                                    <a class="selectall [% levelloo.label FILTER lower %]" href="#">Select all [% levelloo.label FILTER lower %] data</a>
131
                                    <a class="deselectall [% levelloo.label FILTER lower %]" href="#">Select no [% levelloo.label FILTER lower %] data</a>
132
                                </p>
133
134
                                [% FOREACH framework IN levelloo.frameworks %]
135
                                    <div class="checkbox">
136
                                        <label for="[% framework.fwkname %]">
137
                                            [% IF ( framework.checked ) %]
138
                                                <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]" checked="checked" />
139
                                            [% ELSE %]
140
                                                <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]" />
141
                                            [% END %]
142
                                            [% framework.fwkdescription %]
143
                                            <em>([% framework.fwkname %])</em>
144
                                        </label>
145
                                    </div> <!-- /div.checkbox -->
146
                                [% END # / FOREACH framework %]
147
                            </div>
148
                        [% END # / FOREACH levelloo %]
149
150
                        <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete. Please be patient.</p>
151
152
                        <p><input type="submit" value="Import" class="btn btn-primary" /></p>
153
                    </form>
154
                [% END # / IF selectframeworks %]
155
156
                [% IF ( addframeworks ) %]
157
                    <h2>Web installer &rsaquo; Default data loaded</h2>
158
                    [% FOREACH lis IN list %]
159
                        <h3>[% lis.level FILTER ucfirst %] data added</h3>
160
                        <ul>
161
                            [% FOREACH fwklis IN lis.fwklist %]
162
                            <li>
163
                                [% fwklis.fwkname %]
164
                                [% IF ( fwklis.error ) %]<p class="bg-danger">[% fwklis.error %]</p>[% END %]
165
                            </li>
166
                            [% END %]
167
                        </ul>
168
                    [% END %]
169
170
                    <h3>Basic installation complete.</h3>
171
172
                    <p>In the next steps you will be guided through some basic requirements like defining Koha user with all administrative privileges (superlibrarian).</p>
173
174
                    <form action="/cgi-bin/koha/installer/install.pl" method="post" name="finish">
175
                        <h4>
176
                            You can help the Koha community by sharing your statistics with us.
177
                        </h4>
178
                        <p>
179
                            If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the Administration module.
180
                        </p>
181
182
                        <input type="hidden" name="step" value="3" />
183
                        <input type="hidden" name="op" value="finish" />
184
                        <p>
185
                            <input value="Set up some of Koha's basic requirements" class="btn btn-primary" type="submit" />
186
                        </p>
187
                    </form>
188
189
                [% END # / IF addframeworks %]
190
191
                [% IF ( importdatastructure ) %]
192
                    [% IF ( error ) %]
193
                        <p>The following error occurred while importing the database structure:</p>
194
                        <div class="alert alert-warning"><p>[% error %] </p></div>
195
                        <p>Please contact your system administrator</p>
196
                    [% ELSE %]
197
                        <h2>Web installer &rsaquo; Success</h2>
198
                        <div class="alert alert-success"><p>Database tables created</p></div>
199
                        <form action="install.pl" method="post">
200
                            <input type="hidden" name="step" value="3" />
201
                            <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
202
                        </form>
203
                    [% END %]
204
                [% END # / IF importdatastructure %]
205
206
                [% IF ( proposeimport ) %]
207
                    <h2>Web installer &rsaquo; Set up database</h2>
208
                    <p>Now we're ready to create the database tables and fill them with some default data.</p>
209
                    <form action="install.pl" method="post">
210
                        <input type="hidden" name="step" value="3" />
211
                        <input type="hidden" name="op" value="importdatastructure" />
212
                        <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
213
                    </form>
214
                [% END # / proposeimport %]
215
216
                [% IF ( default ) %]
217
                    [% IF ( upgrading ) %]
218
                        <h2>Web installer &rsaquo; Update database</h2>
219
                        <p>We are upgrading from Koha [% dbversion %] to [% kohaversion %]</p>
220
                        <p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
221
                    [% ELSE %]
222
                        <h2>Web installer &rsaquo; Install basic configuration settings</h2>
223
                        <p>We are ready to do some basic configuration.</p>
224
                        <p> <a href="install.pl?step=3&amp;op=choosemarc" class="btn btn-primary">Continue to the next step</a> </p>
225
                    [% END %]
226
                [% END # / IF default %]
227
228
                [% IF ( updatestructure ) %]
229
                    <h2>Updating database structure</h2>
230
                    [% IF ( has_update_succeeds ) %]
231
                        <p>Update report :</p>
232
                        <ul>
233
                            [% FOREACH update_repor IN update_report %]
234
                                <li>[% update_repor.line |html %]</li>
235
                            [% END %]
236
                        </ul>
237
                    [% END %]
238
                    [% IF ( has_update_errors ) %]
239
                        <p>Update errors :</p>
240
                        <ul>
241
                            [% FOREACH update_error IN update_errors %]
242
                                <li class="update_error">[% update_error.line |html %]</li>
243
                            [% END %]
244
                        </ul>
245
                    [% END %]
246
                    [% UNLESS ( has_update_errors ) %]
247
                        <p>Everything went okay. Update done.</p>
248
                    [% END %]
249
                    <p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
250
               [% END # / IF updatestructure %]
251
            </div> <!-- / #installer-step3 -->
252
        </div> <!-- / .row -->
253
254
[% IF ( selectframeworks ) %]
255
    <script type="text/javascript">
256
        $(document).ready(function(){
257
            $(".selectall,.deselectall").on("click",function(e){
258
                e.preventDefault();
259
                var container = $(this).parent().parent();
260
                if( $(this).hasClass("selectall") ){
261
                    var state = true;
262
                } else {
263
                    var state = false;
264
                }
265
                $( container ).find("input").prop("checked", state);
266
                $( container ).find(".selectall,.deselectall").toggle();
267
            });
268
        });
269
    </script>
261
[% END %]
270
[% END %]
262
271
263
</div>
272
[% INCLUDE 'intranet-bottom.inc' %]
264
</body>
265
</html>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt (-32 / +35 lines)
Lines 1-38 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
2
3
<title>Koha &rsaquo; Web installer &rsaquo; Create a library</title>
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'datatables.inc' %]
5
</head>
5
6
6
<head><title>Welcome &rsaquo; to  &rsaquo; Koha</title></head>
7
<body id="installer" class="installer">
8
    <div class="container-fluid">
9
        <div class="row">
10
            <div id="onboarding-step1" 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>
12
                <h2>Web installer &rsaquo; Create a library</h2>
7
13
8
<div>
14
                [% INCLUDE 'onboarding_messages.inc' %]
9
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
10
</div>
11
15
12
[% INCLUDE 'onboarding_messages.inc' %]
16
                <form name="LibraryCreation" method="post" action="onboarding.pl">
17
                    <fieldset class="rows" >
18
                        <input type="hidden" name="step" value="1"/>
19
                        <input type="hidden" name="op" value="add_validate_library"/>
20
                        <ol>
21
                            <li>
22
                                <label for="branchcode" class="required">Library code: </label>
23
                                <input type="text"  pattern="[0-9A-Za-z]{1,10}" name="branchcode" id="branchcode" size="10" maxlength="10" value="" class="required" required="required" />
24
                                <span class="required">Required</span>
25
                            </li>
26
                            <li>
27
                                <label for="branchname" class="required">Name: </label>
28
                                <input type="text" name="branchname" id="branchname" size="42" class="required" required="required">
29
                                <span class="required">Required</span>
30
                            </li>
31
                        </ol>
32
                        <p>To add another library and for more settings, go to:
33
                            <span class="breadcrumbs"> Administration <b>&rsaquo;</b> Libraries and groups </span>
34
                        </p>
35
                        <input type="submit" class="btn btn-primary" value="Submit" />
36
                    </fieldset>
37
                </form>
38
            </div> <!-- / #onboarding-step1 -->
39
        </div> <!-- / .row -->
13
40
14
<form name="LibraryCreation" method="post" action="onboarding.pl">
41
[% INCLUDE 'intranet-bottom.inc' %]
15
    <fieldset class="rows" >
16
         <h2>Create a library</h2>
17
         <input type="hidden" name="step" value="1"/>
18
         <input type="hidden" name="op" value="add_validate_library"/>
19
         <ol>
20
             <li>
21
                <label for="branchcode" class="required">Library code: </label>
22
                <input type="text"  pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" name="branchcode" id="branchcode" size="10" maxlength="10" value="" class="required" required="required" />
23
                <span class="required">Required</span>
24
            </li>
25
            <li>
26
                <label for="branchname" class="required">Name: </label>
27
                <input type="text" name="branchname" id="branchname" title="Please enter the name of your institution" size="42" value="" class="required" required="required" style="width:200px;">
28
                <span class="required">Required</span>
29
            </li>
30
         </ol>
31
         <p>
32
            To add another library and for more settings, <br>
33
            go to:<br>
34
            More -> Administration -> Libraries and groups<br>
35
         </p>
36
         <input type="submit" class="action" value="Submit"/>
37
    </fieldset>
38
</form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-101 / +104 lines)
Lines 1-123 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
4
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
5
<title> Add a patron category</title>
4
<title>Koha &rsaquo; Web installer &rsaquo; Add a patron category</title>
5
[% IF (categories && categories.count > 1 )
6
    # This if statement checks if the categories variable handed to this template
7
    # by onboarding.pl has data in it. If the categories variable does have data
8
    # in it this means that the user has previously imported sample patron category
9
    # data and so we do not need to show them the create patron category screen 1,
10
    #instead we can display a screen with ubtton redirecting the user to step 3 %]
11
    <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3">
12
[% END %]
6
[% INCLUDE 'installer-doc-head-close.inc' %]
13
[% INCLUDE 'installer-doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
14
[% INCLUDE 'validator-strings.inc' %]
8
[% INCLUDE 'js_includes.inc' %]
15
[% INCLUDE 'installer-strings.inc' %]
9
[% INCLUDE 'datatables.inc' %]
16
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
10
<script type="text/javascript">
11
    var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field."));
12
    var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date."));
13
    var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrolment period."));
14
15
jQuery.validator.addMethod( "enrollment_period", function(){
16
      enrolmentperiod = $("#enrolmentperiod").val();
17
      enrolmentperioddate = $("#enrolmentperioddate").val();
18
      if (( $("#enrolmentperiod").val() == "" && $("#enrolmentperioddate").val() == "") || ($("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "")) {
19
             return false;
20
      } else {
21
             return true;
22
      }
23
    }, MSG_ONE_ENROLLMENTPERIOD
24
);
25
</script>
26
<script type="text/javascript" src="[% themelang %]/js/categories.js"></script>
27
</head>
17
</head>
28
18
19
<body id="installer" class="installer">
20
    <div class="container-fluid">
21
        <div class="row">
22
            <div id="onboarding-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
23
                <h1 id="logo"><a href="#">Koha</a></h1>
29
24
30
<div>
25
                <h2>Web installer &rsaquo; Create a patron category</h2>
31
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
32
</div>
33
26
34
[% INCLUDE 'onboarding_messages.inc' %]
27
                [% INCLUDE 'onboarding_messages.inc' %]
35
<h1 align="left"> Create a new patron category</h1>
36
<p> The patron category you create in this form is going to be the one which the new administrator patron account will have.</p>
37
   <form id="category_form" method="post" action="onboarding.pl">
38
   <fieldset class="rows">
39
        <input type="hidden" name="step" value="2"/>
40
        <input type="hidden" name="op" value="add_validate_category" />
41
            <ol>
42
                <li>
43
                    <label for="categorycode" class="required">Category code: </label>
44
                    <input type="text" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" id="categorycode" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" />
45
                    <span class="required">Required</span>
46
                </li>
47
28
48
                <li>
29
                <p> The patron category you create will be used by the <span class="bg-info">administrator account</span>.</p>
49
                    <label for="description" class="required">Description: </label>
50
                    <input type="text" name="description" title="Please enter a description of the category" size="40" maxlength="80" class="required" required="required" value="[% category.description |html%]" />
51
                    <span class="required">Required</span>
52
                </li>
53
30
54
                <li>
31
                <form id="category_form" method="post" action="onboarding.pl">
55
                    <label for="overduenoticerequired">Overdue notice required: </label>
32
                    <fieldset class="rows">
56
                    <select name="overduenoticerequired" value="overduenoticerequired">
33
                        <input type="hidden" name="step" value="2" />
57
                        [% IF category.overduenoticerequired %]
34
                        <input type="hidden" name="op" value="add_validate_category" />
58
                            <option value="0">No</option>
35
                        <ol>
59
                            <option value="1" selected="selected">Yes</option>
36
                            <li>
60
                        [% ELSE %]
37
                                <label for="categorycode" class="required">Category code: </label>
61
                            <option value="0" selected="selected">No</option>
38
                                <input type="text" pattern="[0-9A-Za-z]{1,10}" id="categorycode" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" />
62
                            <option value="1">Yes</option>
39
                                <span class="required">Required</span>
63
                        [% END %]
40
                            </li>
64
                    </select>
65
                </li>
66
41
67
                <li>
42
                            <li>
68
                    <label for="category_type" class="required">Category type: </label>
43
                                <label for="description" class="required">Description: </label>
69
                    Staff
44
                                <input type="text" id="description" name="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html%]" />
70
                </li>
45
                                <span class="required">Required</span>
46
                            </li>
71
47
72
                <li>
48
                            <li>
73
                    <label for="default_privacy">Default privacy: </label>
49
                                <label for="overduenoticerequired">Overdue notice required: </label>
74
                    <select value="default_privacy" name="default_privacy" required="required">
50
                                <select name="overduenoticerequired" id="overduenoticerequired">
75
                        [% SET default_privacy = 'default' %]
51
                                    [% IF category.overduenoticerequired %]
52
                                        <option value="0">No</option>
53
                                        <option value="1" selected="selected">Yes</option>
54
                                    [% ELSE %]
55
                                        <option value="0" selected="selected">No</option>
56
                                        <option value="1">Yes</option>
57
                                    [% END %]
58
                                </select>
59
                            </li>
76
60
77
                        [% IF category %]
61
                            <li>
78
                           [% SET default_privacy = category.default_privacy %]
62
                                <span class="label">Category type: </span>
79
                        [% END %]
63
                                <input type="hidden" name="category_type" value="S" />
64
                                Staff
65
                            </li>
80
66
81
                        [% SWITCH default_privacy %]
82
                        [% CASE 'forever' %]
83
                            <option value="default">Default</option>
84
                            <option value="never">Never</option>
85
                            <option value="forever" selected="selected">Forever</option>
86
                        [% CASE 'never' %]
87
                            <option value="default">Default</option>
88
                            <option value="never" selected="selected">Never</option>
89
                            <option value="forever">Forever</option>
90
                        [% CASE %]
91
                            <option value="default" selected="selected">Default</option>
92
                            <option value="never">Never</option>
93
                            <option value="forever">Forever</option>
94
                        [% END %]
95
                    </select>
96
                    <p>Controls how long a patrons checkout history is kept for new patrons of this category. "Never"     anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <i>batch_anonymise.pl</i> which should be set up by your system administrator.</p>
97
                </li>
98
        </ol>
99
        <span class="label">Enrolment period: </span>
100
        </br>
101
                <fieldset>
102
                <legend>Choose one</legend>
103
                        <ol>
104
                            <li>
67
                            <li>
105
                                <label for="enrolmentperiod" style="width:6em;">In months: </label>
68
                                <label for="default_privacy">Default privacy: </label>
106
                                <input type="number" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" min="0" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
69
                                <select id="default_privacy" name="default_privacy" required="required">
70
                                    [% SET default_privacy = 'default' %]
71
72
                                    [% IF category %]
73
                                        [% SET default_privacy = category.default_privacy %]
74
                                    [% END %]
75
76
                                    [% SWITCH default_privacy %]
77
                                        [% CASE 'forever' %]
78
                                            <option value="default">Default</option>
79
                                            <option value="never">Never</option>
80
                                            <option value="forever" selected="selected">Forever</option>
81
                                        [% CASE 'never' %]
82
                                            <option value="default">Default</option>
83
                                            <option value="never" selected="selected">Never</option>
84
                                            <option value="forever">Forever</option>
85
                                        [% CASE %]
86
                                            <option value="default" selected="selected">Default</option>
87
                                            <option value="never">Never</option>
88
                                            <option value="forever">Forever</option>
89
                                    [% END %]
90
                                </select>
91
                                <div class="hint">
92
                                        Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <code>batch_anonymise.pl</code> which should be set up by your system administrator.
93
                                </div>
107
                            </li>
94
                            </li>
108
                            <li>
95
                            <li>
109
                                <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
96
                                <span class="label">Enrolment period: </span>
110
                                <input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
97
                                <fieldset class="rows">
98
                                    <ol>
99
                                        <li>
100
                                                <span class="label"> </span><strong>Choose one</strong>
101
                                            </li>
102
                                            <li>
103
                                            <label for="enrolmentperiod">In months: </label>
104
                                            <input type="number" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" min="0" size="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" />
105
                                        </li>
106
                                        <li>
107
                                             <label for="enrolmentperioddate">Until date: </label>
108
                                              <input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
109
                                             <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
110
                                        </li>
111
                                    </ol>
112
                                </fieldset>
111
                            </li>
113
                            </li>
112
                        </ol>
114
                        </ol>
113
                 </fieldset>
114
             <p> Success: patron category created! </p>
115
             <p> To add another patron category and for more settings<br>
116
             go to:<br>
117
             More -> Administration -> Patron categories<br>
118
115
119
                <input type="submit" class="action" value="Submit" />
116
                        <p> To add another patron category and for more settings go to:
120
</fieldset>
117
                            <span class="breadcrumbs"> Administration <b>&rsaquo;</b> Patron categories</span>
121
</form>
118
                        </p>
119
120
                        <input type="submit" class="btn btn-primary" value="Submit" />
121
                    </fieldset>
122
                </form>
123
            </div> <!-- / #onboarding-step2 -->
124
        </div> <!-- / .row -->
122
125
123
[% INCLUDE 'intranet-bottom.inc' %]
126
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-141 / +103 lines)
Lines 1-152 Link Here
1
<!--Includes for creating patron-->
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Price %]
5
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Web installer &rsaquo; Create Koha administrator patron</title>
6
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'validator-strings.inc' %]
8
[% INCLUDE 'datatables.inc' %]
5
[% INCLUDE 'installer-strings.inc' %]
9
[% INCLUDE 'js_includes.inc' %]
6
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
10
11
<head>
12
<title>Create Koha administrator patron</title>
13
<!--jQuery scripts for creating patron-->
14
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
15
<script type="text/javascript">
16
     var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them"));
17
     jQuery.validator.addMethod( "password_match", function(value,element){
18
        var password = document.getElementById('password').value
19
        var confirmpassword = document.getElementById('password2').value
20
        if ( password != confirmpassword ){
21
                return false;
22
        }
23
        else{
24
                return true
25
        }
26
     },  MSG_PASSWORD_MISMATCH
27
);
28
29
$(document).ready(function(){
30
   $("#Submit").click(function(){
31
      $("#createpatron").validate({
32
        rules: {
33
            surname: {
34
                required: true,
35
            },
36
            firstname: {
37
                required: true,
38
            },
39
            cardnumber: {
40
                required: true,
41
            },
42
            password: {
43
                 password_match:true
44
            }
45
        },
46
        messages: {
47
           password: {
48
                 required: MSG_PASSWORD_MISMATCH
49
           },
50
        }
51
      });
52
   });
53
});
54
</script>
55
</head>
7
</head>
56
8
57
<div>
9
<body id="installer" class="installer">
58
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
10
    <div class="container-fluid">
59
</div>
11
        <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">
13
                <h1 id="logo"><a href="#">Koha</a></h1>
14
                <h2>Web installer &rsaquo; Create Koha administrator patron</h2>
15
16
                [% INCLUDE 'onboarding_messages.inc' %]
60
17
61
[% INCLUDE 'onboarding_messages.inc' %]
18
                <p>
19
                Now we will create a patron with superlibrarian permissions. Log in with this to access Koha as a staff member with all permissions.
20
                </p>
21
                <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
22
                    <fieldset class="rows">
23
                        <input type="hidden" name="step" value="3" />
24
                        <input type="hidden" name="op" value="add_validate_patron" />
25
                        <h3>Administrator identity</h3>
26
                        <ol>
27
                            <li>
28
                                <label for="surname" class="required">Surname: </label>
29
                                <input type="text" id="surname" name="surname" value="[% surname |html %]" class="required" required="required" />
30
                                <span class="required">Required</span>
31
                            </li>
32
                            <li>
33
                                <label for="firstname" class="required">First name: </label>
34
                                <input  type="text" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
35
                                <span class="required">Required</span>
36
                            </li>
37
                        </ol>
62
38
63
<h1 align="left"> Create koha administrator patron</h1>
39
                        <ol>
64
<p>
40
                            <li>
65
Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions.
41
                                <label for="cardnumber" class="required">Card number: </label>
66
</p>
42
                                [% IF patrons && patrons > 1 %]
67
<form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
43
                                    <input type="text" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
68
    <fieldset class="rows">
44
                                [% ELSE %]
69
         <input type="hidden" name="step" value="3"/>
45
                                    <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
70
         <input type="hidden" name="op" value="add_validate_patron" />
46
                                [% END %]
71
            <legend id="library_management_lgd">Library management</legend>
47
                                <span class="required">Required</span>
72
            <ol>
48
                            </li>
73
            <h3>Patron identity</h3>
49
                            <li>
74
                <li>
75
                    <label for="surname" class="required">Surname: </label>
76
                    <input type="text" id="surname" name="surname" title="Please only enter letters in the surname field" value="[% surname |html %]" class="required" required="required" />
77
                    <span class="required">Required</span>
78
                </li>
79
                <li>
80
                    <label for="firstname" class="required">First name: </label>
81
                    <input  type="text" name="firstname" title="Please only enter letters in the first name field" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
82
                    <span class="required">Required</span>
83
                </li>
84
            </ol>
85
50
86
            <ol>
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-->
87
                <li>
52
                                <label for="libraries" class="required"> Library: </label>
88
                    <label for="cardnumber" class="required">Card number: </label>
53
                                <select name="libraries" size="1" id="libraries">
89
                    [% IF patrons && patrons > 1 %]
54
                                    [% FOREACH library IN libraries %]
90
                        <input type="text" id="cardnumber" title="Please enter a cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
55
                                        <option value="[% library.branchcode %]"> [% library.branchname %] </option>
91
                    [% ELSE %]
56
                                    [% END %]
92
                        <input type="text" id="cardnumber" title="Please enter a cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
57
                                </select>
93
                    [% END %]
58
                                <span class="required"> Required</span>
94
                    <span class="required">Required</span>
59
                            </li>
95
                </li>
60
                            <li>
96
                <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 %]">[%category.description %]</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>
97
71
98
                <!--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-->
72
                            <h3>Administrator account permissions</h3>
99
                    <label for="libraries" class="required"> Library: </label>
73
                        <ol>
100
                    <select name="libraries" size="1" id="libraries">
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>
101
80
102
                     [% FOREACH library IN libraries %]
81
                            <h3>Administrator login</h3>
103
                          <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %]
82
                        <ol>
104
                     [% END %]
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 give the new patron superlibrarian permissions go to:
105
                            <span class="breadcrumbs">More &rsaquo; Set permissions</span>
106
                        </p>
107
                    </fieldset>
105
108
106
                        </select>
109
                    <input type="submit" class="btn btn-primary" value="Submit" />
107
                    <span class="required"> Required</span>
110
                </form>
108
                </li>
111
            </div> <!-- / #onboarding-step3 -->
109
                <li>
112
        </div> <!-- / .row -->
110
                    <label for="categorycode_entry" class="required"> Patron category</label>
111
                    <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
112
                    [% FOREACH category IN categories %]
113
                        <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option>
114
                    [% END %]
115
                    </select>
116
                    <span class="required">Required</span><br><br>
117
                    <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
118
                </li>
119
            </ol>
120
113
121
            <ol>
114
[% INCLUDE 'intranet-bottom.inc' %]
122
                    <h3> Koha administrator patron permissions</h3>
123
                    <li>
124
                        <label> superlibrarian</label>
125
                    </li>
126
            </ol>
127
            <ol>
128
            <h3>OPAC/Staff Login</h3>
129
                <li>
130
                    <label for="userid" class="required">Username: </label>
131
                    <input type="text" name="userid" id ="userid" size="20" title="Please only enter a username of letters and numbers" value="[% userid |html %]" class="required" required="required" />
132
                    <span class="required">Required</span>
133
                </li>
134
                <li>
135
                    <label for="passwordlabel" class="required">Password: </label>
136
                    <input type="password" name="password" id="password" size="20" value="[% member.password |html %]" class="required" required="required">
137
                    <span class="required">Required</span>
138
                </li>
139
                <li>
140
                    <label for="password2" class="required">Confirm password: </label>
141
                    <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
142
                    <span class="required">Required</span>
143
                </li>
144
            </ol>
145
        <p>
146
            To create another patron, go to Patrons -> New Patron. <br>
147
            More -> Set Permissions in a user page to gain superlibrarian permissions.
148
        </p>
149
    </fieldset>
150
    <br>
151
    <input type="submit" id="Submit" class="action" value="Submit"/>
152
</form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-38 / +48 lines)
Lines 1-41 Link Here
1
<!-- includes for creating item type-->
2
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Web installer &rsaquo; Create a new item type </title>
3
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
<head>
4
[% INCLUDE 'validator-strings.inc' %]
5
    <title>Create item type</title>
5
[% INCLUDE 'installer-strings.inc' %]
6
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
6
</head>
7
</head>
7
<div>
8
8
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
9
<body id="installer" class="installer">
9
</div>
10
    <div class="container-fluid">
10
11
        <div class="row">
11
[% INCLUDE 'onboarding_messages.inc' %]
12
            <div id="onboarding-step4" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
12
13
                <h1 id="logo"><a href="#">Koha</a></h1>
13
<!--Create a item type screen 1-->
14
                <h2>Web installer &rsaquo; Create a new item type </h2>
14
<h1 align="center"> Create a new Item type </h1>
15
15
<p> Item types are used to group related items. Examples of item types are books, cds, and DVDs. <br><br> When adding to your institutions catalogue you will create an item of a particular item type. <br><br> Importantly item types are what you apply     circulation rules to. Circulation rules govern how your institution will lend its items, for example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for borrowing any DVD.</p>
16
                [% INCLUDE 'onboarding_messages.inc' %]
16
<form name="createitemform" method="post" action="onboarding.pl">
17
17
    <fieldset class="rows">
18
                <!--Create a item type screen 1-->
18
        <input type="hidden" name="step" value="4"/>
19
19
        <input type="hidden" name="op" value="add_validate_itemtype" />
20
                    <p> Item types are used to group related items. Examples of item types might be books, CDs, or DVDs.</p>
20
        <ol>
21
                    <p> When adding to your institution's catalog you will create an item of a particular item type.</p>
21
            <li>
22
                    <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>
22
                <label for="itemtype" class="required">Item type code: </label>
23
23
                <input type="text" name="itemtype" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" id="itemtype" size="10" maxlength="10"  class="required" required="required" value="[% itemtype.itemtype |html %]" />
24
                    <form id="createitemform" method="post" action="onboarding.pl">
24
                <span class="required">Required</span>
25
                    <fieldset class="rows">
25
            </li>
26
                        <input type="hidden" name="step" value="4" />
26
27
                        <input type="hidden" name="op" value="add_validate_itemtype" />
27
            <li>
28
                        <ol>
28
                <label for="description" class="required">Description: </label>
29
                            <li>
29
                <input type="text" name="description" id="description" title="Please only enter letters and/or numbers into this item type description" size="42" value="[% itemtype.description |html %]" class="required" required="required">
30
                                <label for="itemtype" class="required">Item type code: </label>
30
                <span class="required">Required</span>
31
                                <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 %]" />
31
            </li>
32
                                <span class="required">Required</span>
32
        </ol>
33
                            </li>
33
    <br>
34
34
    <p> To create another item type later and for more settings <br>
35
                            <li>
35
            go to: <br>
36
                                <label for="description" class="required">Description: </label>
36
            More -> Administration -> Item types <br>
37
                                <input type="text" name="description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required">
37
    </p>
38
                                <span class="required">Required</span>
38
39
                            </li>
39
    <input type="submit" class="action" value="Submit"/>
40
                        </ol>
40
</fieldset>
41
41
</form>
42
                        <p> To create another item type later and for more settings go to:
43
                            <span class="breadcrumbs"> Administration &rsaquo; Item types </span>
44
                        </p>
45
                        <input type="submit" class="btn btn-primary" value="Submit" />
46
                    </fieldset>
47
                </form>
48
            </div> <!-- / #onboarding-step4 -->
49
        </div> <!-- / .row -->
50
51
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-103 / +126 lines)
Lines 1-114 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Create Circulation rule</title>
2
<title>Koha &rsaquo; Web installer &rsaquo;
3
    [% IF all_done %]
4
        Complete
5
    [% ELSE %]
6
        Create circulation rule
7
    [% END %]
8
</title>
3
[% 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>
4
14
5
<div>
15
<body id="installer" class="installer">
6
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
16
    <div class="container-fluid">
7
</div>
17
        <div class="row">
18
            <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
19
                <h1 id="logo"><a href="#">Koha</a></h1>
8
20
9
[% INCLUDE 'onboarding_messages.inc' %]
21
                [% IF all_done %]
10
22
11
[% IF all_done %]
23
                    <h2>Web installer &rsaquo; Complete</h2>
12
<h1>Congratulations you have finished and ready to use Koha</h1>
24
                    <h3>Congratulations you have finished and are ready to use Koha</h3>
13
<a href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
25
                    <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
14
[% ELSE %]
15
    <h1 align="left"> Create a new circulation rule </h1>
16
    <form name="createcirculationrule" method="post" action="onboarding.pl">
17
        <fieldset class="rows">
18
           <input type="hidden" name="step" value="5"/>
19
           <input type="hidden" name="op" value="add_validate_circ_rule" />
20
              <ol>
21
              <li>
22
                  <label for="branch" class="required"> Library branch</label>
23
                  <select name="branch" id="branchname" required="required">
24
                  <option value""> Choose</option>
25
                  <option value="*" selected="selected">All</option>
26
                  [% FOREACH library IN libraries %]
27
                      <option id="branch" value="[% library.branchcode %]"> [% library.branchname %]</option>
28
                  [% END %]
29
                  </select>
30
                  <span class="required">Required</span>
31
              </li>
32
              <li>
33
                  <label for="categorycode" class="required">Patron category: </label>
34
                  <select name="categorycode" id="categorycodeselection" required="required" onchange = "update_categorycode(this);">
35
                      <option value=""> Choose</option>
36
                      <option value="*" selected="selected">All</option>
37
                      [% FOREACH category IN categories %]
38
                          <option id="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option>
39
                      [%END%]
40
                  </select>
41
                  <span class="required">Required</span>
42
              </li>
43
26
44
              <li>
27
                [% ELSE %]
45
                  <label for="itemtype"> Item type: </label>
46
                  <select id="itemtype" name="itemtype" required="required">
47
                  <option value""> Choose </option>
48
                  <option value="*" selected="selected">All</option>
49
                      [% FOREACH item IN itemtypes %]
50
                          <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %]
51
                      [%END%]
52
                  </select>
53
                  <span class="required"> Required</span>
54
              </li>
55
              <li>
56
                  <label for="maxissueqty" class="required">Current checkouts allowed: </label>
57
                  <input type="number" min="0" name="maxissueqty" title="Please only enter numbers" id="maxissueqty" size="10" value="50" class="required" required="required" />
58
                  <span class="required">Required</span>
59
              </li>
60
28
61
              <li>
29
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
62
                  <label for="issuelength" class="required">Loan period: </label>
63
                  <input type="number" min="0" name="issuelength" title="Please only enter numbers" id="issuelength" size="10" value="14" class="required" required="required" />
64
                  <span class="required">Required</span>
65
             </li>
66
             <li>
67
                  <label for="lengthunit">Units: </label>
68
                  <select name="lengthunit" id="lengthunit" required="required">
69
                  <option value=""> Choose </option>
70
                  [% SET units = 'days' %]
71
                  [% IF category %]
72
                      [% SET default_privacy = category.default_privacy %]
73
                  [% END %]
74
30
75
                  [% SWITCH units %]
31
                    [% INCLUDE 'onboarding_messages.inc' %]
76
                       [% CASE 'days' %]
77
                             <option value="days" selected="selected">Days</option>
78
                             <option value="hours">Hours</option>
79
                       [% CASE 'hours' %]
80
                             <option value="days">Days</option>
81
                             <option value="hours" selected="selected">Hours</option>
82
                  [% END %]
83
                  </select>
84
               </li>
85
               <li>
86
                  <label for="renewalsallowed" class="required">Renewals allowed: </label>
87
                  <input type="number" min="0" name="renewalsallowed" title="Please only enter numbers" id="renewalsallowed" size="10" max="10" value="10" class="required" required="required" />
88
                  <span class="required">Required</span>
89
               </li>
90
32
91
               <li>
33
                    <form name="createcirculationrule" method="post" action="onboarding.pl">
92
                  <label for="renewalperiod" class="required">Renewals period: </label>
34
                        <fieldset class="rows">
93
                  <input type="number" min="0" name="renewalperiod" title="Please only enter numbers" id="renewalperiod" size="10" value="14" class="required" required="required" />
35
                            <input type="hidden" name="step" value="5"/>
94
                  <span class="required">Required</span>
36
                            <input type="hidden" name="op" value="add_validate_circ_rule" />
95
               </li>
37
                            <ol>
38
                                <li>
39
                                    <label for="branchname" class="required"> Library branch</label>
40
                                    <select name="branch" id="branchname" required="required">
41
                                        <option value=""> Choose</option>
42
                                        <option value="*" selected="selected">All</option>
43
                                        [% FOREACH library IN libraries %]
44
                                            <option value="[% library.branchcode %]"> [% library.branchname %]</option>
45
                                        [% END %]
46
                                    </select>
47
                                    <span class="required">Required</span>
48
                                </li>
49
                                <li>
50
                                    <label for="categorycode" class="required">Patron category: </label>
51
                                    <select name="categorycode" id="categorycode" required="required">
52
                                        <option value=""> Choose</option>
53
                                        <option value="*" selected="selected">All</option>
54
                                        [% FOREACH category IN categories %]
55
                                            <option value = "[% category.categorycode %]"> [%category.description %]</option>
56
                                        [%END%]
57
                                    </select>
58
                                    <span class="required">Required</span>
59
                                </li>
96
60
97
               <li>
61
                                <li>
98
                  <label for="onshelfholds">On shelf holds allowed: </label>
62
                                    <label for="itemtype"> Item type: </label>
99
                  <select name="onshelfholds" id="onshelfholds" required="required">
63
                                    <select id="itemtype" name="itemtype" required="required">
100
                        <option value="">Choose</option>
64
                                        <option value=""> Choose </option>
101
                        <option value="1" selected="selected">Yes</option>
65
                                        <option value="*" selected="selected">All</option>
102
                        <option value="0">If any unavailable</option>
66
                                        [% FOREACH item IN itemtypes %]
103
                        <option value="2">If all unavailable</option>
67
                                            <option value = "[% item.itemtype %]"> [% item.itemtype %]
104
                  </select>
68
                                        [%END%]
105
               </li>
69
                                    </select>
106
            </ol>
70
                                    <span class="required"> Required</span>
107
            <p> To create circulation rule, go to <br>
71
                                </li>
108
            More -> Administration -> Circulation and Fine Rules
72
                                <li>
109
            </p>
73
                                    <label for="maxissueqty" class="required">Current checkouts allowed: </label>
74
                                    <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" value="50" class="required" required="required" />
75
                                    <span class="required">Required</span>
76
                                </li>
110
77
111
        </fieldset><br>
78
                                <li>
112
        <input type="submit" class="action" value="Submit"/>
79
                                    <label for="issuelength" class="required">Loan period: </label>
113
    </form>
80
                                    <input type="number" min="0" name="issuelength" id="issuelength" size="10" value="14" class="required" required="required" />
114
[% END %]
81
                                    <span class="required">Required</span>
82
                                </li>
83
                                <li>
84
                                    <label for="lengthunit">Units: </label>
85
                                    <select name="lengthunit" id="lengthunit" required="required">
86
                                        <option value=""> Choose </option>
87
                                        [% SET units = 'days' %]
88
                                        [% IF category %]
89
                                            [% SET default_privacy = category.default_privacy %]
90
                                        [% END %]
91
92
                                        [% SWITCH units %]
93
                                        [% CASE 'days' %]
94
                                            <option value="days" selected="selected">Days</option>
95
                                            <option value="hours">Hours</option>
96
                                        [% CASE 'hours' %]
97
                                            <option value="days">Days</option>
98
                                            <option value="hours" selected="selected">Hours</option>
99
                                        [% END %]
100
                                    </select>
101
                                </li>
102
                                <li>
103
                                    <label for="renewalsallowed" class="required">Renewals allowed: </label>
104
                                    <input type="number" min="0" name="renewalsallowed" id="renewalsallowed" size="10" max="10" value="10" class="required" required="required" />
105
                                    <span class="required">Required</span>
106
                                </li>
107
108
                                <li>
109
                                    <label for="renewalperiod" class="required">Renewals period: </label>
110
                                    <input type="number" min="0" name="renewalperiod" id="renewalperiod" size="10" value="14" class="required" required="required" />
111
                                    <span class="required">Required</span>
112
                                </li>
113
114
                                <li>
115
                                    <label for="onshelfholds">On shelf holds allowed: </label>
116
                                    <select name="onshelfholds" id="onshelfholds" required="required">
117
                                        <option value="">Choose</option>
118
                                        <option value="1" selected="selected">Yes</option>
119
                                        <option value="0">If any unavailable</option>
120
                                        <option value="2">If all unavailable</option>
121
                                    </select>
122
                                </li>
123
                            </ol>
124
                            <p>
125
                                To create circulation rule, go to:
126
                                <span class="breadcrumbs">Administration &rsaquo; Circulation and fine rules </span>
127
                            </p>
128
129
                        </fieldset>
130
131
                        <input type="submit" class="btn btn-primary" value="Submit" />
132
                    </form>
133
                [% END %]
134
            </div> <!-- / #onboarding-step5 -->
135
        </div> <!-- / .row -->
136
137
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js (-1 / +150 lines)
Line 0 Link Here
0
- 
1
function _(s) { return s; } // dummy function for gettext
2
3
jQuery.validator.addMethod( "category_code_check", function(value,element){
4
    var patt = /^[A-Za-z]{0,10}$/g;
5
    if (patt.test(element.value)) {
6
        return true;
7
    } else {
8
        return false;
9
    }
10
    }, MSG_LETTERS_ONLY
11
);
12
13
jQuery.validator.addMethod( "letters_only", function(value,element){
14
        var patt =/^[A-Za-z ]{0,30}$/g;
15
        if (patt.test(element.value)){
16
            return true;
17
        } else {
18
            return false;
19
        }
20
    }, MSG_LETTERS_ONLY
21
);
22
23
jQuery.validator.addMethod( "enrollment_period", function(){
24
      enrolmentperiod = $("#enrolmentperiod").val();
25
      enrolmentperioddate = $("#enrolmentperioddate").val();
26
      if (( $("#enrolmentperiod").val() === "" && $("#enrolmentperioddate").val() === "") || ($("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "")) {
27
             return false;
28
      } else {
29
             return true;
30
      }
31
    }, MSG_ONLY_ONE_ENROLLMENTPERIOD
32
);
33
34
jQuery.validator.addMethod( "password_match", function(value,element){
35
        var MSG_PASSWORD_MISMATCH = ( MSG_PASSWORD_MISMATCH );
36
        var password = document.getElementById('password').value;
37
        var confirmpassword = document.getElementById('password2').value;
38
39
        if ( password != confirmpassword ){
40
               return false;
41
          }
42
          else{
43
               return true;
44
          }
45
    },  MSG_PASSWORD_MISMATCH
46
);
47
48
jQuery.validator.addMethod( "cardnumber_check", function(value,element){
49
          var patt =/[A-Za-z1-9 ]+$/g;
50
          if (patt.test(element.value)){
51
              return true;
52
          } else {
53
              return false;
54
          }
55
     }, MSG_LETTERS_NUMBERS_ONLY
56
);
57
58
function toUC(f) {
59
    var x=f.value.toUpperCase();
60
    f.value=x;
61
    return true;
62
}
63
64
$(document).ready(function() {
65
    if ($("#branches option:selected").length < 1) {
66
        $("#branches option:first").attr("selected", "selected");
67
    }
68
    $("#categorycode").on("blur",function(){
69
         toUC(this);
70
    });
71
72
    $("#enrolmentperioddate").datepicker({
73
        minDate: 1
74
    }); // Require that "until date" be in the future
75
76
    $("#category_form").validate({
77
        rules: {
78
            categorycode: {
79
                    required: true,
80
                    category_code_check: true
81
            },
82
            description: {
83
                    required:true
84
            },
85
            enrolmentperiod: {
86
                   required: function(element){
87
                         return $("#enrolmentperioddate").val() === "";
88
                   },
89
                   digits: true,
90
                   enrollment_period: true,
91
            },
92
            enrolmentperioddate: {
93
                    required: function(element){
94
                        return $("#enrolmentperiod").val() === "";
95
                    },
96
                    enrollment_period: true,
97
                    // is_valid_date ($(#"enrolementperioddate").val());
98
            },
99
            dateofbirthrequired: {
100
                    digits: true
101
            },
102
            upperagelimit: {
103
                    digits: true
104
            },
105
            enrolmentfee: {
106
                    number: true
107
            },
108
            reservefee: {
109
                    number: true
110
            },
111
            category_type: {
112
                    required: true
113
            }
114
        },
115
        messages: {
116
            enrolmentperiod: {
117
                    required: MSG_ONE_ENROLLMENTPERIOD
118
            },
119
            enrolmentperioddate: {
120
                    required: MSG_ONE_ENROLLMENTPERIOD
121
            }
122
        }
123
    });
124
125
    $("#createpatron").validate({
126
        rules: {
127
            surname: {
128
                required: true
129
            },
130
            firstname: {
131
                required: true
132
            },
133
            cardnumber: {
134
                required: true
135
            },
136
            password: {
137
                password_match: true
138
            }
139
        },
140
        messages: {
141
            password: {
142
                required: MSG_PASSWORD_MISMATCH
143
            },
144
        }
145
146
    });
147
148
    $("#createitemform").validate();
149
    $("#createcirculationrule").validate();
150
});

Return to bug 17492