View | Details | Raw Unified | Return to bug 18462
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 (-90 / +109 lines)
Lines 1-74 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
29
7
[% IF ( selectframeworks ) %]
30
<div class="container-fluid">
8
    <script type="text/javascript">
31
    <div class="row">
9
//<![CDATA[
32
        <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
10
33
11
var surl = unescape(window.location.pathname);
34
            <h1 id="logo"><a href="#">Koha</a></h1>
12
35
13
function doLoad()
36
            [% IF ( finish ) %]
14
{
37
                <h2>Web installer &rsaquo; Installation complete</h2>
15
    // the timeout value should be the same as in the "refresh" meta-tag
38
                <h3>Congratulations, installation complete</h3>
16
    setTimeout( "refresh()", 2*1000 );
39
                <p>
17
}
40
                    If this page does not redirect in 5 seconds, <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.
18
41
                </p>
19
function refresh(value)
42
            [% END %]
20
{
21
    //  The argument to the location.reload function determines
22
    //  if the browser should retrieve the document from the
23
    //  web-server.  In our example all we need to do is cause
24
    //  the JavaScript block in the document body to be
25
    //  re-evaluated.  If we needed to pull the document from
26
    //  the web-server again (such as where the document contents
27
    //  change dynamically) we would pass the argument as 'true'.
28
    //
29
    surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
30
31
    window.location.replace( surl );
32
}
33
43
34
function selectAllFrameworks()
35
{
36
    //  A handy short link that selects all available checkboxes
37
    //  on the page.
38
    //
39
    var checkboxes = document.getElementsByTagName("input");
40
    for (var i = 0; i < checkboxes.length; i++)
41
    {
42
        if (checkboxes[i].type == 'checkbox')
43
        {
44
            checkboxes[i].checked = true;
45
        }
46
    }
47
44
48
    //  Prevent event propergation.
45
            [% IF ( choosemarc ) %]
49
    return false;
46
                <h2>Choose your setup</h2>
50
}
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
51
52
function Hide(link)
52
                    <p>
53
{
53
                        <label><input type="radio" name="setup" value="Basic" checked="checked" /> Basic</label>
54
    //  Toggle the display of a given element on the page.
54
                    </p>
55
    //
55
                    <p>
56
    subfield = document.getElementById('bloc'+link);
56
                        <label><input type="radio" name="setup" value="Advanced"/> Advanced</label>
57
    var initstyle = subfield.style.display;
57
                    </p>
58
    if (initstyle == 'block') subfield.style.display = 'none' ;
59
    if (initstyle == 'none') subfield.style.display = 'block' ;
60
}
61
58
62
//]]>
59
                    <h2>Select your MARC flavor</h2>
63
</script>
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>
64
[% END %]
65
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
[% IF ( choosemarc ) %]
74
   <h2 align="center">Select your MARC flavor</h2>
85
   <h2 align="center">Select your MARC flavor</h2>
Lines 191-223 function Hide(link) Link Here
191
    </p>
202
    </p>
192
[% END %]
203
[% END %]
193
204
205
            [% IF ( proposeimport ) %]
206
                <h2>Web installer &rsaquo; Set up database</h2>
207
                <p>Now we're ready to create the database tables and fill them with some default data.</p>
208
                <form action="install.pl" method="post">
209
                    <input type="hidden" name="step" value="3" />
210
                    <input type="hidden" name="op" value="importdatastructure" />
211
                    <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
212
                </form>
213
            [% END %]
194
214
195
[% IF ( importdatastructure ) %]
215
            [% IF ( default ) %]
196
    [% IF ( error ) %]
216
                [% IF ( upgrading ) %]
197
        <p>The following error occurred while importing the database structure:</p>
217
                    <h2>Web installer &rsaquo; Update database</h2>
198
        <p class="error">[% error %] </p>
218
                    <p>We are upgrading from Koha [% dbversion %] to [% kohaversion %]</p>
199
        <p>Please contact your system administrator</p>
219
                    <p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
200
    [% ELSE %]
220
                [% ELSE %]
201
        <h2 align="center">Success</h2>
221
                    <h2>Web installer &rsaquo; Install basic configuration settings</h2>
202
        <ul>
222
                    <p>We are ready to do some basic configuration.</p>
203
        <li>Database tables created</li>
223
                    <p> <a href="install.pl?step=3&amp;op=choosemarc" class="btn btn-primary">Continue to the next step</a> </p>
204
        </ul>
224
                [% END %]
205
        <form action="install.pl">
225
            [% END %]
206
        <input type="hidden" name="step" value="3" />
207
            <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
208
        </form>
209
    [% END %]
210
[% END %]
211
212
226
213
[% IF ( proposeimport ) %]
227
            [% IF ( updatestructure ) %]
214
    <p>Now we're ready to create the database tables and fill them with some default data.</p>
228
                <h2>Updating database structure</h2>
215
    <form action="install.pl">
229
                [% IF ( has_update_succeeds ) %]
216
    <input type="hidden" name="step" value="3" />
230
                    <p>Update report :</p>
217
    <input type="hidden" name="op" value="importdatastructure" />
231
                    <ul>
218
    <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
232
                        [% FOREACH update_repor IN update_report %]
219
    </form>
233
                            <li>[% update_repor.line |html %]</li>
220
[% END %]
234
                        [% END %]
235
                    </ul>
236
                [% END %]
221
237
222
[% IF ( default ) %]
238
[% IF ( default ) %]
223
    [% IF ( upgrading ) %]
239
    [% IF ( upgrading ) %]
Lines 232-239 function Hide(link) Link Here
232
        <br>
248
        <br>
233
            <a href="install.pl?step=3&amp;op=choosemarc" class="button">Install basic configuration settings</a>
249
            <a href="install.pl?step=3&amp;op=choosemarc" class="button">Install basic configuration settings</a>
234
250
235
    [% END %]
251
                [% UNLESS ( has_update_errors ) %]
236
[% END %]
252
                    <p>Everything went okay. Update done.</p>
253
                [% END %]
254
                <p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
255
           [% END # / IF updatestructure %]
256
    </div>
257
</div>
237
258
238
[% IF ( updatestructure ) %]
259
[% IF ( updatestructure ) %]
239
  <div><h2 align="center">Updating database structure</h2>
260
  <div><h2 align="center">Updating database structure</h2>
Lines 260-265 function Hide(link) Link Here
260
  </div>
281
  </div>
261
[% END %]
282
[% END %]
262
283
263
</div>
284
[% INCLUDE 'intranet-bottom.inc' %]
264
</body>
265
</html>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-21 / +12 lines)
Lines 2-32 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
30
<div>
21
<div>
31
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
22
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
32
</div>
23
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-53 / +3 lines)
Lines 1-63 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
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
8
[% INCLUDE 'datatables.inc' %]
9
[% INCLUDE 'js_includes.inc' %]
4
[% INCLUDE 'js_includes.inc' %]
5
[% INCLUDE 'validator-strings.inc' %]
6
[% INCLUDE 'installer-strings.inc' %]
10
7
11
<head>
12
<title>Create Koha administrator patron</title>
13
<!--jQuery scripts for creating patron-->
14
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
15
<script type="text/javascript">
16
     var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them"));
17
     jQuery.validator.addMethod( "password_match", function(value,element){
18
        var password = document.getElementById('password').value
19
        var confirmpassword = document.getElementById('password2').value
20
        if ( password != confirmpassword ){
21
                return false;
22
        }
23
        else{
24
                return true
25
        }
26
     },  MSG_PASSWORD_MISMATCH
27
);
28
29
$(document).ready(function(){
30
   $("#Submit").click(function(){
31
      $("#createpatron").validate({
32
        rules: {
33
            surname: {
34
                required: true,
35
            },
36
            firstname: {
37
                required: true,
38
            },
39
            cardnumber: {
40
                required: true,
41
            },
42
            password: {
43
                 password_match:true
44
            }
45
        },
46
        messages: {
47
           password: {
48
                 required: MSG_PASSWORD_MISMATCH
49
           },
50
        }
51
      });
52
   });
53
});
54
</script>
55
</head>
8
</head>
56
9
57
<div>
10
<body id="installer" class="installer">
58
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
59
</div>
60
61
[% INCLUDE 'onboarding_messages.inc' %]
11
[% INCLUDE 'onboarding_messages.inc' %]
62
12
63
<h1 align="left"> Create koha administrator patron</h1>
13
<h1 align="left"> Create koha administrator patron</h1>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-5 / +3 lines)
Lines 1-12 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
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
<head>
4
[% INCLUDE 'validator-strings.inc' %]
5
    <title>Create item type</title>
5
[% INCLUDE 'installer-strings.inc' %]
6
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
6
</head>
7
</head>
7
<div>
8
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
9
</div>
10
8
11
[% INCLUDE 'onboarding_messages.inc' %]
9
[% INCLUDE 'onboarding_messages.inc' %]
12
10
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-3 / +5 lines)
Lines 1-10 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Create Circulation rule</title>
2
<title>Create Circulation rule</title>
3
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'validator-strings.inc' %]
5
[% INCLUDE 'installer-strings.inc' %]
6
<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
7
</head>
4
8
5
<div>
9
<body id="installer" class="installer">
6
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
7
</div>
8
10
9
[% INCLUDE 'onboarding_messages.inc' %]
11
[% INCLUDE 'onboarding_messages.inc' %]
10
12
(-)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 18462