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

(-)a/installer/onboarding.pl (-110 / +98 lines)
Lines 63-69 my ( $template, $loggedinuser, $cookie ) = Link Here
63
  C4::InstallAuth::get_template_and_user(
63
  C4::InstallAuth::get_template_and_user(
64
    {
64
    {
65
        template_name => "/onboarding/onboardingstep"
65
        template_name => "/onboarding/onboardingstep"
66
          . ( $step ? $step : 0 ) . ".tt",
66
          . ( $step ? $step : 1 ) . ".tt",
67
        query           => $input,
67
        query           => $input,
68
        type            => "intranet",
68
        type            => "intranet",
69
        authnotrequired => 0,
69
        authnotrequired => 0,
Lines 93-152 my $dbh = DBI->connect( Link Here
93
#Store the value of the template input name='op' in the variable $op so we can check if the user has pressed the button with the name="op" and value="finish" meaning the user has finished the onboarding tool.
93
#Store the value of the template input name='op' in the variable $op so we can check if the user has pressed the button with the name="op" and value="finish" meaning the user has finished the onboarding tool.
94
my $op = $input->param('op');
94
my $op = $input->param('op');
95
$template->param( 'op' => $op );
95
$template->param( 'op' => $op );
96
96
if ( $op && $op eq 'finish' )
97
if ( $op && $op eq 'finish' )
97
{ #If the value of $op equals 'finish' then redirect user to /cgi-bin/koha/mainpage.pl
98
{ #If the value of $op equals 'finish' then redirect user to /cgi-bin/koha/mainpage.pl
98
    print $input->redirect("/cgi-bin/koha/mainpage.pl");
99
    print $input->redirect("/cgi-bin/koha/mainpage.pl");
99
    exit;
100
    exit;
100
}
101
}
101
102
102
#Store the value of the template input name='start' in the variable $start so we can check if the user has pressed this button and started the onboarding tool process
103
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
103
my $start = $input->param('start');
104
$template->param(
104
$template->param( 'start' => $start );
105
     libraries   => $libraries,
106
     group_types => [
107
     {
108
            categorytype => 'searchdomain',
109
            categories   => [
110
               Koha::LibraryCategories->search(
111
                   { categorytype => 'searchdomain' }
112
               )
113
            ],
114
     },
115
     {
116
            categorytype => 'properties',
117
            categories   => [
118
               Koha::LibraryCategories->search(
119
                   { categorytype => 'properties' }
120
               )
121
            ],
122
     },
123
     ]
124
);
105
125
106
if ( $start && $start eq 'Start setting up my Koha' ) {
107
    my $libraries =
108
      Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
109
    $template->param(
110
        libraries   => $libraries,
111
        group_types => [
112
            {
113
                categorytype => 'searchdomain',
114
                categories   => [
115
                    Koha::LibraryCategories->search(
116
                        { categorytype => 'searchdomain' }
117
                    )
118
                ],
119
            },
120
            {
121
                categorytype => 'properties',
122
                categories   => [
123
                    Koha::LibraryCategories->search(
124
                        { categorytype => 'properties' }
125
                    )
126
                ],
127
            },
128
        ]
129
    );
130
}
131
elsif ( $start && $start eq 'Minimal patron category setup' ) {
132
126
133
#Select all the patron category records in the categories database table and give them to the template
127
#Select all the patron category records in the categories database table and give them to the template
134
    my $categories = Koha::Patron::Categories->search();
128
    my $categories = Koha::Patron::Categories->search();
135
    $template->param( categories => $categories, );
129
    $template->param( 'categories' => $categories, );
136
130
137
#Check if the $step variable equals 1 i.e. the user has clicked to create a library in the create library screen 1
131
#Check if the $step variable equals 1 i.e. the user has clicked to create a library in the create library screen 1
138
}
139
elsif ( $start && $start eq 'Minimal item type setup' ) {
140
141
    my $itemtypes = Koha::ItemTypes->search();
132
    my $itemtypes = Koha::ItemTypes->search();
142
    $template->param( itemtypes => $itemtypes, );
133
    $template->param( 'itemtypes' => $itemtypes, );
143
}
144
elsif ( $step && $step == 1 ) {
145
    my $createlibrary = $input->param('createlibrary')
146
      ; #Store the inputted library branch code and name in $createlibrary variable
147
    $template->param( 'createlibrary' => $createlibrary )
148
      ; # Hand the library values back to the template in the createlibrary variable
149
134
135
if ( $step && $step == 1 ) {
150
    #store inputted parameters in variables
136
    #store inputted parameters in variables
151
    my $branchcode = $input->param('branchcode');
137
    my $branchcode = $input->param('branchcode');
152
    $branchcode = uc($branchcode);
138
    $branchcode = uc($branchcode);
Lines 179-266 elsif ( $step && $step == 1 ) { Link Here
179
    else {
165
    else {
180
        $message = 'error_on_insert';
166
        $message = 'error_on_insert';
181
    }
167
    }
168
    warn $message;
182
    $template->param( 'message' => $message );
169
    $template->param( 'message' => $message );
183
170
184
#Check if the $step variable equals 2 i.e. the user has clicked to create a patron category in the create patron category screen 1
171
#Check if the $step variable equals 2 i.e. the user has clicked to create a patron category in the create patron category screen 1
185
}
172
}
186
elsif ( $step && $step == 2 ) {
173
elsif ( $step && $step == 2 ) {
187
    my $createcat = $input->param('createcat')
174
    if ($op eq "add_validate_category"){
188
      ;    #Store the inputted category code and name in $createcat
175
        #Initialising values
189
    $template->param( 'createcat' => $createcat );
176
        my $searchfield  = $input->param('description') // q||;
177
        my $categorycode = $input->param('categorycode');
178
        my $op           = $input->param('op') // 'list';
179
        my $message;
180
        my $category;
181
        $template->param( 'categorycode' => $categorycode );
190
182
191
    #Initialising values
183
        my ( $template, $loggedinuser, $cookie ) =
192
    my $searchfield  = $input->param('description') // q||;
184
            C4::InstallAuth::get_template_and_user(
193
    my $categorycode = $input->param('categorycode');
185
            {
194
    my $op           = $input->param('op') // 'list';
186
                template_name   => "/onboarding/onboardingstep2.tt",
195
    my $message;
187
                query           => $input,
196
    my $category;
188
                type            => "intranet",
197
    $template->param( 'categorycode' => $categorycode );
189
                authnotrequired => 0,
190
                flagsrequired =>
191
                { parameters => 'parameters_remaining_permissions' },
192
                debug => 1,
193
            }
194
            );
198
195
199
    my ( $template, $loggedinuser, $cookie ) =
196
        #Once the user submits the page, this code validates the input and adds it
200
      C4::InstallAuth::get_template_and_user(
197
        #to the database as a new patron category
201
        {
198
        $categorycode = $input->param('categorycode');
202
            template_name   => "/onboarding/onboardingstep2.tt",
199
        my $description           = $input->param('description');
203
            query           => $input,
200
        my $overduenoticerequired = $input->param('overduenoticerequired');
204
            type            => "intranet",
201
        my $category_type         = $input->param('category_type');
205
            authnotrequired => 0,
202
        my $default_privacy       = $input->param('default_privacy');
206
            flagsrequired =>
203
        my $enrolmentperiod       = $input->param('enrolmentperiod');
207
              { parameters => 'parameters_remaining_permissions' },
204
        my $enrolmentperioddate   = $input->param('enrolmentperioddate') || undef;
208
            debug => 1,
205
206
        #Converts the string into a date format
207
        if ($enrolmentperioddate) {
208
            $enrolmentperioddate = output_pref(
209
                {
210
                    dt         => dt_from_string($enrolmentperioddate),
211
                    dateformat => 'iso',
212
                    dateonly   => 1,
213
                }
214
            );
209
        }
215
        }
210
      );
211
216
212
    #Once the user submits the page, this code validates the input and adds it
217
        #Adds a new patron category to the database
213
    #to the database as a new patron category
218
        $category = Koha::Patron::Category->new(
214
    $categorycode = $input->param('categorycode');
215
    my $description           = $input->param('description');
216
    my $overduenoticerequired = $input->param('overduenoticerequired');
217
    my $category_type         = $input->param('category_type');
218
    my $default_privacy       = $input->param('default_privacy');
219
    my $enrolmentperiod       = $input->param('enrolmentperiod');
220
    my $enrolmentperioddate   = $input->param('enrolmentperioddate') || undef;
221
222
    #Converts the string into a date format
223
    if ($enrolmentperioddate) {
224
        $enrolmentperioddate = output_pref(
225
            {
219
            {
226
                dt         => dt_from_string($enrolmentperioddate),
220
                categorycode          => $categorycode,
227
                dateformat => 'iso',
221
                description           => $description,
228
                dateonly   => 1,
222
                overduenoticerequired => $overduenoticerequired,
223
                category_type         => $category_type,
224
                default_privacy       => $default_privacy,
225
                enrolmentperiod       => $enrolmentperiod,
226
                enrolmentperioddate   => $enrolmentperioddate,
229
            }
227
            }
230
        );
228
        );
231
    }
232
229
233
    #Adds a new patron category to the database
230
        eval { $category->store; };
234
    $category = Koha::Patron::Category->new(
235
        {
236
            categorycode          => $categorycode,
237
            description           => $description,
238
            overduenoticerequired => $overduenoticerequired,
239
            category_type         => $category_type,
240
            default_privacy       => $default_privacy,
241
            enrolmentperiod       => $enrolmentperiod,
242
            enrolmentperioddate   => $enrolmentperioddate,
243
        }
244
    );
245
231
246
    eval { $category->store; };
232
        #Error messages
233
        if ($category) {
234
            $message = 'success_on_insert';
235
        }
236
        else {
237
            $message = 'error_on_insert';
238
        }
247
239
248
    #Error messages
240
        $template->param( 'message' => $message );
249
    if ($category) {
250
        $message = 'success_on_insert';
251
    }
252
    else {
253
        $message = 'error_on_insert';
254
    }
241
    }
255
256
    $template->param( 'message' => $message );
257
258
    #Create a patron
242
    #Create a patron
259
}
243
}
260
elsif ( $step && $step == 3 ) {
244
elsif ( $step && $step == 3 ) {
261
    my $firstpassword  = $input->param('password');
245
    my $firstpassword  = $input->param('password');
262
    my $secondpassword = $input->param('password2');
246
    my $secondpassword = $input->param('password2');
263
247
248
249
    #Find all patron records in the database and hand them to the template
250
    my %currentpatrons = Koha::Patrons->search();
251
    my $currentpatrons = values %currentpatrons;
252
    warn $currentpatrons;
253
    $template->param( 'patrons' =>$currentpatrons);
254
255
264
#Find all library records in the database and hand them to the template to display in the library dropdown box
256
#Find all library records in the database and hand them to the template to display in the library dropdown box
265
    my $libraries =
257
    my $libraries =
266
      Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
258
      Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
Lines 288-298 elsif ( $step && $step == 3 ) { Link Here
288
280
289
#Find all patron categories in the database and hand them to the template to display in the patron category dropdown box
281
#Find all patron categories in the database and hand them to the template to display in the patron category dropdown box
290
    my $categories = Koha::Patron::Categories->search();
282
    my $categories = Koha::Patron::Categories->search();
291
    $template->param( categories => $categories, );
283
    $template->param( 'categories' => $categories, );
292
284
293
#Incrementing the highest existing patron cardnumber to prevent duplicate cardnumber entry
285
#Incrementing the highest existing patron cardnumber to prevent duplicate cardnumber entry
294
    my $exisiting_cardnumber = my $sth_search =
286
    my $exisiting_cardnumber = my $sth_search =
295
      $dbh->prepare("SELECT MAX(cardnumber) FROM borrowers");
287
      $dbh->prepare("SELECT MAX(cardnumber) FROM borrowers");
288
    warn $exisiting_cardnumber;
296
    my $new_cardnumber = $exisiting_cardnumber + 1;
289
    my $new_cardnumber = $exisiting_cardnumber + 1;
297
    warn $new_cardnumber;
290
    warn $new_cardnumber;
298
    $template->param( "newcardnumber" => $new_cardnumber );
291
    $template->param( "newcardnumber" => $new_cardnumber );
Lines 446-454 elsif ( $step && $step == 3 ) { Link Here
446
    }
439
    }
447
}
440
}
448
elsif ( $step && $step == 4 ) {
441
elsif ( $step && $step == 4 ) {
449
    my $createitemtype = $input->param('createitemtype');
450
    $template->param( 'createitemtype' => $createitemtype );
451
452
    my ( $template, $borrowernumber, $cookie ) =
442
    my ( $template, $borrowernumber, $cookie ) =
453
      C4::InstallAuth::get_template_and_user(
443
      C4::InstallAuth::get_template_and_user(
454
        {
444
        {
Lines 460-470 elsif ( $step && $step == 4 ) { Link Here
460
              { parameters => 'parameters_remaining_permissions' },
450
              { parameters => 'parameters_remaining_permissions' },
461
            debug => 1,
451
            debug => 1,
462
        }
452
        }
463
      );
453
    );
464
454
  if ($op eq "add_validate"){
465
    if ( $op eq 'add_validate' ) {
466
        my $description   = $input->param('description');
455
        my $description   = $input->param('description');
467
        my $itemtype_code = $input->param('itemtype');
456
        my $itemtype_code = $input->param('itemtype');
457
        warn $description;
468
        $itemtype_code = uc($itemtype_code);
458
        $itemtype_code = uc($itemtype_code);
469
459
470
  #Create a new itemtype object using the user inputted itemtype and description
460
  #Create a new itemtype object using the user inputted itemtype and description
Lines 672-679 elsif ( $step && $step == 5 ) { Link Here
672
            }
662
            }
673
        }
663
        }
674
664
675
        #End new code
676
677
        my $issuingrule = Koha::IssuingRules->find(
665
        my $issuingrule = Koha::IssuingRules->find(
678
            { categorycode => $bor, itemtype => $itemtype, branchcode => $br }
666
            { categorycode => $bor, itemtype => $itemtype, branchcode => $br }
679
        );
667
        );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/Backupstep3.tt (-257 lines)
Lines 1-257 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 3</title>
2
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
<div>
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web  installer &rsaquo; Step 3</h1>
6
7
[% IF ( selectframeworks ) %]
8
    <script type="text/javascript">
9
    //<![CDATA[
10
11
    var surl = unescape(window.location.pathname);
12
13
    function doLoad()
14
    {
15
        // the timeout value should be the same as in the "refresh" meta-tag
16
        setTimeout( "refresh()", 2*1000 );
17
    }
18
19
    function refresh(value)
20
    {
21
        //  The argument to the location.reload function determines
22
        //  if the browser should retrieve the document from the
23
        //  web-server.  In our example all we need to do is cause
24
        //  the JavaScript block in the document body to be
25
        //  re-evaluated.  If we needed to pull the document from
26
        //  the web-server again (such as where the document contents
27
        //  change dynamically) we would pass the argument as 'true'.
28
        //
29
        surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
30
31
        window.location.replace( surl );
32
    }
33
34
    function selectAllFrameworks()
35
    {
36
        //  A handy short link that selects all available checkboxes
37
        //  on the page.
38
        //
39
        var checkboxes = document.getElementsByTagName("input");
40
        for (var i = 0; i < checkboxes.length; i++)
41
        {
42
            if (checkboxes[i].type == 'checkbox')
43
            {
44
                checkboxes[i].checked = true;
45
            }
46
        }
47
48
        //  Prevent event propergation.
49
        return false;
50
    }
51
52
    function Hide(link)
53
    {
54
        //  Toggle the display of a given element on the page.
55
        //
56
        subfield = document.getElementById('bloc'+link);
57
        var initstyle = subfield.style.display;
58
        if (initstyle == 'block') subfield.style.display = 'none' ;
59
        if (initstyle == 'none') subfield.style.display = 'block' ;
60
    }
61
62
    //]]>
63
    </script>
64
[% END %]
65
[% IF ( finish ) %]
66
    <h1>Congratulations, installation complete</h1>
67
    <p>If this page does not redirect in 5 seconds, click <a href="/">here</a>.</p>
68
[% END %]
69
[% IF ( choosemarc ) %]
70
    <h2 align="center">Select your MARC flavor</h2>
71
    <form name="frameworkselection" method="post" action="install.pl">
72
    <input type="hidden" name="step" value="3" />
73
    <input type="hidden" name="op" value="selectframeworks"/>
74
    <p>
75
    [% FOREACH flavourloo IN flavourloop %]
76
    <div>
77
            [% IF ( flavourloo.checked ) %]
78
                <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
79
            [% ELSE %]
80
                <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/>
81
            [% END %]
82
    </div>
83
    [% END %]
84
    </p>
85
    <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
86
    </form>
87
[% END %]
88
89
[% IF ( selectframeworks ) %]
90
    <h2 align="center">Selecting Default Settings</h2>
91
    <script type="text/javascript">
92
        var linklabel = _("Select all sample data");
93
        document.write('<p><a href="#" onclick="return selectAllFrameworks();">'+linklabel+'</a></p>');
94
    </script>
95
    <form name="frameworkselection" method="post" action="install.pl">
96
    <input type="hidden" name="step" value="3" />
97
    <input type="hidden" name="op" value="addframeworks" />
98
99
    [% IF ( frameworksloop ) %]
100
    <h2>MARC frameworks: [% marcflavour %]</h2>
101
    [% IF ( en_marc_frameworks ) %]
102
        <h4><span class="error">No MARC frameworks are available for your language.
103
                Defaulting to the frameworks supplied for English (en)<span></h4>
104
    [% END %]
105
    [% FOREACH frameworksloo IN frameworksloop %]
106
    <div>
107
    <h3>[% frameworksloo.label %]</h3>
108
    [% FOREACH framework IN frameworksloo.frameworks %]
109
        <table style="border:1px;vertical-align:top;">
110
        <tr>
111
        <td style="vertical-align:top;">
112
         [% IF ( framework.checked ) %]
113
         <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" checked="checked" />
114
         [% ELSE %]
115
             <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
116
         [% END %]
117
         </td>
118
         <td>
119
            <label for="[% framework.fwkname %]">
120
                [% framework.fwkdescription %]
121
                <em>([% framework.fwkname %])</em>
122
            </label>
123
        </td>
124
        </table>
125
    [% END %]
126
    </div>
127
    [% END %]
128
    <h2>Other data</h2>
129
    [% END %]
130
    [% IF ( en_sample_data ) %]
131
        <h4><span class="error">No sample data and settings are available for your language.
132
                Defaulting to the samples supplied for English (en)<span></h4>
133
    [% END %]
134
    [% FOREACH levelloo IN levelloop %]
135
    <div>
136
    <h3>[% levelloo.label %]</h3>
137
    [% FOREACH framework IN levelloo.frameworks %]
138
        <table style="border:1px;vertical-align:top;">
139
        <tr>
140
        <td style="vertical-align:top;">
141
            [% IF ( framework.checked ) %]
142
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]"  id="[% framework.fwkname %]" />
143
            [% ELSE %]
144
                <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
145
            [% END %]
146
        </td>
147
        <td>
148
            <label for="[% framework.fwkname %]">
149
                [% framework.fwkdescription %]
150
                <em>([% framework.fwkname %])</em>
151
            </label>
152
        </td>
153
        </table>
154
    [% END %]
155
    </div>
156
    [% END %]
157
    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
158
    please be patient.</p>
159
    <p><input type="submit" value="Import &gt;&gt;" />
160
    </p>
161
    </form>
162
[% END %]
163
164
165
[% IF ( addframeworks ) %]
166
    [% FOREACH lis IN list %]
167
    <h3>[% lis.level %] data added</h3>
168
    <ul>
169
    [% FOREACH fwklis IN lis.fwklist %]
170
        <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li>
171
    [% END %]
172
    </ul>
173
    [% END %]
174
    <h3>All done!</h3>
175
    <p>Installation complete.<br />
176
        <p>Click on 'Finish' to complete and load the Koha Staff Interface.
177
        <form name="finish">
178
        <input type="hidden" name="step" value="3" />
179
        <input type="hidden" name="op" value="finish" />
180
        <input type="submit" value="Finish" /></form>
181
        </p>
182
    </p>
183
[% END %]
184
185
186
[% IF ( importdatastructure ) %]
187
    [% IF ( error ) %]
188
        <p>The following error occurred while importing the database structure:</p>
189
        <p class="error">[% error %] </p>
190
        <p>Please contact your system administrator</p>
191
    [% ELSE %]
192
        <h2 align="center">Success</h2>
193
        <ul>
194
        <li>Database tables created</li>
195
        </ul>
196
        <form action="install.pl">
197
        <input type="hidden" name="step" value="3" />
198
            <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
199
        </form>
200
    [% END %]
201
[% END %]
202
203
204
[% IF ( proposeimport ) %]
205
    <p>Now we're ready to create the database tables and fill them with some default data.</p>
206
    <form action="install.pl">
207
    <input type="hidden" name="step" value="3" />
208
    <input type="hidden" name="op" value="importdatastructure" />
209
    <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
210
    </form>
211
[% END %]
212
213
214
[% IF ( default ) %]
215
    [% IF ( upgrading ) %]
216
        <p>
217
            We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must <a href="install.pl?step=3&amp;op=updatestructure" class="button">update your database</a>
218
        </p>
219
    [% ELSE %]
220
        <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation:
221
        <br>
222
        <br>
223
            <a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Install basic configuration settings</button></a>
224
        </p>
225
    [% END %]
226
[% END %]
227
228
229
230
[% IF ( updatestructure ) %]
231
  <div><h2 align="center">Updating database structure</h2>
232
  [% IF ( has_update_succeeds ) %]
233
  <p>Update report :</p>
234
    <ul>
235
      [% FOREACH update_repor IN update_report %]
236
          <li>[% update_repor.line |html %]</li>
237
      [% END %]
238
    </ul>
239
  [% END %]
240
  [% IF ( has_update_errors ) %]
241
  <p>Update errors :</p>
242
    <ul>
243
      [% FOREACH update_error IN update_errors %]
244
          <li class="update_error">[% update_error.line |html %]</li>
245
      [% END %]
246
    </ul>
247
  [% END %]
248
 [% UNLESS ( has_update_errors ) %]
249
    <p>Everything went OK, update done.</p>
250
  [% END %]
251
<a href="install.pl?step=3&amp;op=finished" class="button">Continue to log in to Koha</a>
252
  </div>
253
[% END %]
254
255
</div>
256
</body>
257
</html>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-91 / +98 lines)
Lines 66-72 function Hide(link) Link Here
66
66
67
[% IF ( finish ) %]
67
[% IF ( finish ) %]
68
    <h1>Congratulations, installation complete</h1>
68
    <h1>Congratulations, installation complete</h1>
69
    <p>If this page does not redirect in 5 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.</p>
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 %]
70
[% END %]
71
71
72
72
Lines 85-162 function Hide(link) Link Here
85
    <h2 align="center">Select your MARC flavor</h2>
85
    <h2 align="center">Select your MARC flavor</h2>
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>
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>
87
87
88
    <p>
89
    [% FOREACH flavourloo IN flavourloop %]
88
    [% FOREACH flavourloo IN flavourloop %]
90
    <div>
89
    <div>
91
            [% IF ( flavourloo.label == "Unimarc") %]
90
            [% IF ( flavourloo.label == "Unimarc") %]
92
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]                 <br/>
91
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]<br/>
93
            [% ELSE %]
92
            [% ELSE %]
94
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
93
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
95
            [% END %]
94
            [% END %]
96
    </div>
95
    </div>
97
    [% END %]
96
    [% END %]
98
97
99
   </p>
100
        <p>Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
98
        <p>Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
101
99
102
    </form>
100
    </form>
103
101
104
[% END %]
102
[% END %]
105
103
106
107
[% IF ( selectframeworks ) %]
104
[% IF ( selectframeworks ) %]
108
    <h2 align= "center"> [% setup %] setup</h2>
105
        <h2 align= "center"> [% setup %] setup</h2>
109
    <h2 align="center">Selecting Default Settings</h2>
106
        <h2 align="center">Selecting Default Settings</h2>
110
107
111
    <script type="text/javascript">
108
        [% IF setup == "Advanced" %]
112
        var linklabel = _("Select all options");
109
            <script type="text/javascript">
113
        document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
110
                var linklabel = _("Select all options");
114
    </script>
111
                document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
115
    <form name="frameworkselection" method="post" action="install.pl">
112
            </script>
116
    <input type="hidden" name="step" value="3" />
113
        [% END %]
117
    <input type="hidden" name="op" value="addframeworks" />
114
        <form name="frameworkselection" method="post" action="install.pl">
118
115
            <input type="hidden" name="step" value="3" />
116
            <input type="hidden" name="op" value="addframeworks" />
119
    [% IF ( frameworksloop ) %]
117
    [% IF ( frameworksloop ) %]
120
    <h2>MARC frameworks: [% marcflavour %]</h2>
118
        <h2>MARC frameworks: [% marcflavour %]</h2>
121
    [% IF ( en_marc_frameworks ) %]
119
        [% IF ( en_marc_frameworks ) %]
122
        <h4><span class="error">No MARC frameworks are available for your language.
120
            <h4><span class="error">No MARC frameworks are available for your language.
123
                Defaulting to the frameworks supplied for English (en)<span></h4>
121
                    Defaulting to the frameworks supplied for English (en)<span></h4>
124
    [% END %]
122
        [% END %]
125
    [% FOREACH frameworksloo IN frameworksloop %]
123
        [% FOREACH frameworksloo IN frameworksloop %]
126
    <div>
124
           <div>
127
    <h3>[% frameworksloo.label %]</h3>
125
           <h3>[% frameworksloo.label %]</h3>
128
    [% FOREACH framework IN frameworksloo.frameworks %]
126
           [% FOREACH framework IN frameworksloo.frameworks %]
129
        <table style="border:1px;vertical-align:top;">
127
                <table style="border:1px;vertical-align:top;">
130
        <tr>
128
                <tr>
131
         <td style = "border:1px; vertical-align:top;">
129
                    <td style = "border:1px; vertical-align:top;">
132
        [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
130
                        [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
133
        <input type="hidden" name="framework" value="[%     framework.fwkfile %]" id =="[%framework.fwkname%]" />
131
                            <input type="hidden" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
134
        [% ELSE %]
132
                        [% ELSE %]
135
             <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" />
133
                            <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
136
         [% END %]
134
                        [% END %]
137
      </td>
135
                    </td>
138
      <td>
136
                    <td>
139
      [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
137
                    [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
140
        <ul>
138
                        <ul>
141
            <label for="[% framework.fwkname %]">
139
                            <li>
142
               <li> [% framework.fwkdescription %]</li>
140
                                <label for="[% framework.fwkname %]">
143
                 <em>([% framework.fwkname %])</em>
141
                                    [% framework.fwkdescription %]
144
            </label>
142
                                    <em>([% framework.fwkname %])</em>
145
            </ul>
143
                                </label>
146
         </td>
144
                            </li>
147
        [% ELSE %]
145
                        </ul>
148
        <td>
146
                    </td>
149
            <label for= "[% framework.fwkname %]">
147
                    [% ELSE %]
150
                [% framework.fwkdescription %]
148
                    <td>
151
                <em>([% framework.fwkname %])</em>
149
                        <label for= "[% framework.fwkname %]">
152
            </label>
150
                            [% framework.fwkdescription %]
153
        </td>
151
                            <em>([% framework.fwkname %])</em>
152
                        </label>
153
                    </td>
154
                    [% END %]
155
                </tr>
156
                </table>
157
           [% END %]
158
           </div>
154
        [% END %]
159
        [% END %]
155
        </tr>
156
        </table>
157
    [% END %]
158
    </div>
159
    [% END %]
160
    <h2>Other data</h2>
160
    <h2>Other data</h2>
161
    [% END %]
161
    [% END %]
162
    [% IF ( en_sample_data ) %]
162
    [% IF ( en_sample_data ) %]
Lines 164-202 function Hide(link) Link Here
164
                Defaulting to the samples supplied for English (en)<span></h4>
164
                Defaulting to the samples supplied for English (en)<span></h4>
165
    [% END %]
165
    [% END %]
166
    [% FOREACH levelloo IN levelloop %]
166
    [% FOREACH levelloo IN levelloop %]
167
    <div>
167
        <div>
168
    <h3>[% levelloo.label %]</h3>
168
        <h3>[% levelloo.label %]</h3>
169
    [% FOREACH framework IN levelloo.frameworks %]
169
170
        <table style="border:1px;vertical-align:top;">
170
        [% IF (setup == "Basic" && levelloo.label == "Optional") %]
171
        <tr>
171
            <script type="text/javascript">
172
        <td style="vertical-align:top;">
172
                var linklabel = _("Select all options");
173
        [% IF (levelloo.label == "Default" ) && (setup=="Basic")%]
173
                document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
174
             <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
174
            </script>
175
        [% ELSE %]
176
             <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id=="[%framework.fwkname%]"/>
177
        [% END %]
175
        [% END %]
178
        </td>
176
179
        <td>
177
        [% FOREACH framework IN levelloo.frameworks %]
180
        [% IF (levelloo.label == "Default") && (setup=="Basic")%]
178
            <table style="border:1px;vertical-align:top;">
181
           <ul>
179
            <tr>
182
            <label for="[% framework.fwkname %]">
180
                <td style="vertical-align:top;">
183
               <li> [% framework.fwkdescription %]</li>
181
                [% IF (levelloo.label == "Default" ) && (setup=="Basic")%]
184
                <em>([% framework.fwkname %])</em>
182
                     <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
185
            </label>
183
                [% ELSE %]
186
            </ul>
184
                     <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]"/>
187
        </td>
185
                [% END %]
188
        [% ELSE %]
186
                </td>
189
        <td>
187
                <td>
190
            <label for= "[% framework.fwkname %]">
188
                [% IF (levelloo.label == "Default") && (setup=="Basic")%]
191
            [% framework.fwkdescription %]
189
                <ul>
192
            <em>([% framework.fwkname %])</em>
190
                    <li>
193
            </label>
191
                        <label for="[% framework.fwkname %]">
194
        </td>
192
                            [% framework.fwkdescription %]
193
                            <em>([% framework.fwkname %])</em>
194
                        </label>
195
                    </li>
196
                </ul>
197
                </td>
198
                [% ELSE %]
199
                <td>
200
                    <label for= "[% framework.fwkname %]">
201
                        [% framework.fwkdescription %]
202
                        <em>([% framework.fwkname %])</em>
203
                    </label>
204
                </td>
205
                [% END %]
206
            </tr>
207
            </table>
195
        [% END %]
208
        [% END %]
196
        </tr>
209
        </div>
197
        </table>
198
    [% END %]
199
    </div>
200
    [% END %]
210
    [% END %]
201
    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
211
    <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
202
    please be patient.</p>
212
    please be patient.</p>
Lines 217-227 function Hide(link) Link Here
217
    [% END %]
227
    [% END %]
218
    <h3>All done!</h3>
228
    <h3>All done!</h3>
219
    <p>Installation complete.<br />
229
    <p>Installation complete.<br />
220
        <p>Click on 'Set Koha version system preference' to complete and load the Koha onboarding tool.
230
        <p>Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool.
221
        <form name="finish">
231
        <form name="finish">
222
        <input type="hidden" name="step" value="3" />
232
        <input type="hidden" name="step" value="3" />
223
        <input type="hidden" name="op" value="finish" />
233
        <input type="hidden" name="op" value="finish" />
224
        <input type="submit" value="Set Koha version system preference"/>
234
        <input type="submit" value="Set up Koha with the onboarding tool"/>
225
        </form>
235
        </form>
226
        </p>
236
        </p>
227
    </p>
237
    </p>
Lines 255-261 function Hide(link) Link Here
255
    </form>
265
    </form>
256
[% END %]
266
[% END %]
257
267
258
259
[% IF ( default ) %]
268
[% IF ( default ) %]
260
    [% IF ( upgrading ) %]
269
    [% IF ( upgrading ) %]
261
        <p>
270
        <p>
Lines 272-279 function Hide(link) Link Here
272
    [% END %]
281
    [% END %]
273
[% END %]
282
[% END %]
274
283
275
276
277
[% IF ( updatestructure ) %]
284
[% IF ( updatestructure ) %]
278
  <div><h2 align="center">Updating database structure</h2>
285
  <div><h2 align="center">Updating database structure</h2>
279
  [% IF ( has_update_succeeds ) %]
286
  [% IF ( has_update_succeeds ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt (-18 lines)
Lines 1-18 Link Here
1
<!-- Includes for creating library-->
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
5
<head>
6
<title>Welcome &rsaquo; to  &rsaquo; Koha</title>
7
</head>
8
9
 <!--Header for the koha onboarding tool-->
10
<div>
11
      <h1 align="center"> Welcome to Koha</h1>
12
      <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
13
      <h2 align="center"> We're just going to set up a few more things...</h2>
14
      <form name="startkoha" method="post" action="onboarding.pl">
15
         <input type="hidden" name="step" value="1"/>
16
         <input type="submit" name="start" value="Start setting up my Koha"/>
17
      </form>
18
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt (-27 / +30 lines)
Lines 1-35 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" />
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'installer-doc-head-close.inc' %]
5
[% INCLUDE 'datatables.inc' %]
4
6
5
<head>
7
[% IF (libraries && libraries.count > 1) %]
6
<title>Welcome &rsaquo; to  &rsaquo; Koha</title>
8
    <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=2">
7
</head>
8
9
9
<!--Header for the koha onboarding tool-->
10
[% ELSIF (op == "add_validate_library") %]
10
<div>
11
    <head>
11
    <h1 align="center"> Welcome to Koha</h1>
12
        <title>Welcome &rsaquo; to  &rsaquo; Koha</title>
12
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
13
    </head>
13
</div>
14
 [% IF (libraries && libraries.count > 0) %]
15
 <br>
16
    <h3 align="left">You do not need to create a library as you have already installed the sample library data previously</h3>
17
    <form name="skiplibrary" method="post" action="onboarding.pl">
18
        <input type="hidden" name="step" value="2"/>
19
        <div>
20
            <input type="submit" name="start" value="Minimal patron category setup"/>
21
        </div>
22
    </form>
23
14
24
    <!--Create a library screen 2-->
15
    <!--Header for the koha onboarding tool-->
25
[% ELSIF (createlibrary) %]
16
    <div>
26
        <!--New Library created-->
17
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
18
    </div>
19
20
<!--New Library created-->
27
       [% IF message == "success_on_insert" %]
21
       [% IF message == "success_on_insert" %]
28
            <form name="createlibrary" method="post" action="onboarding.pl">
22
            <form name="createlibrary" method="post" action="onboarding.pl" >
29
                <input type="hidden" name="step" value="2"/>
23
                <input type="hidden" name="step" value="2"/>
30
                <h1 align="left"> New Library</h1>
24
                <h1 align="left"> New library</h1>
31
                <div>
25
                <div>
32
                    <p> Success: Library created!
26
                    <p> Success: library created!
33
                    </p>
27
                    </p>
34
                    <p> To add another library and for more settings, <br>
28
                    <p> To add another library and for more settings, <br>
35
                    go to:<br>
29
                    go to:<br>
Lines 53-64 Link Here
53
        [%END%]
47
        [%END%]
54
48
55
[% ELSE %]
49
[% ELSE %]
50
    <head>
51
        <title>Welcome &rsaquo; to  &rsaquo; Koha</title>
52
    </head>
53
54
    <!--Header for the koha onboarding tool-->
55
    <div>
56
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
57
    </div>
58
56
<!--Create a library screen 1-->
59
<!--Create a library screen 1-->
57
        <h2>Create a Library</h2>
58
        <form name="LibraryCreation" method="post" action="onboarding.pl">
60
        <form name="LibraryCreation" method="post" action="onboarding.pl">
59
            <fieldset class="rows">
61
            <fieldset class="rows" >
62
                 <h2>Create a library</h2>
60
                 <input type="hidden" name="step" value="1"/>
63
                 <input type="hidden" name="step" value="1"/>
61
                 <input type="hidden" name="createlibrary" value="createlibrary"/>
64
                 <input type="hidden" name="op" value="add_validate_library"/>
62
                 <ol>
65
                 <ol>
63
                     <li>
66
                     <li>
64
                        <label for="branchcode" class="required">Library code: </label>
67
                        <label for="branchcode" class="required">Library code: </label>
Lines 71-78 Link Here
71
                        <span class="required">Required</span>
74
                        <span class="required">Required</span>
72
                    </li>
75
                    </li>
73
                 </ol>
76
                 </ol>
74
             </fieldset>
75
             <br>
77
             <br>
76
             <input type="submit" class="action" value="Submit"/>
78
             <input type="submit" class="action" value="Submit"/>
79
            </fieldset>
77
     </form>
80
     </form>
78
[% END %]
81
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-21 / +21 lines)
Lines 267-296 $(document).ready(function() { Link Here
267
</script>
267
</script>
268
</head>
268
</head>
269
269
270
<div> <!-- Header that appears at the top of every screen in the koha onboarding tool-->
270
[% 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-->
271
    <h1 align="center"> Welcome to Koha</h1>
272
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
273
</div>
274
271
275
272
276
[% IF (categories && categories.count > 0) %] <!--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-->
273
     <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3">
277
<br>
278
     <h3 align="left">You do not need to create a patron category as you have already installed the sample patron categories data previously</h3>
279
     <form name="skippatroncategory" method="post" action="onboarding.pl">
280
          <input type="hidden" name="step" value="3"/>
281
          <div>
282
            <input type="submit" name="start" value="Add a patron"/>
283
          </div>
284
     </form>
285
274
275
[% ELSIF (op == "add_validate_category") %]
286
<!--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-->
276
<!--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-->
287
[% ELSIF createcat %]
277
278
    <div> <!-- Header that appears at the top of every screen in the koha onboarding tool-->
279
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
280
    </div>
281
288
    [% IF message != "error_on_insert" %]
282
    [% IF message != "error_on_insert" %]
289
     <form name="createcat" method="post" action="onboarding.pl">
283
     <form name="createcat" method="post" action="onboarding.pl">
290
            <input type="hidden" name="step" value="3"/>
284
            <input type="hidden" name="step" value="3"/>
291
             <h1 align="left">  New patron category</h1>
285
             <h1 align="left">  New patron category</h1>
292
             <div>
286
             <div>
293
                 <p> Success: Patron category created! </p>
287
                 <p> Success: patron category created! </p>
294
                 <p> To add another patron category and for more settings<br>
288
                 <p> To add another patron category and for more settings<br>
295
                 go to:<br>
289
                 go to:<br>
296
                 More -> Administration -> Patron categories<br>
290
                 More -> Administration -> Patron categories<br>
Lines 303-309 $(document).ready(function() { Link Here
303
        Message is [% message %]
297
        Message is [% message %]
304
        <input type="hidden" name="step" value="2"/>
298
        <input type="hidden" name="step" value="2"/>
305
            <h1 align="left">Failed</h1>
299
            <h1 align="left">Failed</h1>
306
            <div>Patron Category was not successfully created.</br>
300
            <div>Patron category was not successfully created.</br>
307
            Please try again or contact your system administrator.</p>
301
            Please try again or contact your system administrator.</p>
308
            </div>
302
            </div>
309
            <input type="submit" value="Try again"/>
303
            <input type="submit" value="Try again"/>
Lines 312-322 $(document).ready(function() { Link Here
312
306
313
307
314
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category-->
308
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category-->
315
    <h1 align="left"> Create a new Patron Category</h1>
309
    <div> <!-- Header that appears at the top of every screen in the koha onboarding tool-->
310
        <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
311
    </div>
312
313
    <h1 align="left"> Create a new patron category</h1>
314
    <p> The patron category you create in this form is going to be the one which the new administrator patron account will have.</p>
316
       <form id="category_form" method="post" action="onboarding.pl">
315
       <form id="category_form" method="post" action="onboarding.pl">
317
       <fieldset class="rows">
316
       <fieldset class="rows">
318
            <input type="hidden" name="step" value="2"/>
317
            <input type="hidden" name="step" value="2"/>
319
            <input type="hidden" name="createcat" value="createcat" />
318
            <input type="hidden" name="op" value="add_validate_category" />
320
                <ol>
319
                <ol>
321
                    <li>
320
                    <li>
322
                        <label for="categorycode" class="required">Category code: </label>
321
                        <label for="categorycode" class="required">Category code: </label>
Lines 361-367 $(document).ready(function() { Link Here
361
                            [% SET default_privacy = 'default' %]
360
                            [% SET default_privacy = 'default' %]
362
361
363
                            [% IF category %]
362
                            [% IF category %]
364
                            [% SET default_privacy = category.default_privacy %]
363
                               [% SET default_privacy = category.default_privacy %]
365
                            [% END %]
364
                            [% END %]
366
365
367
                            [% SWITCH default_privacy %]
366
                            [% SWITCH default_privacy %]
Lines 381-387 $(document).ready(function() { Link Here
381
                        </select>
380
                        </select>
382
                        <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>
381
                        <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>
383
                    </li>
382
                    </li>
384
383
            </ol>
385
            <span class="label">Enrolment period: </span>
384
            <span class="label">Enrolment period: </span>
386
            </br>
385
            </br>
387
                    <fieldset>
386
                    <fieldset>
Lines 389-395 $(document).ready(function() { Link Here
389
                            <ol>
388
                            <ol>
390
                                <li>
389
                                <li>
391
                                    <label for="enrolmentperiod" style="width:6em;">In months: </label>
390
                                    <label for="enrolmentperiod" style="width:6em;">In months: </label>
392
                                    <input type="number" min="0" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
391
                                    <input type="number" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
393
                                </li>
392
                                </li>
394
                                <li>
393
                                <li>
395
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
394
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
Lines 399-404 $(document).ready(function() { Link Here
399
                     </fieldset>
398
                     </fieldset>
400
                    <br>
399
                    <br>
401
                    <input type="submit" class="action" value="Submit" />
400
                    <input type="submit" class="action" value="Submit" />
401
    </fieldset>
402
    </form>
402
    </form>
403
[% END %]
403
[% END %]
404
404
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-21 / +66 lines)
Lines 9-18 Link Here
9
[% INCLUDE 'datatables.inc' %]
9
[% INCLUDE 'datatables.inc' %]
10
10
11
<head>
11
<head>
12
<title>Create Patron</title>
12
<title>Create Koha administrator patron</title>
13
13
14
<!--jQuery scripts for creating patron-->
14
<!--jQuery scripts for creating patron-->
15
<script type-"text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
15
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
16
16
17
<script type="text/javascript">
17
<script type="text/javascript">
18
 var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field."));
18
 var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field."));
Lines 34-39 jQuery.validator.addMethod( "password_match", function(value,element){ Link Here
34
    },  MSG_PASSWORD_MISMATCH
34
    },  MSG_PASSWORD_MISMATCH
35
);
35
);
36
36
37
jQuery.validator.addMethod( "letters_only", function(value,element){
38
         var patt =/^[a-zA-Z ]+$/g;
39
         if (patt.test(element.value)){
40
             return true;
41
         } else {
42
             return false;
43
         }
44
     }, MSG_DESCRIPTION_LETTERS_ONLY
45
);
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_CARDNUMBER_LETTERS_NUMBERS_ONLY
56
);
57
58
37
59
38
60
39
$(document).ready(function(){
61
$(document).ready(function(){
Lines 41-54 $(document).ready(function(){ Link Here
41
    $("#Submit").click(function(){
63
    $("#Submit").click(function(){
42
        $("#createpatron").validate({
64
        $("#createpatron").validate({
43
         rules: {
65
         rules: {
44
            password: {
66
            surname: {
67
                required: true,
68
                letters_only: true
69
            },
70
            firstname: {
71
                required: true,
72
                letters_only: true
73
            },
74
            cardnumber: {
75
                required: true,
76
                cardnumber_check: true
77
            },
78
           password: {
45
                 password_match:true
79
                 password_match:true
46
            }
80
            }
47
         },
81
         },
48
         messages: {
82
         messages: {
49
             password: {
83
            surname: {
84
                required: MSG_DESCRIPTION_LETTERS_ONLY
85
            },
86
            firstname: {
87
                required: MSG_DESCRIPTION_LETTERS_ONLY
88
            },
89
            cardnumber: {
90
                required: MSG_CARDNUMBER_LETTERS_NUMBERS_ONLY
91
            },
92
            password: {
50
                 required: MSG_PASSWORD_MISMATCH
93
                 required: MSG_PASSWORD_MISMATCH
51
             },
94
            },
52
         }
95
         }
53
96
54
     });
97
     });
Lines 58-65 $(document).ready(function(){ Link Here
58
</head>
101
</head>
59
102
60
<div>
103
<div>
61
    <h1 align="center"> Welcome to Koha</h1>
104
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
62
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
63
</div>
105
</div>
64
106
65
107
Lines 97-105 $(document).ready(function(){ Link Here
97
          <!--New patron created-->
139
          <!--New patron created-->
98
        <form name="patrondone" method="post" action="onboarding.pl">
140
        <form name="patrondone" method="post" action="onboarding.pl">
99
            <input type="hidden" name="step" value="4"/>
141
            <input type="hidden" name="step" value="4"/>
100
            <h1 align="left"> New Patron </h1>
142
            <h1 align="left"> Koha administrator patron </h1>
101
            <div>
143
            <div>
102
                 <p> Success: New patron created!</p>
144
                 <p> Success: administrator patron created!</p>
103
                 <p> To create another patron, go to Patrons -> New Patron. <br>
145
                 <p> To create another patron, go to Patrons -> New Patron. <br>
104
                More -> Set Permissions in a user page to gain superlibrarian permissions.
146
                More -> Set Permissions in a user page to gain superlibrarian permissions.
105
            </div>
147
            </div>
Lines 108-115 $(document).ready(function(){ Link Here
108
        </form>
150
        </form>
109
[% ELSE %]
151
[% ELSE %]
110
<!--Create a patron screen 1-->
152
<!--Create a patron screen 1-->
111
       <h1 align="left"> Create a new Patron</h1>
153
       <h1 align="left"> Create koha administrator patron</h1>
112
       <legend id="library_management_lgd">Library Management</legend>
113
        <p>
154
        <p>
114
        Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions.
155
        Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions.
115
        </p>
156
        </p>
Lines 117-133 $(document).ready(function(){ Link Here
117
            <fieldset class="rows">
158
            <fieldset class="rows">
118
                 <input type="hidden" name="step" value="3"/>
159
                 <input type="hidden" name="step" value="3"/>
119
                 <input type="hidden" name="op" value="add_validate" />
160
                 <input type="hidden" name="op" value="add_validate" />
120
                    <legend id="library_management_lgd">Library Management</legend>
161
                    <legend id="library_management_lgd">Library management</legend>
121
                    <ol>
162
                    <ol>
122
                    <h3>Patron Identity</h3>
163
                    <h3>Patron identity</h3>
123
                        <li>
164
                        <li>
124
                            <label for="surname" class="required">Surname: </label>
165
                            <label for="surname" class="required">Surname: </label>
125
126
                            <input type="text"  pattern="[a-zA-Z- ]+" title="Please only enter letters in the surname field" id="surname" name="surname"  value="[% surname %]" class="required" required="required" />
166
                            <input type="text"  pattern="[a-zA-Z- ]+" title="Please only enter letters in the surname field" id="surname" name="surname"  value="[% surname %]" class="required" required="required" />
127
                            <span class="required">Required</span>
167
                            <span class="required">Required</span>
128
                        </li>
168
                        </li>
129
                        <li>
169
                        <li>
130
                            <label for="firstname" class="required">First Name: </label>
170
                            <label for="firstname" class="required">First name: </label>
131
                            <input  type="text"  pattern="[a-zA-Z ]+" title="Please only enter letters in the firstname field" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
171
                            <input  type="text"  pattern="[a-zA-Z ]+" title="Please only enter letters in the firstname field" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
132
                            <span class="required">Required</span>
172
                            <span class="required">Required</span>
133
                        </li>
173
                        </li>
Lines 135-146 $(document).ready(function(){ Link Here
135
175
136
                    <ol>
176
                    <ol>
137
                        <li>
177
                        <li>
138
                            <label for="cardnumber" class="required">Card Number: </label>
178
                            <label for="cardnumber" class="required">Card number: </label>
139
                            <input type="number" min="[% newcardnumber %]" pattern="[1-9]+" title="Please only enter numbers into the card number field" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" maxlength="[%maxlength_cardnumber%]" minlength="[%minlength_cardnumber%]" value="[% newcardnumber %]" class="required" required="required">
179
                            [% IF patrons && patrons > 1 %]
180
                            <input type="text" pattern="[A-Za-z1-9 ]+" title="Please only enter letters and numbers into the card number field" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber %]" class="required" required="required">
181
                            [% ELSE %]
182
                            <input type="text" pattern="[A-Za-z1-9 ]+" title="Please only enter letters and numbers into the card number field"id="cardnumber" name="cardnumber" value="[% cardnumber %]" class="required" required="required">
183
                            [% END %]
140
                            <span class="required">Required</span>
184
                            <span class="required">Required</span>
141
                        </li>
185
                        </li>
142
                        <li>
186
                        <li>
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-->
187
188
                        <!--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>
189
                            <label for="libraries" class="required"> Library: </label>
145
                            <select name="libraries" size="1" id="libraries">
190
                            <select name="libraries" size="1" id="libraries">
146
191
Lines 152-170 $(document).ready(function(){ Link Here
152
                            <span class="required"> Required</span>
197
                            <span class="required"> Required</span>
153
                        </li>
198
                        </li>
154
                        <li>
199
                        <li>
155
                            <label for="categorycode_entry" class="required"> Patron Category</label>
200
                            <label for="categorycode_entry" class="required"> Patron category</label>
156
                            <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
201
                            <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
157
                            [% FOREACH category IN categories %]
202
                            [% FOREACH category IN categories %]
158
                                <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option>
203
                                <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option>
159
                            [% END %]
204
                            [% END %]
160
                            </select>
205
                            </select>
161
                            <span class="required">Required</span><br><br>
206
                            <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.
207
                            <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
163
                        </li>
208
                        </li>
164
                    </ol>
209
                    </ol>
165
210
166
                    <ol>
211
                    <ol>
167
                            <h3> Patron permissions</h3>
212
                            <h3> Koha administrator patron permissions</h3>
168
                            <input type="hidden" name="newflags" value="1"/>
213
                            <input type="hidden" name="newflags" value="1"/>
169
                            <li>
214
                            <li>
170
                                <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/>
215
                                <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-57 / +43 lines)
Lines 1-82 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
3
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%]
4
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
4
[% INCLUDE 'installer-doc-head-close.inc' %]
6
7
<head>
5
<head>
8
<title>Create item type</title>
6
    <title>Create item type</title>
9
10
<!--jQuery scripts for creating item type-->
11
12
13
14
</head>
7
</head>
15
16
<div>
8
<div>
17
    <h1 align="center"> Welcome to Koha</h1>
9
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
18
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
19
</div>
10
</div>
20
11
21
[% IF (itemtypes && itemtypes.count > 0) %]
12
[% IF (itemtypes && itemtypes.count >1) %]
22
    <br>
23
        <h3 align="left">You do not need to create a item type as you have already installed the sample item type data previously</h3>
24
     <form name="skipitemtype" method="post" action="onboarding.pl">
25
          <input type="hidden" name="step" value="5"/>
26
          <div>
27
            <input type="submit" name="start" value="Add a circulation rule"/>
28
          </div>
29
      </form>
30
13
14
     <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=5">
31
15
32
<!--Create a item type screen 2-->
33
[% ELSIF op == "add_validate" %]
16
[% ELSIF op == "add_validate" %]
34
        <!--New item type created-->
35
        [% IF message != "error_on_insert" %]
17
        [% IF message != "error_on_insert" %]
36
            <form name="createitemtype" method="post" action="onboarding.pl">
18
            <form name="createitemtype" method="post" action="onboarding.pl">
37
                <input type="hidden" name="step" value="5"/>
19
                <input type="hidden" name="step" value="5"/>
38
                <h1 align="left"> New Item type </h1>
20
                <h1 align="left"> New Item type </h1>
39
40
                <div>
21
                <div>
41
                    <p> Success: New item type created!</p>
22
                    <p> Success: New item type created!</p>
42
                    <p> To create another item type later and for more setttings <br>
23
                    <p> To create another item type later and for more settings <br>
43
                    go to: <br>
24
                    go to: <br>
44
                    More -> Administration -> Item types <br>
25
                    More -> Administration -> Item types <br>
45
                </div>
26
                </div>
46
                     Next up:
27
                Next up:
47
                    <input type="submit" value="Add a circulation rule"/>
28
                <input type="submit" value="Add a circulation rule"/>
48
            </form>
29
            </form>
49
        [% ELSE %]
30
        [% ELSE %]
50
            <form name="retryitem" method="post" action="onboarding.pl">
31
        <form name="retryitem" method="post" action="onboarding.pl">
51
                <input type="hidden" name="step" value="4"/>
32
            <input type="hidden" name="step" value="4"/>
52
                <h1 align="left">Failed </h1>
33
            <h1 align="left">Failed </h1>
53
                <div>
34
            <div>
54
                    <p>Item type was not successfully created. </br>
35
                <p>Item type was not successfully created. </br>
55
                    Please try again or contact your system administrator. </p>
36
                Please try again or contact your system administrator.
56
                    </div>
37
                </p>
57
            </form>
38
            </div>
58
          <!--Implement a if statement to check if the item type was successfully created or not
39
        </form>
59
-->     [% END %]
40
        <!--Implement a if statement to check if the item type was successfully created or not -->
41
        [% END %]
60
[% ELSE %]
42
[% ELSE %]
61
<!--Create a item type screen 1-->
43
    <!--Create a item type screen 1-->
62
       <h1 align="left"> Create a new Item type </h2>
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>
63
        <form name="createitemform" method="post" action="onboarding.pl">
46
        <form name="createitemform" method="post" action="onboarding.pl">
64
            <fieldset class="rows">
47
            <fieldset class="rows">
65
                 <input type="hidden" name="step" value="4"/>
48
                <input type="hidden" name="step" value="4"/>
66
                 <input type="hidden" name="op" value="add_validate" />
49
                <input type="hidden" name="op" value="add_validate" />
67
                    <ol>
50
                <ol>
68
                        <li>
51
                    <li>
69
                            <label for="itemtype" class="required">Item type code: </label>
52
                        <label for="itemtype" class="required">Item type code: </label>
70
                            <input type="text" name="itemtype" pattern="^[A-Za-z]{0,10}$" title="Please enter either 2 or 3 capital letters as the item type" id="itemtype" size="10" maxlength="10"  class="required" required="required" />
53
                        <input type="text" name="itemtype" pattern="^[A-Za-z]{0,10}$" title="Please enter either 2 or 3 capital letters as the item type" id="itemtype" size="10" maxlength="10"  class="required" required="required" />
71
                            <span class="required">Required</span>
54
                        <span class="required">Required</span>
72
                        </li>
55
                    </li>
73
                        <li>
56
74
                            <label for="description" class="required">Description: </label>
57
                    <li>
75
                            <input type="text" name="description" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this item type description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required">
58
                        <label for="description" class="required">Description: </label>
76
                            <span class="required">Required</span>
59
                        <input type="text" name="description" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this item type description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required">
77
                        </li>
60
                        <span class="required">Required</span>
78
                    </ol>
61
                    </li>
79
            </fieldset><br>
62
                </ol>
80
                <input type="submit" class="action" value="Submit"/>
63
            <br>
81
     </form>
64
            <input type="submit" class="action" value="Submit"/>
65
        </fieldset>
66
        </form>
82
[% END %]
67
[% END %]
68
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-26 / +27 lines)
Lines 3-12 Link Here
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
5
6
</head>
7
<div>
6
<div>
8
    <h1 align="center"> Welcome to Koha</h1>
7
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
9
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
10
</div>
8
</div>
11
9
12
[% IF (finish) %]
10
[% IF (finish) %]
Lines 20-28 Link Here
20
        <!--New circulation rule created-->
18
        <!--New circulation rule created-->
21
        <form name="finish" method="post" action="onboarding.pl">
19
        <form name="finish" method="post" action="onboarding.pl">
22
            <input type="hidden" name="op" value="finish" />
20
            <input type="hidden" name="op" value="finish" />
23
            <h1 align="left"> New Circulation rule </h1>
21
            <h1 align="left"> New circulation rule </h1>
24
            <div>
22
            <div>
25
                 <p> Success: New circulation rule created!</p>
23
                 <p> Success: circulation rule created!</p>
26
                 <p> To create circulation rule, go to <br>
24
                 <p> To create circulation rule, go to <br>
27
                 More -> Administration -> Circulation and Fine Rules
25
                 More -> Administration -> Circulation and Fine Rules
28
            </div>
26
            </div>
Lines 31-37 Link Here
31
        </form>
29
        </form>
32
[% ELSE %]
30
[% ELSE %]
33
<!--Create a circulation rule screen 1-->
31
<!--Create a circulation rule screen 1-->
34
       <h1 align="left"> Create a new Circulation rule </h1>
32
       <h1 align="left"> Create a new circulation rule </h1>
35
       <form name="createcirculationrule" method="post" action="onboarding.pl">
33
       <form name="createcirculationrule" method="post" action="onboarding.pl">
36
            <fieldset class="rows">
34
            <fieldset class="rows">
37
                 <input type="hidden" name="step" value="5"/>
35
                 <input type="hidden" name="step" value="5"/>
Lines 39-68 Link Here
39
                    <ol>
37
                    <ol>
40
                    <li>
38
                    <li>
41
                        <label for="branch" class="required"> Library branch</label>
39
                        <label for="branch" class="required"> Library branch</label>
42
                        <select name="branch" id="branch" required="required">
40
                        <select name="branch" id="branchname" required="required">
43
                        <option value="*">All</option>
41
                        <option value""> Choose</option>
42
                        <option value="*" selected="selected">All</option>
44
                        [% FOREACH library IN libraries %]
43
                        [% FOREACH library IN libraries %]
45
                            <option name="branch" value="[% library.branchcode %]"> [% library.branchname %]</option>
44
                            <option id="branch" value="[% library.branchcode %]"> [% library.branchname %]</option>
46
                        [% END %]
45
                        [% END %]
47
                        </select>
46
                        </select>
48
                        <span class="required">Required</span>
47
                        <span class="required">Required</span>
49
                    </li>
48
                    </li>
50
                    <li>
49
                    <li>
51
                        <label for="categorycode" class="required">Patron Category: </label>
50
                        <label for="categorycode" class="required">Patron category: </label>
52
                        <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);">
51
                        <select name="categorycode" id="categorycodeselection" required="required" onchange = "update_categorycode(this);">
53
                               <!-- <option name="categorycode" value="All">All-->
52
                            <option value=""> Choose</option>
54
                               <option value="*">All</option>
53
                            <option value="*" selected="selected">All</option>
55
                             [% FOREACH category IN categories %]
54
                            [% FOREACH category IN categories %]
56
                                <option name="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option>
55
                                <option id="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option>
57
                             [%END%]
56
                            [%END%]
58
                             </select>
57
                        </select>
59
                        <span class="required">Required</span>
58
                        <span class="required">Required</span>
60
                    </li>
59
                    </li>
61
60
62
                    <li>
61
                    <li>
63
                        <label for="itemtype"> Item type: </label>
62
                        <label for="itemtype"> Item type: </label>
64
                        <select id="itemtype" name="itemtype" required="required">
63
                        <select id="itemtype" name="itemtype" required="required">
65
                            <option value="*">All</option>
64
                        <option value""> Choose </option>
65
                        <option value="*" selected="selected">All</option>
66
                            [% FOREACH item IN itemtypes %]
66
                            [% FOREACH item IN itemtypes %]
67
                                <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %]
67
                                <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %]
68
                            [%END%]
68
                            [%END%]
Lines 71-88 Link Here
71
                    </li>
71
                    </li>
72
                    <li>
72
                    <li>
73
                        <label for="maxissueqty" class="required">Current checkouts allowed: </label>
73
                        <label for="maxissueqty" class="required">Current checkouts allowed: </label>
74
                        <input type="number" min="0" name="maxissueqty" pattern="[1-9]+" title="Please only enter numbers" id="maxissueqty" size="10" maxlength="10" value="" class="required" required="required" />
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>
75
                        <span class="required">Required</span>
76
                    </li>
76
                    </li>
77
77
78
                    <li>
78
                    <li>
79
                        <label for="issuelength" class="required">Loan Period: </label>
79
                        <label for="issuelength" class="required">Loan period: </label>
80
                        <input type="number" min="0" name="issuelength" pattern="[1-9]+" title="Please only enter numbers" id="issuelength" size="10" maxlength="10" value="" class="required" required="required" />
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>
81
                        <span class="required">Required</span>
82
                   </li>
82
                   </li>
83
                   <li>
83
                   <li>
84
                        <label for="lengthunit">Units: </label>
84
                        <label for="lengthunit">Units: </label>
85
                        <select name="lengthunit" id="lengthunit" required="required">
85
                        <select name="lengthunit" id="lengthunit" required="required">
86
                        <option value=""> Choose </option>
86
                        [% SET units = 'days' %]
87
                        [% SET units = 'days' %]
87
                        [% IF category %]
88
                        [% IF category %]
88
                            [% SET default_privacy = category.default_privacy %]
89
                            [% SET default_privacy = category.default_privacy %]
Lines 99-118 Link Here
99
                        </select>
100
                        </select>
100
                     </li>
101
                     </li>
101
                     <li>
102
                     <li>
102
                        <label for="renewalsallowed" class="required">Renewals Allowed: </label>
103
                        <label for="renewalsallowed" class="required">Renewals allowed: </label>
103
                        <input type="number"min="0" name="renewalsallowed" pattern="[1-9]+" title="Please only enter numbers" id="renewalsallowed" size="10" maxlength="10" value="" class="required" required="required" />
104
                        <input type="number" min="0" name="renewalsallowed" title="Please only enter numbers" id="renewalsallowed" size="10" max="10" value="" class="required" required="required" />
104
                        <span class="required">Required</span>
105
                        <span class="required">Required</span>
105
                     </li>
106
                     </li>
106
107
107
                     <li>
108
                     <li>
108
                        <label for="renewalperiod" class="required">Renewals Period: </label>
109
                        <label for="renewalperiod" class="required">Renewals period: </label>
109
                        <input type="number" min="0"name="renewalperiod" pattern="[1-9]+" title="Please only enter numbers" id="renewalperiod" size="10" maxlength="10" value="" class="required" required="required" />
110
                        <input type="number" min="0" name="renewalperiod" title="Please only enter numbers" id="renewalperiod" size="10" max="10" value="" class="required" required="required" />
110
                        <span class="required">Required</span>
111
                        <span class="required">Required</span>
111
                     </li>
112
                     </li>
112
113
113
                     <li>
114
                     <li>
114
                        <label for="onshelfholds">On shelf holds allowed: </label>
115
                        <label for="onshelfholds">On shelf holds allowed: </label>
115
                        <select name="onshelfholds" id="onshelfholds" required="required">
116
                        <select name="onshelfholds" id="onshelfholds" required="required">
117
                              <option value="">Choose</option>
116
                              <option value="yes" selected="selected">Yes</option>
118
                              <option value="yes" selected="selected">Yes</option>
117
                              <option value="anyunavailable">If any unavailable</option>
119
                              <option value="anyunavailable">If any unavailable</option>
118
                              <option value="allunavailable">If all unavailable</option>
120
                              <option value="allunavailable">If all unavailable</option>
119
- 

Return to bug 17855