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

(-)a/koha-tmpl/intranet-tmpl/prog/css/installer.css (+229 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
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc (-78 / +1 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
    //<![CDATA[
89
        function _(s) { return s } // dummy function for gettext
14
        function _(s) { return s } // dummy function for gettext
90
    //]]>
15
    //]]>
91
</script>
16
</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/modules/installer/auth.tt (-41 / +52 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
10
11
[% INCLUDE 'installer-doc-head-close.inc' %]
11
[% INCLUDE 'installer-doc-head-close.inc' %]
12
<div id="login">
13
<h1><a>Koha [%- Koha.Version.release -%] installer</a></h1>
14
[% IF ( nopermission ) %]
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>
16
[% END %]
17
18
[% IF ( timed_out ) %]
19
<div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div>
20
[% END %]
21
22
[% IF ( different_ip ) %]
23
<div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div>
24
[% END %]
25
26
[% IF ( invalid_username_or_password ) %]
27
<div id="login_error"><strong>Error: </strong>Invalid username or password</div>
28
[% END %]
29
30
[% IF ( loginprompt ) %]
31
<!-- login prompt time-->
32
<form action="/cgi-bin/koha/installer/install.pl" method="post" name="mainform" id="mainform">
33
[% FOREACH INPUT IN INPUTS %]
34
    <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" />
35
[% END %]
36
<h3>Welcome to the Koha web installer</h3>
37
<p>Before we begin, please verify you have the correct credentials to continue. Please log in
38
with the username and password given to you by your systems administrator and located in your
39
<code>koha-conf.xml</code> configuration file.</p>
40
<p>Please enter your username and password:</p>
41
<p><label>Username:<br />
42
<input type="text" name="userid" id="userid" class="input" value="[% userid %]" size="20" tabindex="1" /></label>
43
</p>
44
<p><label>Password:<br />
45
<input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" /></label>
46
</p>
47
<p class="submit"><input id="submit" type="submit" value="Login" tabindex="4" /></p>
48
</form>
49
50
[% END %]
51
12
13
<div class="container-fluid">
14
    <div class="row">
15
        <div id="installer-login" class="installer-main col-sm-6 col-sm-offset-3 col-md-6 col-md-offset-3">
16
17
            <h1 id="logo"><a href="#">Koha</a></h1>
18
19
            [% IF ( nopermission ) %]
20
                <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>
21
            [% END %]
22
23
            [% IF ( timed_out ) %]
24
            <div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div>
25
            [% END %]
26
27
            [% IF ( different_ip ) %]
28
            <div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div>
29
            [% END %]
30
31
            [% IF ( invalid_username_or_password ) %]
32
            <div id="login_error"><strong>Error: </strong>Invalid username or password</div>
33
            [% END %]
34
35
            [% IF ( loginprompt ) %]
36
                <h2>Welcome to the Koha [%- Koha.Version.release -%] web installer</h2>
37
38
                <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>
39
40
                <form action="[% url %]" method="post" role="form" id="mainform">
41
                    [% FOREACH INPUT IN INPUTS %]
42
                        <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" />
43
                    [% END %]
44
45
                    <fieldset>
46
                        <legend>Please enter your username and password</legend>
47
48
                        <div class="form-group">
49
                            <label>Username:</label>
50
                            <input type="text" class="form-control" name="userid" id="userid" value="[% userid %]" size="20" tabindex="1" />
51
                        </div>
52
                        <div class="form-group">
53
                            <label>Password:</label>
54
                            <input type="password" class="form-control" name="password" id="password" value="" size="20" tabindex="2" />
55
                        </div>
56
                        <input id="submit" type="submit" class="btn btn-primary" value="Log in" tabindex="3" /></p>
57
                    </fieldset>
58
                </form>
59
            [% END %]
60
        </div>
61
    </div>
62
</div>
52
[% INCLUDE 'intranet-bottom.inc' %]
63
[% 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" role="form" 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" role="form" 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>
96
    </div>
97
82
[% INCLUDE 'intranet-bottom.inc' %]
98
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt (-61 / +68 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
4
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 2</h1>
4
<div class="container-fluid">
5
<h2 align="center">Database settings:</h2>
5
    <div class="row">
6
<ul>
6
        <div id="installer-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
7
<li><em>database type : </em>[% dbms %]</li>
7
8
<li><em>database name : </em>[% dbname %]</li>
8
            <h1 id="logo"><a href="#">Koha</a></h1>
9
<li><em>database host : </em>[% hostname %]</li>
9
            <h2>Web installer &rsaquo; Database settings</h2>
10
<li><em>database port : </em>[% port %] (probably OK if blank)</li>
10
            <h3>Database settings:</h3>
11
<li><em>database user : </em>[% user %]</li>
11
            <ul>
12
</ul>
12
                <li><em>Database type : </em> <code>[% dbms %]</code></li>
13
<div>
13
                <li><em>Database name : </em> <code>[% dbname %]</code></li>
14
[% IF ( dbconnection ) %]
14
                <li><em>Database host : </em> <code>[% hostname %]</code></li>
15
<form name="checkdbparameters" type="post" action="install.pl">
15
                <li><em>Database port : </em> <code>[% port %]</code> (probably okay if blank)</li>
16
  [% IF ( checkdatabaseaccess ) %]
16
                <li><em>Database user : </em> <code>[% user %]</code></li>
17
  <p>Connection established.</p>
17
            </ul>
18
     [% IF ( checkdatabasecreated ) %]
18
19
  <p>Database <code>[% dbname %]</code> exists.</p>
19
            [% IF ( dbconnection ) %]
20
        [% IF ( checkgrantaccess ) %]
20
                <form name="checkdbparameters" role="form" type="post" action="install.pl">
21
  <p>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</p>
21
                    [% IF ( checkdatabaseaccess ) %]
22
        [% ELSE %]
22
                        <div class="alert alert-success" role="alert"><p>Connection established.</p></div>
23
  <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code></p>
23
                        [% IF ( checkdatabasecreated ) %]
24
  <p class="tip">Ask for or make a change in the user's privileges. Need help? See
24
                            <ul>
25
    [% IF dbms == 'mysql' %]<a href="https://dev.mysql.com/doc/refman/5.5/en/grant.html">
25
                                <li>Database <code>[% dbname %]</code> exists.</li>
26
    [% ELSE %]<a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">
26
                            [% IF ( checkgrantaccess ) %]
27
    [% END %]this page</a>.
27
                                <li>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</li>
28
  </p>
28
                                </ul>
29
  <p class="tip">
29
                            [% ELSE %]
30
    User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code>
30
                                </ul>
31
  </p>
31
                                <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code> </p>
32
        [% END %]
32
                                <p class="tip"> Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %]
33
      [% ELSE %]
33
                                        <a href="http://dev.mysql.com/doc/refman/4.1/en/grant.html">
34
  <p class="error">No database named <code>[% dbname %]</code> detected.</p>
34
                                    [% ELSE %]
35
  <p class="tip">Please create the database before continuing.</p>
35
                                        <a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">
36
      [% END %]
36
                                    [% END %]
37
   [% ELSE %]
37
                                    this page</a>. User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code>
38
    <div class="error">[% error %] : [% message %]
38
                                </p>
39
                            [% END %]
40
                        [% ELSE %]
41
                            <div class="alert alert-danger" role="alert"><p>No database named <code>[% dbname %]</code> detected.</p></div>
42
                            <p>Please create the database before continuing.</p>
43
                        [% END %]
44
                    [% ELSE %]
45
                        <div class="alert alert-warning" role="alert">[% error %] : [% message %]</div>
46
                        <div class="tip">
47
                            <ul>
48
                                <li>Check that your database is running.</li>
49
                                <li>Check your database settings in <code>koha-conf.xml</code>. </li>
50
                                <li>Check the hostname setting in <code>koha-conf.xml</code>.
51
                                Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</li>
52
                            </ul>
53
                        </div>
54
                        <p>Please correct these errors and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again.
55
                    [% END %]
56
                    [% UNLESS ( error ) %]
57
                        <input type="hidden" name="step" value="3" />
58
                        <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
59
                    [% END %]
60
                </form>
61
            [% ELSE %]
62
                <form name="checkinformation" role="form" type="post" action="install.pl">
63
                    <input type="hidden" name="step" value="2" />
64
                    <input type="hidden" name="checkdb" value="1" />
65
                    <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
66
                </form>
67
            [% END %]
68
        </div>
39
    </div>
69
    </div>
40
    <div class="tip">
70
[% INCLUDE 'intranet-bottom.inc' %]
41
      <ul>
42
      <li>Check that your database is running.</li>
43
      <li>Check your database settings in <code>koha-conf.xml</code>. </li>
44
      <li>Check the hostname setting in <code>koha-conf.xml</code>. 
45
      Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</li>
46
    </div>
47
    <p>Please correct these errors and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again.
48
  [% END %]
49
  [% IF ( error ) %][% ELSE %]
50
<input type="hidden" name="step" value="3" />
51
<p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
52
[% END %]
53
</form>
54
[% ELSE %]
55
<form name="checkinformation" type="post" action="install.pl">
56
<input type="hidden" name="step" value="2" />
57
<input type="hidden" name="checkdb" value="1" />
58
<p> Please click 'Next' to continue if this information is correct <input value="Next &gt;&gt;" type="submit" /></p>
59
</form>
60
[% END %]
61
</div>
62
</body>
63
</html>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-281 / +220 lines)
Lines 1-311 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="10; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
2
<title>Koha &rsaquo; Web installer &rsaquo;
3
    [% IF ( proposeimport ) %]
4
        Set up database
5
    [% END %]
6
    [% IF ( importdatastructure ) %]
7
        [% IF ( error ) %]
8
            Error creating database tables
9
        [% ELSE %]
10
            Database tables created
11
        [% END %]
12
    [% END %]
13
    [% IF ( default ) %]
14
        [% IF ( upgrading ) %]
15
            Update database
16
        [% ELSE %]
17
            Install basic configuration settings
18
        [% END %]
19
    [% END %]
20
    [% IF ( choosemarc ) %]
21
        Select your MARC flavor
22
    [% END %]
23
    [% IF ( selectframeworks ) %]
24
        Selecting default settings
25
    [% END %]
26
</title>
27
[% IF ( finish ) %]<meta http-equiv="refresh" content="5; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
28
[% 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
29
13
function doLoad()
30
<div class="container-fluid">
14
{
31
    <div class="row">
15
    // the timeout value should be the same as in the "refresh" meta-tag
32
        <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
16
    setTimeout( "refresh()", 2*1000 );
17
}
18
33
19
function refresh(value)
34
            <h1 id="logo"><a href="#">Koha</a></h1>
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
35
31
    window.location.replace( surl );
36
            [% IF ( finish ) %]
32
}
37
                <h2>Web installer &rsaquo; Installation complete</h2>
33
38
                <h3>Congratulations, installation complete</h3>
34
function selectAllFrameworks()
39
                <p>
35
{
40
                    If this page does not redirect in 5 seconds, <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.
36
    //  A handy short link that selects all available checkboxes
41
                </p>
37
    //  on the page.
42
            [% END %]
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
43
62
//]]>
63
</script>
64
[% END %]
65
44
45
            [% IF ( choosemarc ) %]
46
                <h2>Choose your setup</h2>
47
                <p>Basic setup selects recommended settings by default.</p>
48
                <form name="frameworkselection" method="post" action="install.pl">
49
                    <input type="hidden" name="step" value="3" />
50
                    <input type="hidden" name="op" value="selectframeworks"/>
51
52
                    <p>
53
                        <label><input type="radio" name="setup" value="Basic" checked="checked" /> Basic</label>
54
                    </p>
55
                    <p>
56
                        <label><input type="radio" name="setup" value="Advanced"/> Advanced</label>
57
                    </p>
58
59
                    <h2>Select your MARC flavor</h2>
60
                    <p>MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is used globally, whereas UNIMARC tends to be used in Europe. </p>
61
62
                    [% FOREACH flavourloo IN flavourloop %]
63
                        [% IF ( flavourloo.label == "Unimarc") %]
64
                             <p>
65
                                 <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]</label>
66
                             </p>
67
                        [% ELSE %]
68
                             <p>
69
                                 <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %]</label>
70
                             </p>
71
                        [% END %]
72
                    [% END %]
73
                    <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
74
                </form>
75
            [% END # / IF choosemarc %]
66
76
67
[% IF ( finish ) %]
77
            [% IF ( selectframeworks ) %]
68
    <h1>Congratulations, installation complete</h1>
78
                <h2>Web installer &rsaquo; [% setup %] setup &rsaquo; Selecting default settings</h2>
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>
70
[% END %]
71
79
80
                [% IF setup == "Advanced" %]
81
                    <p id="selectall"><a href="#">Select all sample data</a></p>
82
                [% END %]
72
83
73
[% IF ( choosemarc ) %]
84
                <form name="frameworkselection" method="post" action="install.pl">
74
    <h2 align="center">Choose your setup</h2>
85
                    <input type="hidden" name="step" value="3" />
75
    <p>Basic setup selects recommended settings by default.</p>
86
                    <input type="hidden" name="op" value="addframeworks" />
76
    <form name="frameworkselection" method="post" action="install.pl">
87
                    [% IF ( frameworksloop ) %]
77
    <input type="hidden" name="step" value="3" />
88
                        <h3>MARC frameworks: [% marcflavour %]</h3>
78
    <input type="hidden" name="op" value="selectframeworks"/>
89
                        [% IF ( en_marc_frameworks ) %]
90
                            <h4><span class="error">No MARC frameworks are available for your language.
91
                                Defaulting to the frameworks supplied for English (en)<span></h4>
92
                        [% END %]
93
                        [% FOREACH frameworksloo IN frameworksloop %]
94
                            <h4>[% frameworksloo.label %]</h4>
95
                            [% FOREACH framework IN frameworksloo.frameworks %]
96
                                <div class="checkbox">
97
                                    <label>
98
                                        [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
99
                                            <input type="hidden" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
100
                                        [% ELSE %]
101
                                            <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
102
                                        [% END %]
103
                                        [% framework.fwkdescription %]
104
                                        <em>([% framework.fwkname %])</em>
105
                                    </label>
106
                                </div>
107
                                <hr />
108
                            [% END # / FOREACH framework %]
109
                       [% END # / FOREACH frameworksloo %]
110
                    [% END # / IF frameworkdsloop %]
111
112
                    <h2>Other data</h2>
113
114
                    [% IF ( en_sample_data ) %]
115
                        <h4><span class="error">No sample data and settings are available for your language.
116
                                Defaulting to the samples supplied for English (en)<span></h4>
117
                    [% END %]
79
118
80
    <div>
119
                    [% FOREACH levelloo IN levelloop %]
81
        <input type="radio" name="setup" value="Basic" checked="checked">Basic<br/>
120
                        <h4>[% levelloo.label %]</h4>
82
        <input type="radio" name="setup" value="Advanced"/>Advanced<br/>
83
    </div>
84
121
85
    <h2 align="center">Select your MARC flavor</h2>
122
                        [% IF (setup == "Basic" && levelloo.label == "Optional") %]
86
    <p>MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is more commonly used globally, whereas UNIMARC tends to be used in Europe. </p>
123
                            <p id="selectall"><a href="#">Select all sample data</a></p>
124
                        [% END %]
87
125
88
    [% FOREACH flavourloo IN flavourloop %]
126
                        [% FOREACH framework IN levelloo.frameworks %]
89
    <div>
127
                            <div class="checkbox">
90
            [% IF ( flavourloo.label == "Unimarc") %]
128
                                <label for="[% framework.fwkname %]">
91
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]<br/>
129
                                    [% IF (levelloo.label == "Default" ) && (setup=="Basic")%]
92
            [% ELSE %]
130
                                         <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
93
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
131
                                    [% ELSE %]
94
            [% END %]
132
                                         <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]"/>
95
    </div>
133
                                    [% END %]
96
    [% END %]
134
                                    [% framework.fwkdescription %]
135
                                    <em>([% framework.fwkname %])</em>
136
                                </label>
137
                            </div> <!-- /div.checkbox -->
138
                        [% END # / FOREACH framework %]
139
                    [% END # / FOREACH levelloo %]
97
140
98
        <p>Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
141
                    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
142
                    please be patient.</p>
99
143
100
    </form>
144
                    <p><input type="submit" value="Import" class="btn btn-primary" /></p>
145
                </form>
146
            [% END # / IF selectframeworks %]
101
147
102
[% END %]
148
            [% IF ( addframeworks ) %]
149
                <h2>Web installer &rsaquo; Default data loaded</h2>
103
150
104
[% IF ( selectframeworks ) %]
151
                [% FOREACH lis IN list %]
105
        <h2 align= "center"> [% setup %] setup</h2>
152
                    <h3>[% lis.level FILTER ucfirst %] data added</h3>
106
        <h2 align="center">Selecting Default Settings</h2>
107
153
108
        [% IF setup == "Advanced" %]
154
                    <ul>
109
            <script type="text/javascript">
155
                        [% FOREACH fwklis IN lis.fwklist %]
110
                var linklabel = _("Select all options");
111
                document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
112
            </script>
113
        [% END %]
114
        <form name="frameworkselection" method="post" action="install.pl">
115
            <input type="hidden" name="step" value="3" />
116
            <input type="hidden" name="op" value="addframeworks" />
117
    [% IF ( frameworksloop ) %]
118
        <h2>MARC frameworks: [% marcflavour %]</h2>
119
        [% IF ( en_marc_frameworks ) %]
120
            <h4><span class="error">No MARC frameworks are available for your language.
121
                    Defaulting to the frameworks supplied for English (en)<span></h4>
122
        [% END %]
123
        [% FOREACH frameworksloo IN frameworksloop %]
124
           <div>
125
           <h3>[% frameworksloo.label %]</h3>
126
           [% FOREACH framework IN frameworksloo.frameworks %]
127
                <table style="border:1px;vertical-align:top;">
128
                <tr>
129
                    <td style = "border:1px; vertical-align:top;">
130
                        [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
131
                            <input type="hidden" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
132
                        [% ELSE %]
133
                            <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
134
                        [% END %]
135
                    </td>
136
                    <td>
137
                    [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
138
                        <ul>
139
                            <li>
156
                            <li>
140
                                <label for="[% framework.fwkname %]">
157
                                [% fwklis.fwkname %]
141
                                    [% framework.fwkdescription %]
158
                                [% IF ( fwklis.error ) %]<p class="bg-danger">[% fwklis.error %]</p>[% END %]
142
                                    <em>([% framework.fwkname %])</em>
143
                                </label>
144
                            </li>
159
                            </li>
145
                        </ul>
160
                        [% END %]
146
                    </td>
161
                    </ul>
147
                    [% ELSE %]
148
                    <td>
149
                        <label for= "[% framework.fwkname %]">
150
                            [% framework.fwkdescription %]
151
                            <em>([% framework.fwkname %])</em>
152
                        </label>
153
                    </td>
154
                    [% END %]
155
                </tr>
156
                </table>
157
           [% END %]
158
           </div>
159
        [% END %]
160
    <h2>Other data</h2>
161
    [% END %]
162
    [% IF ( en_sample_data ) %]
163
        <h4><span class="error">No sample data and settings are available for your language.
164
                Defaulting to the samples supplied for English (en)<span></h4>
165
    [% END %]
166
    [% FOREACH levelloo IN levelloop %]
167
        <div>
168
        <h3>[% levelloo.label %]</h3>
169
170
        [% IF (setup == "Basic" && levelloo.label == "Optional") %]
171
            <script type="text/javascript">
172
                var linklabel = _("Select all options");
173
                document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
174
            </script>
175
        [% END %]
176
177
        [% FOREACH framework IN levelloo.frameworks %]
178
            <table style="border:1px;vertical-align:top;">
179
            <tr>
180
                <td style="vertical-align:top;">
181
                [% IF (levelloo.label == "Default" ) && (setup=="Basic")%]
182
                     <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
183
                [% ELSE %]
184
                     <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]"/>
185
                [% END %]
162
                [% END %]
186
                </td>
163
187
                <td>
164
                <h3>All done!</h3>
188
                [% IF (levelloo.label == "Default") && (setup=="Basic")%]
165
                <p>Installation complete.</p>
189
                <ul>
166
                <form action="/cgi-bin/koha/installer/install.pl" method="post" name="finish">
190
                    <li>
167
                    <input type="hidden" name="step" value="3" />
191
                        <label for="[% framework.fwkname %]">
168
                    <input type="hidden" name="op" value="finish" />
192
                            [% framework.fwkdescription %]
169
                    <p> <input value="Set up some of Koha's basic requirements" class="btn btn-primary" type="submit" /> </p>
193
                            <em>([% framework.fwkname %])</em>
170
                </form>
194
                        </label>
171
195
                    </li>
172
            [% END # / IF addframeworks %]
196
                </ul>
173
197
                </td>
174
            [% IF ( importdatastructure ) %]
175
                [% IF ( error ) %]
176
                    <p>The following error occurred while importing the database structure:</p>
177
                                <div class="alert alert-warning"><p>[% error %] </p></div>
178
                    <p>Please contact your system administrator</p>
198
                [% ELSE %]
179
                [% ELSE %]
199
                <td>
180
                    <h2>Web installer &rsaquo; Success</h2>
200
                    <label for= "[% framework.fwkname %]">
181
                    <div class="alert alert-success"><p>Database tables created</p></div>
201
                        [% framework.fwkdescription %]
182
                    <form action="install.pl" method="post">
202
                        <em>([% framework.fwkname %])</em>
183
                        <input type="hidden" name="step" value="3" />
203
                    </label>
184
                        <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
204
                </td>
185
                    </form>
205
                [% END %]
186
                [% END %]
206
            </tr>
187
            [% END %]
207
            </table>
208
        [% END %]
209
        </div>
210
    [% END %]
211
    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
212
    please be patient.</p>
213
    <p><input type="submit" value="Import &gt;&gt;" />
214
    </p>
215
    </form>
216
[% END %]
217
218
219
[% IF ( addframeworks ) %]
220
    [% FOREACH lis IN list %]
221
    <h3>[% lis.level %] data added</h3>
222
    <ul>
223
    [% FOREACH fwklis IN lis.fwklist %]
224
        <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li>
225
    [% END %]
226
    </ul>
227
    [% END %]
228
    <h3>All done!</h3>
229
    <p>Installation complete.<br />
230
        <p>Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool.
231
        <form name="finish">
232
        <input type="hidden" name="step" value="3" />
233
        <input type="hidden" name="op" value="finish" />
234
        <input type="submit" value="Set up Koha with the onboarding tool"/>
235
        </form>
236
        </p>
237
    </p>
238
[% END %]
239
240
188
241
[% IF ( importdatastructure ) %]
189
            [% IF ( proposeimport ) %]
242
    [% IF ( error ) %]
190
                <h2>Web installer &rsaquo; Set up database</h2>
243
        <p>The following error occurred while importing the database structure:</p>
191
                <p>Now we're ready to create the database tables and fill them with some default data.</p>
244
        <p class="error">[% error %] </p>
192
                <form action="install.pl" method="post">
245
        <p>Please contact your system administrator</p>
193
                    <input type="hidden" name="step" value="3" />
246
    [% ELSE %]
194
                    <input type="hidden" name="op" value="importdatastructure" />
247
        <h2 align="center">Success</h2>
195
                    <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
248
        <ul>
196
                </form>
249
        <li>Database tables created</li>
197
            [% END %]
250
        </ul>
251
        <form action="install.pl">
252
        <input type="hidden" name="step" value="3" />
253
            <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
254
        </form>
255
    [% END %]
256
[% END %]
257
198
199
            [% IF ( default ) %]
200
                [% IF ( upgrading ) %]
201
                    <h2>Web installer &rsaquo; Update database</h2>
202
                    <p>We are upgrading from Koha [% dbversion %] to [% kohaversion %]</p>
203
                    <p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
204
                [% ELSE %]
205
                    <h2>Web installer &rsaquo; Install basic configuration settings</h2>
206
                    <p>We are ready to do some basic configuration.</p>
207
                    <p> <a href="install.pl?step=3&amp;op=choosemarc" class="btn btn-primary">Continue to the next step</a> </p>
208
                [% END %]
209
            [% END %]
258
210
259
[% IF ( proposeimport ) %]
211
            [% IF ( updatestructure ) %]
260
    <p>Now we're ready to create the database tables and fill them with some default data.</p>
212
                <h2>Updating database structure</h2>
261
    <form action="install.pl">
213
                [% IF ( has_update_succeeds ) %]
262
    <input type="hidden" name="step" value="3" />
214
                    <p>Update report :</p>
263
    <input type="hidden" name="op" value="importdatastructure" />
215
                    <ul>
264
    <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
216
                        [% FOREACH update_repor IN update_report %]
265
    </form>
217
                            <li>[% update_repor.line |html %]</li>
266
[% END %]
218
                        [% END %]
219
                    </ul>
220
                [% END %]
267
221
268
[% IF ( default ) %]
222
                [% IF ( has_update_errors ) %]
269
    [% IF ( upgrading ) %]
223
                    <p>Update errors :</p>
270
        <p>
224
                        <ul>
271
            We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database.
225
                            [% FOREACH update_error IN update_errors %]
272
        <br>
226
                                <li class="update_error">[% update_error.line |html %]</li>
273
        <a href="install.pl?step=3&amp;op=updatestructure" class="button"><button>Update Database</button></a>
227
                            [% END %]
274
        </p>
228
                        </ul>
275
    [% ELSE %]
229
                [% END %]
276
        <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation:
277
        <br>
278
        <br>
279
            <a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Install Basic Configuration Settings</button></a>
280
230
281
    [% END %]
231
                [% UNLESS ( has_update_errors ) %]
282
[% END %]
232
                    <p>Everything went okay. Update done.</p>
233
                [% END %]
234
                <p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
235
           [% END # / IF updatestructure %]
236
    </div>
237
</div>
283
238
284
[% IF ( updatestructure ) %]
239
[% IF ( selectframeworks ) %]
285
  <div><h2 align="center">Updating database structure</h2>
240
    <script type="text/javascript">
286
  [% IF ( has_update_succeeds ) %]
241
        $(document).ready(function(){
287
  <p>Update report :</p>
242
            $("#selectall").on("click",function(e){
288
    <ul>
243
                e.preventDefault();
289
      [% FOREACH update_repor IN update_report %]
244
                $("input:checkbox").prop("checked", true);
290
          <li>[% update_repor.line |html %]</li>
245
            });
291
      [% END %]
246
        });
292
    </ul>
247
    </script>
293
  [% END %]
294
  [% IF ( has_update_errors ) %]
295
  <p>Update errors :</p>
296
    <ul>
297
      [% FOREACH update_error IN update_errors %]
298
          <li class="update_error">[% update_error.line |html %]</li>
299
      [% END %]
300
    </ul>
301
  [% END %]
302
 [% UNLESS ( has_update_errors ) %]
303
    <p>Everything went OK, update done.</p>
304
  [% END %]
305
<a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Back to Installation</button></a>
306
  </div>
307
[% END %]
248
[% END %]
308
249
309
</div>
250
[% INCLUDE 'intranet-bottom.inc' %]
310
</body>
311
</html>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt (-69 / +59 lines)
Lines 1-81 Link Here
1
<!--Includes for creating library-->
1
<!--Includes for creating library-->
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
4
[% INCLUDE 'installer-doc-head-close.inc' %]
5
[% INCLUDE 'datatables.inc' %]
6
7
[% IF (libraries && libraries.count > 1) %]
3
[% IF (libraries && libraries.count > 1) %]
8
    <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=2">
4
    <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=2">
5
[% END %]
6
<title>Koha &rsaquo; Web installer &rsaquo; Create a library</title>
7
[% INCLUDE 'installer-doc-head-close.inc' %]
8
</head>
9
9
10
[% ELSIF (op == "add_validate_library") %]
10
<body id="installer" class="installer">
11
    <head>
11
    <div class="container-fluid">
12
        <title>Welcome &rsaquo; to  &rsaquo; Koha</title>
12
        <div class="row">
13
    </head>
13
            <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
14
14
15
    <!--Header for the koha onboarding tool-->
15
            <h1 id="logo"><a href="#">Koha</a></h1>
16
    <div>
16
17
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
17
            [% IF (op == "add_validate_library") %]
18
    </div>
19
18
20
<!--New Library created-->
19
                <!--New Library created-->
21
       [% IF message == "success_on_insert" %]
22
            <form name="createlibrary" method="post" action="onboarding.pl" >
23
                <input type="hidden" name="step" value="2"/>
24
                <h1 align="left"> New library</h1>
25
                <div>
26
                    <p> Success: library created!
27
                    </p>
28
                    <p> To add another library and for more settings, <br>
29
                    go to:<br>
30
                    More -> Administration -> Libraries and groups<br>
31
                    </p>
32
                </div>
33
                Next up:
34
                <input type="submit" name="start" value="Minimal patron category setup"/>
35
            </form>
36
20
37
        [%ELSE %]
21
                [% IF message == "success_on_insert" %]
38
            <form name="retrylibrary" method="post" action="onboarding.pl">
22
                    <h2>Web installer &rsaquo; Library created</h2>
39
                <input type="hidden" name="step" value="1"/>
40
                <h1 align="left">Failed </h1>
41
                <div>
42
                    <p> Library was not successfully created</br>
43
                    Please try again or contact your system administrator. </p>
44
                </div>
45
                <input type="submit" value="Try again"/>
46
            </form>
47
        [%END%]
48
23
49
[% ELSE %]
24
                    <form name="createlibrary" method="post" action="onboarding.pl" >
50
    <head>
25
                        <input type="hidden" name="step" value="2" />
51
        <title>Welcome &rsaquo; to  &rsaquo; Koha</title>
26
                        <div class="alert alert-success">Success: Library created!</div>
52
    </head>
27
                        <p> To add another library and for more settings, go to: </p>
28
                        <div class="breadcrumbs"> Administration <b>&rsaquo;</b> Libraries and groups </div>
29
                        <input type="submit" name="start" class="btn btn-primary" value="Continue to the next step"/>
30
                    </form>
31
                 [% ELSE %]
32
                    <h2>Web installer &rsaquo; Library creation failed</h2>
53
33
54
    <!--Header for the koha onboarding tool-->
34
                    <form name="retrylibrary" method="post" action="onboarding.pl">
55
    <div>
35
                        <input type="hidden" name="step" value="1"/>
56
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
36
                        <div class="alert alert-danger">Library was not successfully created</div>
37
                        <p>Please try again or contact your system administrator.</p>
38
                        <input type="submit" class="btn btn-primary" value="Try again"/>
39
                    </form>
40
                 [% END %]
41
42
            [% ELSE %]
43
44
                <!--Create a library screen 1-->
45
                 <h2>Web installer &rsaquo; Create a library</h2>
46
47
                <form name="LibraryCreation" method="post" action="onboarding.pl">
48
                    <fieldset class="rows" >
49
                         <input type="hidden" name="step" value="1"/>
50
                         <input type="hidden" name="op" value="add_validate_library"/>
51
                         <ol>
52
                             <li>
53
                                <label for="branchcode" class="required">Library code: </label>
54
                                <input type="text"  pattern="^[A-Za-z]{0,10}$" title="Please enter 3 capital letters" name="branchcode" id="branchcode" size="3" maxlength="10" class="required" required="required" />
55
                                <span class="required">Required</span>
56
                            </li>
57
                            <li>
58
                                <label for="branchname" class="required">Name: </label>
59
                                <input type="text" name="branchname" id="branchname" size="42" class="required" required="required">
60
                                <span class="required">Required</span>
61
                            </li>
62
                         </ol>
63
                        <input type="submit" class="btn btn-primary" value="Submit" />
64
                    </fieldset>
65
                </form>
66
67
            [% END # / IF add_validate_library %]
57
    </div>
68
    </div>
69
</div>
58
70
59
<!--Create a library screen 1-->
71
[% INCLUDE 'intranet-bottom.inc' %]
60
        <form name="LibraryCreation" method="post" action="onboarding.pl">
61
            <fieldset class="rows" >
62
                 <h2>Create a library</h2>
63
                 <input type="hidden" name="step" value="1"/>
64
                 <input type="hidden" name="op" value="add_validate_library"/>
65
                 <ol>
66
                     <li>
67
                        <label for="branchcode" class="required">Library code: </label>
68
                        <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="[% library.branchcode |html %]" class="required" required="required" />
69
                        <span class="required">Required</span>
70
                    </li>
71
                    <li>
72
                        <label for="branchname" class="required">Name: </label>
73
                        <input type="text" name="branchname" id="branchname" title="Please enter the name of your institution" size="42" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
74
                        <span class="required">Required</span>
75
                    </li>
76
                 </ol>
77
             <br>
78
             <input type="submit" class="action" value="Submit"/>
79
            </fieldset>
80
     </form>
81
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-149 / +123 lines)
Lines 2-164 Link Here
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
3
[% USE Price %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title> Add a patron category</title>
5
<title>Koha &rsaquo; Web installer &rsaquo; Add a patron category</title>
6
[% IF (categories && categories.count > 1 )
7
    # This if statement checks if the categories variable handed to this template
8
    # by onboarding.pl has data in it. If the categories variable does have data
9
    # in it this means that the user has previously imported sample patron category
10
    # data and so we do not need to show them the create patron category screen 1,
11
    #instead we can display a screen with ubtton redirecting the user to step 3 %]
12
     <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3">
13
[% END %]
6
[% INCLUDE 'installer-doc-head-close.inc' %]
14
[% INCLUDE 'installer-doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
8
[% INCLUDE 'js_includes.inc' %]
15
[% INCLUDE 'js_includes.inc' %]
9
[% INCLUDE 'datatables.inc' %]
16
[% INCLUDE 'validator-strings.inc' %]
10
<script type="text/javascript">
17
[% INCLUDE 'installer-strings.inc' %]
11
    var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field."));
18
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
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>
19
</head>
28
20
29
[% IF (categories && categories.count > 1 ) %] <!--This if statement checks if the categories variable handed to this template by onboarding.pl has data in it. If the categories variable does have data in it this means that the user has previously imported sample patron category data and so we do not need to show them the create patron category screen 1, instead we can display a screen with ubtton redirecting the user to step 3-->
21
<body id="installer" class="installer">
30
22
31
23
    <div class="container-fluid">
32
     <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3">
24
        <div class="row">
33
25
            <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
34
[% ELSIF (op == "add_validate_category") %]
26
35
<!--else if the user has not previously imported sample patron categories check if the user has pressed the button name="add_validate" in the create patron category screen 1, and if they have pressed that button then display the below screen with a button to redirect the user to step 3-->
27
            <h1 id="logo"><a href="#">Koha</a></h1>
36
28
37
    <div> <!-- Header that appears at the top of every screen in the koha onboarding tool-->
29
            [% IF (op == "add_validate_category")
38
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
30
                # if the user has not previously imported sample patron categories
39
    </div>
31
                # check if the user has pressed the button name="add_validate" in
40
32
                # the create patron category screen 1, and if they have pressed that
41
    [% IF message != "error_on_insert" %]
33
                # button then display the below screen with a button to redirect the
42
     <form name="createcat" method="post" action="onboarding.pl">
34
                # user to step 3 %]
43
            <input type="hidden" name="step" value="3"/>
35
44
             <h1 align="left">  New patron category</h1>
36
                [% IF message != "error_on_insert" %]
45
             <div>
37
46
                 <p> Success: patron category created! </p>
38
                    <h2>Web installer &rsaquo; Patron category created</h2>
47
                 <p> To add another patron category and for more settings<br>
39
48
                 go to:<br>
40
                    <form name="createcat" method="post" action="onboarding.pl">
49
                 More -> Administration -> Patron categories<br>
41
                        <input type="hidden" name="step" value="3"/>
50
             </div>
42
                        <div class="alert alert-success">Success: Patron category created! </div>
51
             Next up:<br>
43
                        <p> To add another patron category and for more settings go to:</p>
52
             <input type="submit" name="start" value="Add a patron"><!-- When the user clicks on this button then redirect them to step 3 of the onboarding tool-->
44
                        <div class="breadcrumbs"> Administration <b>&rsaquo;</b> Patron categories</div>
53
     </form>
45
                        <input type="submit" class="btn btn-primary" name="start" value="Continue to the next step" />
54
     [% ELSE %]
46
                     </form>
55
        <form name="retrypatcat" method="post" action="onboarding.pl">
47
                 [% ELSE %]
56
        Message is [% message %]
48
57
        <input type="hidden" name="step" value="2"/>
49
                    <h2>Web installer &rsaquo; Patron category creation failed</h2>
58
            <h1 align="left">Failed</h1>
50
59
            <div>Patron category was not successfully created.</br>
51
                    <form name="retrypatcat" method="post" action="onboarding.pl">
60
            Please try again or contact your system administrator.</p>
52
                        <input type="hidden" name="step" value="2"/>
61
            </div>
53
                        <div class="alert alert-danger">
62
            <input type="submit" value="Try again"/>
54
                            Patron category was not successfully created.
63
        </form>
55
                            Message is [% message %]
64
    [% END %]
56
                        </div>
65
57
                        <p>Please try again or contact your system administrator.</p>
66
58
                        <input type="submit" class="btn btn-primary" value="Try again" />
67
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category-->
59
                    </form>
68
    <div> <!-- Header that appears at the top of every screen in the koha onboarding tool-->
60
                [% END %]
69
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
61
70
    </div>
62
71
63
            [% ELSE
72
    <h1 align="left"> Create a new patron category</h1>
64
                # Else display create patron category screen 1 where the user
73
    <p> The patron category you create in this form is going to be the one which the new administrator patron account will have.</p>
65
                # can input values to create their first patron category %]
74
       <form id="category_form" method="post" action="onboarding.pl">
66
75
       <fieldset class="rows">
67
            <h2>Web installer &rsaquo; Create a patron category</h2>
76
            <input type="hidden" name="step" value="2"/>
68
77
            <input type="hidden" name="op" value="add_validate_category" />
69
            <p> The patron category you create will be used by the <span class="bg-info">administrator account</span>.</p>
78
                <ol>
70
79
                    <li>
71
            <form id="category_form" method="post" action="onboarding.pl">
80
                        <label for="categorycode" class="required">Category code: </label>
72
                <fieldset class="rows">
81
                        <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" />
73
                    <input type="hidden" name="step" value="2"/>
82
                        <span class="required">Required</span>
74
                    <input type="hidden" name="op" value="add_validate_category" />
83
                    </li>
75
                    <ol>
84
76
                        <li>
85
                    <li>
77
                            <label for="categorycode" class="required">Category code: </label>
86
                        <label for="description" class="required">Description: </label>
78
                            <input type="text" id="categorycode" name="categorycode" size="10" maxlength="10" class="required" required="required" />
87
                        <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%]" />
79
                            <span class="required">Required</span>
88
                        <span class="required">Required</span>
80
                        </li>
89
                    </li>
81
90
82
                        <li>
91
                    <li>
83
                            <label for="description" class="required">Description: </label>
92
                        <label for="overduenoticerequired">Overdue notice required: </label>
84
                            <input type="text" id="description" name="description" size="40" class="required" required="required" />
93
                        <select name="overduenoticerequired" value="overduenoticerequired">
85
                            <span class="required">Required</span>
94
                            [% IF category.overduenoticerequired %]
86
                        </li>
95
                                <option value="0">No</option>
87
96
                                <option value="1" selected="selected">Yes</option>
88
                        <li>
97
                            [% ELSE %]
89
                            <label for="overduenoticerequired">Overdue notice required: </label>
90
                            <select name="overduenoticerequired" id="overduenoticerequired">
98
                                <option value="0" selected="selected">No</option>
91
                                <option value="0" selected="selected">No</option>
99
                                <option value="1">Yes</option>
92
                                <option value="1">Yes</option>
100
                            [% END %]
93
                            </select>
101
                        </select>
94
                        </li>
102
                    </li>
95
103
96
                        <li>
104
                    <li>
97
                            <span class="label">Category type: </span>
105
                        <label for="category_type" class="required">Category type: </label>
98
                            <input type="hidden" name="category_type" value="S" />
106
                        <select name="category_type" value="category_type" class='required' required='required'>
99
                            Staff
107
                            [% IF category and category.category_type == 'S' %]
100
                        </li>
108
                                <option value="S" selected="selected">Staff</option>
101
109
                            [% ELSE %]
102
                        <li>
110
                                <option value="S">Staff</option>
103
                            <label for="default_privacy">Default privacy: </label>
111
                            [% END %]
104
                            <select id="default_privacy" name="default_privacy" required="required">
112
                        </select>
113
                        <span class="required">Required</span>
114
                    </li>
115
116
                    <li>
117
                        <label for="default_privacy">Default privacy: </label>
118
                        <select value="default_privacy" name="default_privacy" required="required">
119
                            [% SET default_privacy = 'default' %]
120
121
                            [% IF category %]
122
                               [% SET default_privacy = category.default_privacy %]
123
                            [% END %]
124
125
                            [% SWITCH default_privacy %]
126
                            [% CASE 'forever' %]
127
                                <option value="default">Default</option>
128
                                <option value="never">Never</option>
129
                                <option value="forever" selected="selected">Forever</option>
130
                            [% CASE 'never' %]
131
                                <option value="default">Default</option>
132
                                <option value="never" selected="selected">Never</option>
133
                                <option value="forever">Forever</option>
134
                            [% CASE %]
135
                                <option value="default" selected="selected">Default</option>
105
                                <option value="default" selected="selected">Default</option>
136
                                <option value="never">Never</option>
106
                                <option value="never">Never</option>
137
                                <option value="forever">Forever</option>
107
                                <option value="forever">Forever</option>
138
                            [% END %]
108
                            </select>
139
                        </select>
109
                            <div class="hint">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.</div>
140
                        <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>
110
                        </li>
141
                    </li>
111
                        <li>
142
            </ol>
112
                            <span class="label">Enrolment period: </span>
143
            <span class="label">Enrolment period: </span>
113
                            <fieldset class="rows">
144
            </br>
114
                                <ol>
145
                    <fieldset>
115
                                    <li>
146
                    <legend>Choose one</legend>
116
                                        <span class="label"> </span><strong>Choose one</strong>
147
                            <ol>
117
                                    </li>
148
                                <li>
118
                                    <li>
149
                                    <label for="enrolmentperiod" style="width:6em;">In months: </label>
119
                                        <label for="enrolmentperiod">In months: </label>
150
                                    <input type="number" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
120
                                        <input type="number" name="enrolmentperiod" id="enrolmentperiod" size="3" /> months
151
                                </li>
121
                                    </li>
152
                                <li>
122
                                    <li>
153
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
123
                                        <label for="enrolmentperioddate">Until date: </label>
154
                                    <input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
124
                                        <input type="text" name="enrolmentperioddate" id="enrolmentperioddate" />
155
                                </li>
125
                                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
156
                            </ol>
126
                                    </li>
157
                     </fieldset>
127
                                </ol>
158
                    <br>
128
                             </fieldset>
159
                    <input type="submit" class="action" value="Submit" />
129
                        </li>
160
    </fieldset>
130
                    </ol>
161
    </form>
131
                    <input type="submit" class="btn btn-primary" value="Submit" />
162
[% END %]
132
                </fieldset>
133
            </form>
134
        [% END %]
135
    </div>
136
</div>
163
137
164
[% INCLUDE 'intranet-bottom.inc' %]
138
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-185 / +146 lines)
Lines 1-196 Link Here
1
<!--Includes for creating patron-->
1
<!--Includes for creating patron-->
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Price %]
5
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
6
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%]
3
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%]
4
<title>Koha &rsaquo; Web installer &rsaquo; Create Koha administrator patron</title>
7
[% INCLUDE 'installer-doc-head-close.inc' %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
8
[% INCLUDE 'calendar.inc' %]
9
[% INCLUDE 'datatables.inc' %]
10
[% INCLUDE 'js_includes.inc' %]
6
[% INCLUDE 'js_includes.inc' %]
7
[% INCLUDE 'validator-strings.inc' %]
8
[% INCLUDE 'installer-strings.inc' %]
11
9
12
<head>
13
<title>Create Koha administrator patron</title>
14
<!--jQuery scripts for creating patron-->
15
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
16
<script type="text/javascript">
17
     var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them"));
18
     jQuery.validator.addMethod( "password_match", function(value,element){
19
        var password = document.getElementById('password').value
20
        var confirmpassword = document.getElementById('password2').value
21
        if ( password != confirmpassword ){
22
                return false;
23
        }
24
        else{
25
                return true
26
        }
27
     },  MSG_PASSWORD_MISMATCH
28
);
29
30
$(document).ready(function(){
31
   $("#Submit").click(function(){
32
      $("#createpatron").validate({
33
        rules: {
34
            surname: {
35
                required: true,
36
            },
37
            firstname: {
38
                required: true,
39
            },
40
            cardnumber: {
41
                required: true,
42
            },
43
            password: {
44
                 password_match:true
45
            }
46
        },
47
        messages: {
48
           password: {
49
                 required: MSG_PASSWORD_MISMATCH
50
           },
51
        }
52
      });
53
   });
54
});
55
</script>
56
</head>
10
</head>
57
11
58
<div>
12
<body id="installer" class="installer">
59
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
60
</div>
61
13
14
    <div class="container-fluid">
15
        <div class="row">
16
            <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
17
18
            <h1 id="logo"><a href="#">Koha</a></h1>
19
20
            [%  IF (nok) %]
21
22
                <h2>Web installer &rsaquo; Administrator patron creation failed</h2>
23
24
                <form id="errors" method="post" action="onboarding.pl">
25
                    <input type="hidden" name="step" value="3"/>
26
                    <div class="alert alert-danger">
27
                        <ul>
28
                        [% IF errorloginexists %]
29
                            <li id="ERROR_login_exist">Username/password already exists.</li>
30
                        [% END %]
31
                        [% IF errorcardnumberexists %]
32
                            <li id="ERROR_cardnumber">Cardnumber already in use.</li>
33
                        [% END %]
34
                        [% IF errorcardnumberlength %]
35
                            <li id="ERROR_cardnumber">Cardnumber length is incorrect</li>
36
                        [% END %]
37
                        [% IF errorshortpassword %]
38
                            <li id="ERROR_short_password">Password length is incorrect, must be at least [% minPasswordLength %] characters long.</li>
39
                        [% END %]
40
                        [% IF errorpasswordmismatch %]
41
                            <li id="ERROR_password_mismatch">Passwords do not match.</li>
42
                        [% END %]
43
                        </ul>
44
                    </div>
45
                    <input type="submit" class="btn btn-primary" name="step" value="Try again"/>
46
                </form>
47
48
            [% ELSIF op == 'add_validate' # New patron created  %]
49
50
                <h2>Web installer &rsaquo; Koha administrator patron created</h2>
51
52
                <form id="patrondone" method="post" action="onboarding.pl">
53
                    <input type="hidden" name="step" value="4"/>
54
                    <div class="alert alert-success">Success: Administrator patron created! </div>
55
                    <p> To create another patron, go to: </p>
56
                    <div class="breadcrumbs">Patrons &rsaquo; New patron</div>
57
                    <input type="submit" class="btn btn-primary" name="start" value="Continue to the next step" />
58
                </form>
59
60
            [% ELSE %]
61
62
                <h2>Web installer &rsaquo; Create Koha administrator patron</h2>
63
64
                <p>
65
                Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member with all permissions.
66
                </p>
67
68
                <form id="createpatron" method="post" action="onboarding.pl">
69
                    <fieldset class="rows">
70
                        <input type="hidden" name="step" value="3"/>
71
                        <input type="hidden" name="op" value="add_validate" />
72
                            <h3>Administrator identity</h3>
73
                            <ol>
74
                                <li>
75
                                    <label for="surname" class="required">Surname: </label>
76
                                    <input type="text" id="surname" name="surname" 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" id="firstname" size="20" class="required" required="required">
82
                                    <span class="required">Required</span>
83
                                </li>
84
                            </ol>
85
86
                            <ol>
87
                                <li>
88
                                    <label for="cardnumber" class="required">Card number: </label>
89
                                    [% IF patrons && patrons > 1 %]
90
                                        <input type="text" id="cardnumber" class="noEnterSubmit valid required" name="cardnumber" required="required">
91
                                    [% ELSE %]
92
                                        <input type="text" id="cardnumber" name="cardnumber" class="required" required="required">
93
                                    [% END %]
94
                                    <span class="required">Required</span>
95
                                </li>
96
                                <li>
97
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-->
99
                                    <label for="libraries" class="required"> Library: </label>
100
                                    <select name="libraries" size="1" id="libraries">
101
102
                                     [% FOREACH library IN libraries %]
103
                                          <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %]
104
                                     [% END %]
105
106
                                        </select>
107
                                    <span class="required"> Required</span>
108
                                </li>
109
                                <li>
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
121
                            <h3>Administrator account permissions</h3>
122
                            <ol>
123
                                <li>
124
                                    <input type="hidden" name="newflags" value="1"/>
125
                                    <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/>
126
                                    <code>superlibrarian</code>
127
                                </li>
128
                            </ol>
129
130
                            <h3>Administrator login</h3>
131
                            <ol>
132
                                <li>
133
                                    <input type="hidden" name="BorrowerMandatoryField" value = [% BorrowerMandatoryField %] />
134
                                    <label for="userid" class="required">Username: </label>
135
                                    <input type="text" name="userid" id ="userid" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this username field" size="20" class="required" required="required" />
136
                                    <span class="required">Required</span>
137
                                </li>
138
                                <li>
139
                                    <label for="password" class="required">Password: </label>
140
                                    <input type="password" name="password" id="password" size="20" class="required" required="required">
141
                                    <span class="required">Required</span>
142
                                </li>
143
                                <li>
144
                                    <label for="password2" class="required">Confirm password: </label>
145
                                    <input type="password" id="password2" name="password2" size="20" class="required" required="required">
146
                                    <span class="required">Required</span>
147
                                </li>
148
                            </ol>
149
                    </fieldset>
150
                    <input type="submit" class="btn btn-primary" value="Submit" />
151
                </form>
62
152
63
[%  IF (nok) %]
64
        <form name="errors" method="post" action="onboarding.pl">
65
            <input type="hidden" name="step" value="3"/>
66
            <h1 align="left">There was an error</h1>
67
            <p>Try again </p>
68
            <div>
69
            <ul>
70
            [% IF errorloginexists %]
71
                <li id="ERROR_login_exist">Username/password already exists.</li>
72
            [% END %]
73
            [% IF errorcardnumberexists %]
74
                <li id="ERROR_cardnumber">Cardnumber already in use.</li>
75
            [% END %]
76
            [% IF errorcardnumberlength %]
77
                <li id="ERROR_cardnumber">Cardnumber length is incorrect</li>
78
            [% END %]
79
            [% IF errorshortpassword %]
80
                <li id="ERROR_short_password">Password length is incorrect, must be at least [% minPasswordLength %] characters long.</li>
81
            [% END %]
82
            [% IF errorpasswordmismatch %]
83
                <li id="ERROR_password_mismatch">Passwords do not match.</li>
84
            [% END %]
153
            [% END %]
85
            </ul>
154
        </div>
86
155
    </div>
87
            </div>
156
88
            <input type="submit" name="step" value="Try again"/>
157
[% INCLUDE 'intranet-bottom.inc' %]
89
        </form>
90
91
92
<!--Create a patron screen 2-->
93
[% ELSIF op == 'add_validate' %]
94
          <!--New patron created-->
95
        <form name="patrondone" method="post" action="onboarding.pl">
96
            <input type="hidden" name="step" value="4"/>
97
            <h1 align="left"> Koha administrator patron </h1>
98
            <div>
99
                 <p> Success: administrator patron created!</p>
100
                 <p> To create another patron, go to Patrons -> New Patron. <br>
101
                More -> Set Permissions in a user page to gain superlibrarian permissions.
102
            </div>
103
            Next up:
104
            <input type="submit" name="start" value="Minimal item type setup"/>
105
        </form>
106
[% ELSE %]
107
<!--Create a patron screen 1-->
108
       <h1 align="left"> Create koha administrator patron</h1>
109
        <p>
110
        Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions.
111
        </p>
112
        <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
113
            <fieldset class="rows">
114
                 <input type="hidden" name="step" value="3"/>
115
                 <input type="hidden" name="op" value="add_validate" />
116
                    <legend id="library_management_lgd">Library management</legend>
117
                    <ol>
118
                    <h3>Patron identity</h3>
119
                        <li>
120
                            <label for="surname" class="required">Surname: </label>
121
                            <input type="text" id="surname" name="surname" title="Please only enter letters in the surname field" value="[% surname |html %]" class="required" required="required" />
122
                            <span class="required">Required</span>
123
                        </li>
124
                        <li>
125
                            <label for="firstname" class="required">First name: </label>
126
                            <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">
127
                            <span class="required">Required</span>
128
                        </li>
129
                    </ol>
130
131
                    <ol>
132
                        <li>
133
                            <label for="cardnumber" class="required">Card number: </label>
134
                            [% IF patrons && patrons > 1 %]
135
                                <input type="text" id="cardnumber" title="Please enter a cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
136
                            [% ELSE %]
137
                                <input type="text" id="cardnumber" title="Please enter a cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
138
                            [% END %]
139
                            <span class="required">Required</span>
140
                        </li>
141
                        <li>
142
143
                        <!--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-->
144
                            <label for="libraries" class="required"> Library: </label>
145
                            <select name="libraries" size="1" id="libraries">
146
147
                             [% FOREACH library IN libraries %]
148
                                  <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %]
149
                             [% END %]
150
151
                                </select>
152
                            <span class="required"> Required</span>
153
                        </li>
154
                        <li>
155
                            <label for="categorycode_entry" class="required"> Patron category</label>
156
                            <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
157
                            [% FOREACH category IN categories %]
158
                                <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option>
159
                            [% END %]
160
                            </select>
161
                            <span class="required">Required</span><br><br>
162
                            <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
163
                        </li>
164
                    </ol>
165
166
                    <ol>
167
                            <h3> Koha administrator patron permissions</h3>
168
                            <input type="hidden" name="newflags" value="1"/>
169
                            <li>
170
                                <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/>
171
                                <label name="permissioncode" for="flag-0"> superlibrarian</label>
172
                            </li>
173
                    </ol>
174
                    <ol>
175
                    <h3>OPAC/Staff Login</h3>
176
                        <li>
177
                            <input type="hidden" name="BorrowerMandatoryField" value = "[% BorrowerMandatoryField %]" />
178
                            <label for="userid" class="required">Username: </label>
179
                            <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" />
180
                            <span class="required">Required</span>
181
                        </li>
182
                        <li>
183
                            <label for="passwordlabel" class="required">Password: </label>
184
                            <input type="password" name="password" id="password" size="20" value="[% member.password |html %]" class="required" required="required">
185
                            <span class="required">Required</span>
186
                        </li>
187
                        <li>
188
                            <label for="password2" class="required">Confirm password: </label>
189
                            <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
190
                            <span class="required">Required</span>
191
                        </li>
192
                    </ol>
193
             </fieldset><br>
194
                <input type="submit" id="Submit" class="action" value="Submit"/>
195
     </form>
196
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-59 / +74 lines)
Lines 1-67 Link Here
1
<!-- includes for creating item type-->
1
<!-- includes for creating item type-->
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%]
3
[% IF ( finish ) %]
4
    <meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl" />
5
[% ELSIF ( op != "add_validate" && itemtypes && itemtypes.count > 1 ) %]
6
     <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=5" />
7
[% END %]
8
<title>Koha &rsaquo; Web installer &rsaquo; Create a new item type </title>
4
[% INCLUDE 'installer-doc-head-close.inc' %]
9
[% INCLUDE 'installer-doc-head-close.inc' %]
5
<head>
10
[% INCLUDE 'validator-strings.inc' %]
6
    <title>Create item type</title>
11
[% INCLUDE 'installer-strings.inc' %]
12
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
7
</head>
13
</head>
8
<div>
9
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
10
</div>
11
14
12
[% IF (itemtypes && itemtypes.count >1) %]
15
<body id="installer" class="installer">
13
16
14
     <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=5">
17
    <div class="container-fluid">
18
        <div class="row">
19
            <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
15
20
16
[% ELSIF op == "add_validate" %]
21
            <h1 id="logo"><a href="#">Koha</a></h1>
17
        [% IF message != "error_on_insert" %]
18
            <form name="createitemtype" method="post" action="onboarding.pl">
19
                <input type="hidden" name="step" value="5"/>
20
                <h1 align="left"> New Item type </h1>
21
                <div>
22
                    <p> Success: New item type created!</p>
23
                    <p> To create another item type later and for more settings <br>
24
                    go to: <br>
25
                    More -> Administration -> Item types <br>
26
                </div>
27
                Next up:
28
                <input type="submit" value="Add a circulation rule"/>
29
            </form>
30
        [% ELSE %]
31
        <form name="retryitem" method="post" action="onboarding.pl">
32
            <input type="hidden" name="step" value="4"/>
33
            <h1 align="left">Failed </h1>
34
            <div>
35
                <p>Item type was not successfully created. </br>
36
                Please try again or contact your system administrator.
37
                </p>
38
            </div>
39
        </form>
40
        <!--Implement a if statement to check if the item type was successfully created or not -->
41
        [% END %]
42
[% ELSE %]
43
    <!--Create a item type screen 1-->
44
        <h1 align="center"> Create a new Item type </h1>
45
        <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>
46
        <form name="createitemform" method="post" action="onboarding.pl">
47
            <fieldset class="rows">
48
                <input type="hidden" name="step" value="4"/>
49
                <input type="hidden" name="op" value="add_validate" />
50
                <ol>
51
                    <li>
52
                        <label for="itemtype" class="required">Item type code: </label>
53
                        <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 %]" />
54
                        <span class="required">Required</span>
55
                    </li>
56
22
57
                    <li>
23
            [% IF op == "add_validate" %]
58
                        <label for="description" class="required">Description: </label>
24
                [% IF message != "error_on_insert" %]
59
                        <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">
25
60
                        <span class="required">Required</span>
26
                    <h2>Web installer &rsaquo; Item type created</h2>
61
                    </li>
27
62
                </ol>
28
                    <form id="createitemtype" method="post" action="onboarding.pl">
63
            <br>
29
                        <input type="hidden" name="step" value="5"/>
64
            <input type="submit" class="action" value="Submit"/>
30
                        <div class="alert alert-success"> Success: New item type created!</div>
65
        </fieldset>
31
                        <p> To create another item type later and for more settings go to: </p>
66
        </form>
32
                        <div class="breadcrumbs"> Administration &rsaquo; Item types </div>
67
[% END %]
33
                        <input type="submit" class="btn btn-primary" value="Continue to the next step"/>
34
                    </form>
35
                [% ELSE %]
36
37
                    <h2>Web installer &rsaquo; Item type creation failed</h2>
38
39
                    <form id="retryitem" method="post" action="onboarding.pl">
40
                        <input type="hidden" name="step" value="4"/>
41
                        <h1 align="left">Failed </h1>
42
                        <div class="alert alert-danger">
43
                            <p>Item type was not successfully created. </br>
44
                            Please try again or contact your system administrator.
45
                            </p>
46
                        </div>
47
                    </form>
48
                <!--Implement a if statement to check if the item type was successfully created or not -->
49
                [% END %]
50
            [% ELSE %]
51
                <!--Create a item type screen 1-->
52
                    <h2>Web installer &rsaquo; Create a new item type </h2>
53
54
                    <p> Item types are used to group related items. Examples of item types might be books, CDs, or DVDs.</p>
55
                    <p> When adding to your institution's catalog you will create an item of a particular item type.</p>
56
                    <p> Importantly 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>
57
58
                    <form id="createitemform" method="post" action="onboarding.pl">
59
                        <fieldset class="rows">
60
                            <input type="hidden" name="step" value="4"/>
61
                            <input type="hidden" name="op" value="add_validate" />
62
                            <ol>
63
                                <li>
64
                                    <label for="itemtype" class="required">Item type code: </label>
65
                                    <input type="text" name="itemtype"  id="itemtype" size="10" maxlength="10" class="required" required="required" />
66
                                    <span class="required">Required</span>
67
                                </li>
68
69
                                <li>
70
                                    <label for="description" class="required">Description: </label>
71
                                    <input type="text" name="description" id="description" size="42" class="required" required="required">
72
                                    <span class="required">Required</span>
73
                                </li>
74
                            </ol>
75
                            <input type="submit" class="btn btn-primary" value="Submit"/>
76
                        </fieldset>
77
                    </form>
78
            [% END %]
79
        </div>
80
    </div>
81
82
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-115 / +119 lines)
Lines 1-127 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; Create circulation rule</title>
3
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
3
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
4
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'installer-doc-head-close.inc' %]
5
[% INCLUDE 'validator-strings.inc' %]
6
[% INCLUDE 'installer-strings.inc' %]
7
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
8
</head>
5
9
6
<div>
10
<body id="installer" class="installer">
7
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
8
</div>
9
11
10
[% IF (finish) %]
12
    <div class="container-fluid">
11
<h1>Congratulations you have finished and ready to use Koha</h1>
13
        <div class="row">
12
<a href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
14
            <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
13
15
14
[% END %]
16
            <h1 id="logo"><a href="#">Koha</a></h1>
15
17
16
<!--Create a circulation rule screen 2-->
18
            [% IF (finish) %]
17
[% IF op == "add_validate" %]
18
        <!--New circulation rule created-->
19
        <form name="finish" method="post" action="onboarding.pl">
20
            <input type="hidden" name="op" value="finish" />
21
            <h1 align="left"> New circulation rule </h1>
22
            <div>
23
                 <p> Success: circulation rule created!</p>
24
                 <p> To create circulation rule, go to <br>
25
                 More -> Administration -> Circulation and Fine Rules
26
            </div>
27
                 Next up:
28
                 <input type="submit" name="op" value="Finish"/>
29
        </form>
30
[% ELSE %]
31
<!--Create a circulation rule screen 1-->
32
       <h1 align="left"> Create a new circulation rule </h1>
33
       <form name="createcirculationrule" method="post" action="onboarding.pl">
34
            <fieldset class="rows">
35
                 <input type="hidden" name="step" value="5"/>
36
                 <input type="hidden" name="op" value="add_validate" />
37
                    <ol>
38
                    <li>
39
                        <label for="branch" 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 id="branch" 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="categorycodeselection" required="required" onchange = "update_categorycode(this);">
52
                            <option value=""> Choose</option>
53
                            <option value="*" selected="selected">All</option>
54
                            [% FOREACH category IN categories %]
55
                                <option id="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option>
56
                            [%END%]
57
                        </select>
58
                        <span class="required">Required</span>
59
                    </li>
60
19
61
                    <li>
20
                <h2>Web installer &rsaquo; Complete</h2>
62
                        <label for="itemtype"> Item type: </label>
21
                <h3>Congratulations you have finished and ready to use Koha</h3>
63
                        <select id="itemtype" name="itemtype" required="required">
22
                <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
64
                        <option value""> Choose </option>
65
                        <option value="*" selected="selected">All</option>
66
                            [% FOREACH item IN itemtypes %]
67
                                <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %]
68
                            [%END%]
69
                        </select>
70
                        <span class="required"> Required</span>
71
                    </li>
72
                    <li>
73
                        <label for="maxissueqty" class="required">Current checkouts allowed: </label>
74
                        <input type="number" min="0" name="maxissueqty" title="Please only enter numbers" id="maxissueqty" size="10" max="10" value="" class="required" required="required" />
75
                        <span class="required">Required</span>
76
                    </li>
77
23
78
                    <li>
24
            [% END %]
79
                        <label for="issuelength" class="required">Loan period: </label>
80
                        <input type="number" min="0" name="issuelength" title="Please only enter numbers" id="issuelength" size="10" max="10" value="" class="required" required="required" />
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
25
92
                        [% SWITCH units %]
26
            <!--Create a circulation rule screen 2-->
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" title="Please only enter numbers" id="renewalsallowed" size="10" max="10" value="" class="required" required="required" />
105
                        <span class="required">Required</span>
106
                     </li>
107
27
108
                     <li>
28
            [% IF op == "add_validate" %]
109
                        <label for="renewalperiod" class="required">Renewals period: </label>
29
                    <!--New circulation rule created-->
110
                        <input type="number" min="0" name="renewalperiod" title="Please only enter numbers" id="renewalperiod" size="10" max="10" value="" class="required" required="required" />
30
                    <h2>Web installer &rsaquo; New circulation rule created</h2>
111
                        <span class="required">Required</span>
31
                    <form id="finish" method="post" action="onboarding.pl">
112
                     </li>
32
                        <input type="hidden" name="op" value="finish" />
33
                        <div class="alert alert-success">
34
                            Success: circulation rule created!
35
                        </div>
36
                        <p> To create more circulation rules, go to: </p>
37
                        <div class="breadcrumbs">Administration &rsaquo; Circulation and fine rules</div>
38
                         <input type="submit" class="btn btn-primary" value="Finish" />
39
                    </form>
40
            [% ELSE %]
113
41
114
                     <li>
42
            <!--Create a circulation rule screen 1-->
115
                        <label for="onshelfholds">On shelf holds allowed: </label>
43
                    <h2>Web installer &rsaquo; Create a new circulation rule </h2>
116
                        <select name="onshelfholds" id="onshelfholds" required="required">
44
                    <form id="createcirculationrule" method="post" action="onboarding.pl">
117
                              <option value="">Choose</option>
45
                        <fieldset class="rows">
118
                              <option value="1" selected="selected">Yes</option>
46
                            <input type="hidden" name="step" value="5"/>
119
                              <option value="0">If any unavailable</option>
47
                            <input type="hidden" name="op" value="add_validate" />
120
                              <option value="2">If all unavailable</option>
48
                                <ol>
121
                        </select>
49
                                    <li>
122
                     </li>
50
                                        <label for="branchname" class="required"> Library branch</label>
123
                  </ol>
51
                                        <select name="branch" id="branchname" required="required">
124
            </fieldset><br>
52
                                            <option value=""> Choose</option>
125
                <input type="submit" class="action" value="Submit"/>
53
                                            <option value="*" selected="selected">All</option>
126
     </form>
54
                                            [% FOREACH library IN libraries %]
127
[% END %]
55
                                                <option id="branch" value="[% library.branchcode %]"> [% library.branchname %]</option>
56
                                            [% END %]
57
                                        </select>
58
                                        <span class="required">Required</span>
59
                                    </li>
60
                                    <li>
61
                                        <label for="categorycodeselection" class="required">Patron category: </label>
62
                                        <select name="categorycode" id="categorycodeselection" required="required">
63
                                            <option value=""> Choose</option>
64
                                            <option value="*" selected="selected">All</option>
65
                                            [% FOREACH category IN categories %]
66
                                                <option id="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option>
67
                                            [%END%]
68
                                        </select>
69
                                        <span class="required">Required</span>
70
                                    </li>
71
72
                                    <li>
73
                                        <label for="itemtype"> Item type: </label>
74
                                        <select id="itemtype" name="itemtype" required="required">
75
                                        <option value=""> Choose </option>
76
                                        <option value="*" selected="selected">All</option>
77
                                            [% FOREACH item IN itemtypes %]
78
                                                <option value = "[% item.itemtype %]"> [% item.itemtype %]</option>
79
                                            [%END%]
80
                                        </select>
81
                                        <span class="required"> Required</span>
82
                                    </li>
83
                                    <li>
84
                                        <label for="maxissueqty" class="required">Current checkouts allowed: </label>
85
                                        <input type="number" min="0" name="maxissueqty" title="Please only enter numbers" id="maxissueqty" size="10" class="required" required="required" />
86
                                        <span class="required">Required</span>
87
                                    </li>
88
89
                                    <li>
90
                                        <label for="issuelength" class="required">Loan period: </label>
91
                                        <input type="number" min="0" name="issuelength" title="Please only enter numbers" id="issuelength" size="10" class="required" required="required" />
92
                                        <span class="required">Required</span>
93
                                   </li>
94
                                   <li>
95
                                        <label for="lengthunit">Units: </label>
96
                                        <select name="lengthunit" id="lengthunit" required="required">
97
                                            <option value=""> Choose </option>
98
                                            <option value="days" selected="selected">Days</option>
99
                                            <option value="hours">Hours</option>
100
                                        </select>
101
                                     </li>
102
                                     <li>
103
                                        <label for="renewalsallowed" class="required">Renewals allowed: </label>
104
                                        <input type="number" min="0" name="renewalsallowed" title="Please only enter numbers" id="renewalsallowed" size="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" title="Please only enter numbers" id="renewalperiod" size="10" 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
                        </fieldset>
125
                        <input type="submit" class="btn btn-primary" value="Submit" />
126
                 </form>
127
            [% END %]
128
        </div>
129
    </div>
130
131
[% 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 17942