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

(-)a/C4/Members.pm (-1 / +1 lines)
Lines 498-504 sub AddMember { Link Here
498
    }
498
    }
499
499
500
    my $patron_category = $schema->resultset('Category')->find( $data{'categorycode'} );
500
    my $patron_category = $schema->resultset('Category')->find( $data{'categorycode'} );
501
    $data{'privacy'} =
501
    $data{'privacy'} = 
502
        $patron_category->default_privacy() eq 'default' ? 1
502
        $patron_category->default_privacy() eq 'default' ? 1
503
      : $patron_category->default_privacy() eq 'never'   ? 2
503
      : $patron_category->default_privacy() eq 'never'   ? 2
504
      : $patron_category->default_privacy() eq 'forever' ? 0
504
      : $patron_category->default_privacy() eq 'forever' ? 0
(-)a/installer/onboarding.pl (-51 / +45 lines)
Lines 184-190 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
184
        debug           => 1,
184
        debug           => 1,
185
    }
185
    }
186
    );
186
    );
187
    
188
187
189
    #Once the user submits the page, this code validates the input and adds it
188
    #Once the user submits the page, this code validates the input and adds it
190
    #to the database as a new patron category 
189
    #to the database as a new patron category 
Lines 233-239 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
233
232
234
#Create a patron
233
#Create a patron
235
}elsif ( $step && $step == 3 ){
234
}elsif ( $step && $step == 3 ){
236
237
    my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
235
    my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
238
    $template->param(libraries   => $libraries,
236
    $template->param(libraries   => $libraries,
239
              group_types => [
237
              group_types => [
Lines 252-262 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
252
            categories => $categories,
250
            categories => $categories,
253
    );
251
    );
254
252
255
256
    my $input = new CGI;
253
    my $input = new CGI;
257
    my $op = $input->param('op') // 'list';
254
    my $op = $input->param('op') // 'list';
258
255
259
    my @messages; 
256
    my @messages;
257
    my @errors;
260
258
261
    my ($template, $loggedinuser, $cookie)= get_template_and_user({
259
    my ($template, $loggedinuser, $cookie)= get_template_and_user({
262
                template_name => "/onboarding/onboardingstep3.tt",
260
                template_name => "/onboarding/onboardingstep3.tt",
Lines 267-282 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
267
                debug => 1,
265
                debug => 1,
268
    });
266
    });
269
267
270
    if($op eq 'add_form'){
268
    if($op eq 'add_validate'){
271
        my $member;
269
        my %newdata;
272
        $template->param(
273
            member => $member,
274
        );
275
    }
276
277
    elsif($op eq 'add_validate'){
278
279
         my %newdata;
280
270
281
#Store the template form values in the newdata hash
271
#Store the template form values in the newdata hash
282
         $newdata{borrowernumber} = $input->param('borrowernumber');
272
         $newdata{borrowernumber} = $input->param('borrowernumber');
Lines 289-302 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
289
         $newdata{password} = $input->param('password');
279
         $newdata{password} = $input->param('password');
290
         $newdata{password2} = $input->param('password2');
280
         $newdata{password2} = $input->param('password2');
291
         $newdata{dateexpiry} = '12/10/2016';
281
         $newdata{dateexpiry} = '12/10/2016';
282
         $newdata{privacy} = "default";
283
284
        if(my $error_code = checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){
285
            push @errors, $error_code == 1
286
                ? 'ERROR_cardnumber_already_exists'
287
                :$error_code == 2 
288
                    ? 'ERROR_cardnumber_length'
289
                    :()
290
        }
291
292
292
293
293
#Hand the newdata hash to the AddMember subroutine in the C4::Members module and it creates a patron and hands back a borrowernumber which is being stored
294
#Hand the newdata hash to the AddMember subroutine in the C4::Members module and it creates a patron and hands back a borrowernumber which is being stored
294
        my $borrowernumber = &AddMember(%newdata);
295
        my $borrowernumber = &AddMember(%newdata);
296
297
#Create a hash named member2 and fillit with the borrowernumber of the borrower that has just been created 
295
        my %member2;
298
        my %member2;
296
        $member2{'borrowernumber'}=$borrowernumber;
299
        $member2{'borrowernumber'}=$borrowernumber;
297
300
298
        my $flag = $input->param('flag');
301
        my $flag = $input->param('flag');
299
300
        if ($input->param('newflags')) {
302
        if ($input->param('newflags')) {
301
             my $dbh=C4::Context->dbh();
303
             my $dbh=C4::Context->dbh();
302
             my @perms = $input->multi_param('flag');
304
             my @perms = $input->multi_param('flag');
Lines 312-338 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
312
             }
314
             }
313
315
314
316
315
        # construct flags
317
             # construct flags
316
          my $module_flags = 0;
318
             my $module_flags = 0;
317
          my $sth=$dbh->prepare("SELECT bit,flag FROM userflags ORDER BY bit");
319
             my $sth=$dbh->prepare("SELECT bit,flag FROM userflags ORDER BY bit");
318
          $sth->execute(); 
320
             $sth->execute(); 
319
          while (my ($bit, $flag) = $sth->fetchrow_array) {
321
             while (my ($bit, $flag) = $sth->fetchrow_array) {
320
              if (exists $all_module_perms{$flag}) {
322
                 if (exists $all_module_perms{$flag}) {
321
                   $module_flags += 2**$bit;
323
                       $module_flags += 2**$bit;
322
              }
324
                 }
323
          }
325
             }
324
326
325
           $sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?");
327
             $sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?");
326
           $sth->execute($module_flags, $borrowernumber);
328
             $sth->execute($module_flags, $borrowernumber);
327
329
328
330
329
#Error handling checking if the patron was created successfully
331
            #Error handling checking if the patron was created successfully
330
        if(!$borrowernumber){
332
             if(!$borrowernumber){
331
            push @messages, {type=> 'error', code => 'error_on_insert'};
333
                push @messages, {type=> 'error', code => 'error_on_insert'};
332
         }else{
334
             }else{
333
            push @messages, {type=> 'message', code => 'success_on_insert'};
335
                push @messages, {type=> 'message', code => 'success_on_insert'};
334
         }
336
             }
335
    }
337
        }
338
  }
336
}elsif ( $step && $step == 4){
339
}elsif ( $step && $step == 4){
337
    my $createitemtype = $input->param('createitemtype');
340
    my $createitemtype = $input->param('createitemtype');
338
    $template->param('createitemtype'=> $createitemtype );
341
    $template->param('createitemtype'=> $createitemtype );
Lines 360-373 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
360
        my $description = $input->param('description');
363
        my $description = $input->param('description');
361
364
362
        #store the input from the form - only 2 fields 
365
        #store the input from the form - only 2 fields 
363
        my $itemtype= Koha::ItemType->new(
366
        my $thisitemtype= Koha::ItemType->new(
364
            { itemtype    => $itemtype_code,
367
            { itemtype    => $itemtype_code,
365
              description => $description,
368
              description => $description,
366
            }
369
            }
367
        );
370
        );
368
        eval{ $itemtype->store; };
371
        eval{ $thisitemtype->store; };
369
        #Error messages
372
        #Error messages
370
        if($itemtype){
373
        if($thisitemtype){
371
            $message = 'success_on_insert';
374
            $message = 'success_on_insert';
372
        }else{
375
        }else{
373
            $message = 'error_on_insert';
376
            $message = 'error_on_insert';
Lines 375-382 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
375
378
376
        $template->param('message' => $message); 
379
        $template->param('message' => $message); 
377
    }
380
    }
378
379
}elsif ( $step && $step == 5){
381
}elsif ( $step && $step == 5){
382
    my $test="a";
383
    warn $test;
384
380
    #Fetching all the existing categories to display in a drop down box
385
    #Fetching all the existing categories to display in a drop down box
381
    my $categories;
386
    my $categories;
382
    $categories= Koha::Patron::Categories->search();
387
    $categories= Koha::Patron::Categories->search();
Lines 403-416 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
403
    my $type = $input->param('type');
408
    my $type = $input->param('type');
404
    my $branch = $input->param('branch');
409
    my $branch = $input->param('branch');
405
410
406
411
    if($op eq 'add_validate'){
407
408
    if($op eq 'add_form'){
409
410
411
412
    }
413
    elsif($op eq 'add_validate'){
414
        my $bor = $input->param('categorycode');
412
        my $bor = $input->param('categorycode');
415
        my $itemtype = $input->param('itemtype');
413
        my $itemtype = $input->param('itemtype');
416
        my $maxissueqty = $input->param('maxissueqty');
414
        my $maxissueqty = $input->param('maxissueqty');
Lines 435-448 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
435
            $issuingrule->set($params)->store();
433
            $issuingrule->set($params)->store();
436
        }else{
434
        }else{
437
            Koha::IssuingRule->new()->set($params)->store(); 
435
            Koha::IssuingRule->new()->set($params)->store(); 
438
            }
436
        }
439
    }
437
    }
438
 }
440
439
441
    my $createcirculationrule = $query->param('createcirculationrule');
442
    $template->param('createcirculationrule'=>$createcirculationrule);
443
}
444
445
}
446
440
447
output_html_with_http_headers $input, $cookie, $template->output;
441
output_html_with_http_headers $input, $cookie, $template->output;
448
442
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +1 lines)
Lines 6-12 var debug = "[% debug %]"; Link Here
6
var dformat  = "[% dateformat %]";
6
var dformat  = "[% dateformat %]";
7
var sentmsg = 0;
7
var sentmsg = 0;
8
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
8
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
9
var MSG_PLEASE_ENTER_A_VALID_DATE = _("Please enter a valid date (should match %s).");
9
var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s)."));
10
10
11
function is_valid_date(date) {
11
function is_valid_date(date) {
12
    // An empty string is considered as a valid date for convenient reasons.
12
    // An empty string is considered as a valid date for convenient reasons.
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc (+15 lines)
Lines 1-5 Link Here
1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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" />
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" />
6
<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print.css" />
3
<style type="text/css" media="screen">
7
<style type="text/css" media="screen">
4
8
5
[% IF ( login ) %]
9
[% IF ( login ) %]
Lines 69-74 td input { font-size: 1.5em; } Link Here
69
73
70
</style>
74
</style>
71
75
76
<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>
78
<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>
83
<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
72
<script type="text/javascript">
87
<script type="text/javascript">
73
    //<![CDATA[
88
    //<![CDATA[
74
        function _(s) { return s } // dummy function for gettext
89
        function _(s) { return s } // dummy function for gettext
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt (-2 / +2 lines)
Lines 87-98 Link Here
87
                 <ol>
87
                 <ol>
88
                     <li>
88
                     <li>
89
                        <label for="branchcode" class="required">Library code: </label>
89
                        <label for="branchcode" class="required">Library code: </label>
90
                        <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
90
                        <input type="text" style="text-transform: uppercase;"name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
91
                        <span class="required">Required</span>
91
                        <span class="required">Required</span>
92
                    </li>
92
                    </li>
93
                    <li>
93
                    <li>
94
                        <label for="branchname" class="required">Name: </label>
94
                        <label for="branchname" class="required">Name: </label>
95
                        <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
95
                        <input type="text" style="text-transform:capitalize;" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
96
                        <span class="required">Required</span>
96
                        <span class="required">Required</span>
97
                    </li>
97
                    </li>
98
                 </ol>
98
                 </ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-53 / +81 lines)
Lines 2-24 Link Here
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Price %]
4
[% USE Price %]
5
6
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title> Add a patron category</title>
7
[% INCLUDE 'installer-doc-head-close.inc' %]
7
[% INCLUDE 'installer-doc-head-close.inc' %]
8
[% INCLUDE 'calendar.inc' %]
8
[% INCLUDE 'calendar.inc' %]
9
[% INCLUDE 'datatables.inc' %]
10
11
12
<head>
13
<title> Add a patron category</title>
14
<!--JQuery scripts for create patron category-->
15
<script type="text/javascript">
9
<script type="text/javascript">
16
     var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
10
     var MSG_CATEGORYCODE_CHARS = (_("Category code can only contain the following characters: letters, numbers, - and _."));
17
     var MSG_BOTH_ENROLLMENTPERIODS = _("Please choose only one enrollment period setting.");
11
     var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date."));
18
     var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
12
</script>
13
<script type="text/javascript">
14
jQuery.validator.addMethod( "letters_numbers", function(value,element){
15
    var patt = /^[a-zA-Z0-9\-_]+$/g;
16
    if (patt.test(element.value)) {
17
        return true;
18
    } else {
19
        return false;
20
    }
21
}, MSG_CATEGORYCODE_CHARS);
22
23
jQuery.validator.addMethod( "enrollment_period", function(){
24
    enrolmentperiod = $("#enrolmentperiod").val();
25
    enrolmentperioddate = $("#enrolmentperioddate").val();
26
    if ( $("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "" ) {
27
        return false;
28
    } else {
29
        return true;
30
    }
31
}, MSG_ONE_ENROLLMENTPERIOD);
32
33
$(document).ready(function(){
34
     $("#category_form").validate({
35
         rules: {
36
             categorycode: {
37
                 required: true,
38
                 letters_numbers: true
39
             },
40
             description: "required",
41
             enrolmentperiod: {
42
                 required: function(element){
43
                    return $("#enrolmentperioddate").val() === "";
44
             },
45
                 digits: true,
46
                 enrollment_period: true
47
             },
48
             enrolmentperioddate: {
49
                 required: function(element){
50
                   return $("#enrolmentperiod").val() === "";
51
                 },
52
                 enrollment_period: true
53
             },
54
             dateofbirthrequired: {
55
                digits: true
56
             },
57
             upperagelimit: {
58
                 digits: true
59
             },
60
             enrolmentfee: {
61
                 number: true
62
             },
63
             reservefee: {
64
                 number: true
65
             },
66
             category_type: {
67
                 required: true
68
             }
69
         },
70
         messages: {
71
             enrolmentperiod: {
72
                 required: MSG_ONE_ENROLLMENTPERIOD
73
             },
74
             enrolmentperioddate: {
75
                 required: MSG_ONE_ENROLLMENTPERIOD
76
             }
77
         }
78
 
79
     });
80
81
})
19
</script>
82
</script>
20
<script type="text/javascript" src="[% themelang %]/js/categories.js"></script>
21
<style type="text/css">#enrolmentmessage.hint { display : none; }</style>
22
83
23
</head>
84
</head>
24
85
Lines 42-48 Link Here
42
[% ELSIF op == "add_validate" %]
103
[% ELSIF op == "add_validate" %]
43
    [% IF message != "error_on_insert" %]
104
    [% IF message != "error_on_insert" %]
44
     <form name="createcat" method="post" action="onboarding.pl">
105
     <form name="createcat" method="post" action="onboarding.pl">
45
          Message is [%message%] 
46
            <input type="hidden" name="step" value="3"/>
106
            <input type="hidden" name="step" value="3"/>
47
             <h1 align="left">  New patron category</h1>
107
             <h1 align="left">  New patron category</h1>
48
             <div>
108
             <div>
Lines 67-87 Link Here
67
        
127
        
68
128
69
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category-->
129
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category-->
70
    <h1 align="left"> Create a new Patron Category</h2>
130
    <h1 align="left"> Create a new Patron Category</h1>
71
    <form id="category_form" method="post" action="onboarding.pl">
131
       <form id="category_form" method="post" action="onboarding.pl">  
72
        <fieldset class="rows">
132
       <fieldset class="rows">
73
            <input type="hidden" name="step" value="2"/>
133
            <input type="hidden" name="step" value="2"/>
74
            <input type="hidden" name="op" value="add_validate" />
134
            <input type="hidden" name="op" value="add_validate" />
75
                <ol>
135
                <ol>
76
                    <li>
136
                    <li>
77
                        <label for="categorycode" class="required">Category code: </label>
137
                        <label for="categorycode" class="required">Category code: </label>
78
                        <input type="text" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" />
138
                        <input type="text" style="text-transform: uppercase;" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" />
79
                        <span class="required">Required</span>
139
                        <span class="required">Required</span>
80
                    </li>
140
                    </li>
81
141
82
                    <li>
142
                    <li>
83
                        <label for="description" class="required">Description: </label>
143
                        <label for="description" class="required">Description: </label>
84
                        <input type="text" name="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" />
144
                        <input type="text" style="text-transform:capitalize;" name="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" />
85
                        <span class="required">Required</span>
145
                        <span class="required">Required</span>
86
                    </li>
146
                    </li>
87
147
Lines 101-141 Link Here
101
                    <li>
161
                    <li>
102
                        <label for="category_type" class="required">Category type: </label>
162
                        <label for="category_type" class="required">Category type: </label>
103
                        <select name="category_type" value="category_type" class='required' required='required'>
163
                        <select name="category_type" value="category_type" class='required' required='required'>
104
                            [% IF category and category.category_type == 'A' %]
105
                                <option value="A" selected="selected">Adult</ option>
106
                            [% ELSE %]
107
                                <option value="A">Adult</option>
108
                            [% END %]
109
110
                            [% IF category and category.category_type == 'C' %]
111
                                <option value="C" selected="selected">Child</ option>
112
                            [% ELSE %]
113
                                <option value="C">Child</option>
114
                            [% END %]
115
116
                            [% IF category and category.category_type == 'S' %]
164
                            [% IF category and category.category_type == 'S' %]
117
                                <option value="S" selected="selected">Staff</option>
165
                                <option value="S" selected="selected">Staff</option>
118
                            [% ELSE %]
166
                            [% ELSE %]
119
                                <option value="S">Staff</option>
167
                                <option value="S">Staff</option>
120
                            [% END %]
168
                            [% END %]
121
122
                            [% IF category and category.category_type == 'I' %]
123
                                <option value="I" selected="selected">Organization</option>
124
                            [% ELSE %]
125
                                <option value="I">Organization</option>
126
                            [% END %]
127
128
                            [% IF category and category.category_type == 'P' %]
129
                                <option value="P" selected="selected">Professional</option>
130
                            [% ELSE %]
131
                                <option value="P">Professional</option>
132
                            [% END %]
133
134
                            [% IF category and category.category_type == 'X' %]
135
                                <option value="X" selected="selected">Statistical</option>
136
                            [% ELSE %]
137
                                <option value="X">Statistical</option>
138
                            [% END %]
139
                        </select>
169
                        </select>
140
                        <span class="required">Required</span>
170
                        <span class="required">Required</span>
141
                    </li>
171
                    </li>
Lines 174-184 Link Here
174
                            <ol>
204
                            <ol>
175
                                <li>
205
                                <li>
176
                                    <label for="enrolmentperiod" style="width:6em;">In months: </label>
206
                                    <label for="enrolmentperiod" style="width:6em;">In months: </label>
177
                                    <input type="text" name="enrolmentperiod" size="3"     maxlength="1" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months 
207
                                    <input type="number" min="0" class="enrollmentperiod" name="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months 
178
                                </li>
208
                                </li>
179
                                <li>
209
                                <li>
180
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
210
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
181
                                    <input type="text" name="enrolmentperioddate"  value="[% category.enrolmentperioddate | $KohaDates %]" />
211
                                    <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
182
                                </li>
212
                                </li>
183
                            </ol>
213
                            </ol>
184
                     </fieldset>
214
                     </fieldset>
Lines 187-195 Link Here
187
    </form>
217
    </form>
188
[% END %]
218
[% END %]
189
219
190
220
[% INCLUDE 'intranet-bottom.inc' %]
191
192
193
221
194
222
195
223
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-16 / +5 lines)
Lines 54-65 Link Here
54
                        <li>
54
                        <li>
55
                            <label for="surname" class="required">Surname: </label>
55
                            <label for="surname" class="required">Surname: </label>
56
56
57
                            <input type="text" id="surname" name="surname"  value="[% surname %]" class="required" required="required" />
57
                            <input type="text" style="text-transform:capitalize" id="surname" name="surname"  value="[% surname %]" class="required" required="required" />
58
                            <span class="required">Required</span>
58
                            <span class="required">Required</span>
59
                        </li>
59
                        </li>
60
                        <li>
60
                        <li>
61
                            <label for="firstname" class="required">First Name: </label>
61
                            <label for="firstname" class="required">First Name: </label>
62
                            <input style= "text-transform:uppercase;" type="text" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
62
                            <input style= "text-transform:capitalize;" type="text" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
63
                            <span class="required">Required</span>
63
                            <span class="required">Required</span>
64
                        </li>
64
                        </li>
65
                    </ol>
65
                    </ol>
Lines 68-74 Link Here
68
                    <ol>
68
                    <ol>
69
                        <li>
69
                        <li>
70
                            <label for="cardnumber" class="required">Card Number: </label>
70
                            <label for="cardnumber" class="required">Card Number: </label>
71
                            <input type="text" id="cardnumber" name="cardnumber" size="10" maxlength="20" value="[% cardnumber | html %]" class="required">
71
                            <input type="number" min="1" id="cardnumber" name="cardnumber" maxlength="20" value="[% borrower.cardnumber | html %]" class="required">
72
                            <span class="required">Required</span>
72
                            <span class="required">Required</span>
73
                        </li>
73
                        </li>
74
                        <li>
74
                        <li>
Lines 87-93 Link Here
87
                            <label for="categorycode_entry" class="required"> Patron Category</label>
87
                            <label for="categorycode_entry" class="required"> Patron Category</label>
88
                            <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
88
                            <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
89
                           [% FOREACH category IN categories %] 
89
                           [% FOREACH category IN categories %] 
90
                                <option name="categorycode_entry" value = "[% category.categorycode %]"> [%category.categorycode %]</option>
90
                                <option name="categorycode_entry" value = "[% category.categorycode %]"> [%category.description %]</option>
91
                           [% END %]
91
                           [% END %]
92
                            </select>
92
                            </select>
93
                            <span class="required">Required</span>
93
                            <span class="required">Required</span>
Lines 124-138 Link Here
124
             </fieldset><br>
124
             </fieldset><br>
125
                <input type="submit" class="action" value="Submit"/>
125
                <input type="submit" class="action" value="Submit"/>
126
     </form>
126
     </form>
127
[% END %]        
127
[% END %]
128
129
130
131
132
133
134
135
136
137
138
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (-3 / +3 lines)
Lines 67-79 Link Here
67
                 <input type="hidden" name="op" value="add_validate" />
67
                 <input type="hidden" name="op" value="add_validate" />
68
                    <ol>
68
                    <ol>
69
                        <li>
69
                        <li>
70
                            <label for="itemtype" class="required">Item type: </label>
70
                            <label for="itemtype" class="required">Item type code: </label>
71
                            <input type="text" name="itemtype" id="itemtype" size="10" maxlength="10"  class="required" required="required" />
71
                            <input type="text" style="text-transform:uppercase;" name="itemtype" id="itemtype" size="10" maxlength="10"  class="required" required="required" />
72
                            <span class="required">Required</span>
72
                            <span class="required">Required</span>
73
                        </li>
73
                        </li>
74
                        <li>
74
                        <li>
75
                            <label for="description" class="required">Description: </label>
75
                            <label for="description" class="required">Description: </label>
76
                            <input type="text" name="description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required">
76
                            <input type="text" style="text-transform:capitalize;" name="description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required">
77
                            <span class="required">Required</span>
77
                            <span class="required">Required</span>
78
                        </li>
78
                        </li>
79
                    </ol>
79
                    </ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-7 / +6 lines)
Lines 57-65 Link Here
57
                    <li>
57
                    <li>
58
                             <label for="categorycode" class="required">Patron Category: </label>
58
                             <label for="categorycode" class="required">Patron Category: </label>
59
                             <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);">
59
                             <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);">
60
                                                   
60
                               <!-- <option name="categorycode" value="All">All-->
61
                             [% FOREACH category IN categories %]
61
                             [% FOREACH category IN categories %]
62
                                <option name="categorycode" value = "[% category.description %]"> [%category.description %]
62
                                <option name="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option> 
63
                            [%END%]
63
                            [%END%]
64
                             </select>
64
                             </select>
65
                        <span class="required">Required</span>
65
                        <span class="required">Required</span>
Lines 77-89 Link Here
77
77
78
                        <li>
78
                        <li>
79
                            <label for="maxissueqty" class="required">Current checkouts allowed: </label>
79
                            <label for="maxissueqty" class="required">Current checkouts allowed: </label>
80
                            <input type="text" name="maxissueqty" id="maxissueqty" size="10" maxlength="10" value="" class="required" required="required" />
80
                            <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" maxlength="10" value="" class="required" required="required" />
81
                            <span class="required">Required</span>
81
                            <span class="required">Required</span>
82
                        </li>
82
                        </li>
83
                        
83
                        
84
                        <li>
84
                        <li>
85
                             <label for="issuelength" class="required">Loan Period: </label>
85
                             <label for="issuelength" class="required">Loan Period: </label>
86
                             <input type="text" name="issuelength" id="issuelength" size="10" maxlength="10" value="" class="required" required="required" />
86
                             <input type="number" min="0" name="issuelength" id="issuelength" size="10" maxlength="10" value="" class="required" required="required" />
87
                              <span class="required">Required</span>
87
                              <span class="required">Required</span>
88
                        </li>
88
                        </li>
89
89
Lines 109-121 Link Here
109
109
110
                        <li>
110
                        <li>
111
                             <label for="renewalsallowed" class="required">Renewals Allowed: </label>
111
                             <label for="renewalsallowed" class="required">Renewals Allowed: </label>
112
                             <input type="text" name="renewalsallowed" id="renewalsallowed" size="10" maxlength="10" value="" class="required" required="required" />
112
                             <input type="number"min="0" name="renewalsallowed" id="renewalsallowed" size="10" maxlength="10" value="" class="required" required="required" />
113
                              <span class="required">Required</span>
113
                              <span class="required">Required</span>
114
                        </li>
114
                        </li>
115
115
116
                         <li>
116
                         <li>
117
                             <label for="renewalperiod" class="required">Renewals Period: </label>
117
                             <label for="renewalperiod" class="required">Renewals Period: </label>
118
                             <input type="text" name="renewalperiod" id="renewalperiod" size="10" maxlength="10" value="" class="required" required="required" />
118
                             <input type="number" min="0"name="renewalperiod" id="renewalperiod" size="10" maxlength="10" value="" class="required" required="required" />
119
                              <span class="required">Required</span>
119
                              <span class="required">Required</span>
120
                        </li>
120
                        </li>
121
121
122
- 

Return to bug 17855