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

(-)a/installer/onboarding.pl (-85 / +128 lines)
Lines 40-45 use Koha::Patron::HouseboundRoles; Link Here
40
use Koha::Token;
40
use Koha::Token;
41
use Email::Valid;
41
use Email::Valid;
42
use Module::Load;
42
use Module::Load;
43
use Koha::IssuingRule;
44
use Koha::IssuingRules;
45
46
47
48
43
49
44
#Setting variables
50
#Setting variables
45
my $input    = new CGI;
51
my $input    = new CGI;
Lines 187-237 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
187
193
188
    #Once the user submits the page, this code validates the input and adds it
194
    #Once the user submits the page, this code validates the input and adds it
189
    #to the database as a new patron category 
195
    #to the database as a new patron category 
190
#}  elsif ( $op eq 'add_validate' ) {
191
196
192
        my $categorycode = $input->param('categorycode');
197
    my $categorycode = $input->param('categorycode');
193
        my $description = $input->param('description');
198
    my $description = $input->param('description');
194
        my $overduenoticerequired = $input->param('overduenoticerequired');
199
    my $overduenoticerequired = $input->param('overduenoticerequired');
195
        my $category_type = $input->param('category_type');
200
    my $category_type = $input->param('category_type');
196
        my $default_privacy = $input->param('default_privacy');
201
    my $default_privacy = $input->param('default_privacy');
197
        my $enrolmentperiod = $input->param('enrolmentperiod');
202
    my $enrolmentperiod = $input->param('enrolmentperiod');
198
        my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef;
203
    my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef;
199
204
200
        #Converts the string into a date format
205
    #Converts the string into a date format
201
        if ( $enrolmentperioddate) {
206
    if ( $enrolmentperioddate) {
202
            $enrolmentperioddate = output_pref(
207
        $enrolmentperioddate = output_pref(
203
                    {
208
                {
204
                        dt         => dt_from_string($enrolmentperioddate),
209
                    dt         => dt_from_string($enrolmentperioddate),
205
                        dateformat => 'iso',
210
                    dateformat => 'iso',
206
                        dateonly   => 1,
211
                    dateonly   => 1,
207
                    }
212
                }
208
            );
213
        );
209
        }
214
    }
210
        #Adds to the database
211
        $category = Koha::Patron::Category->new({
212
                categorycode=> $categorycode,
213
                description => $description,
214
                overduenoticerequired => $overduenoticerequired,
215
                category_type=> $category_type,
216
                default_privacy => $default_privacy,
217
                enrolmentperiod => $enrolmentperiod,
218
                enrolmentperioddate => $enrolmentperioddate,
219
        });
220
        eval {
221
            $category->store;
222
        };
223
215
224
        #Error messages
216
    #Adds to the database
225
        if($category){
217
    $category = Koha::Patron::Category->new({
226
            $message = 'success_on_insert';
218
            categorycode=> $categorycode,
227
        }else{
219
            description => $description,
228
            $message = 'error_on_insert';
220
            overduenoticerequired => $overduenoticerequired,
229
        }
221
            category_type=> $category_type,
222
            default_privacy => $default_privacy,
223
            enrolmentperiod => $enrolmentperiod,
224
            enrolmentperioddate => $enrolmentperioddate,
225
    });
226
    eval {
227
        $category->store;
228
    };
229
230
    #Error messages
231
    if($category){
232
        $message = 'success_on_insert';
233
    }else{
234
        $message = 'error_on_insert';
235
    }
230
236
231
        $template->param('message' => $message); 
237
    $template->param('message' => $message); 
232
238
233
#Create a patron
239
#Create a patron
234
}elsif ( $step && $step == 3 ){
240
}elsif ( $step && $step == 3 ){
241
235
    my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
242
    my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
236
    $template->param(libraries   => $libraries,
243
    $template->param(libraries   => $libraries,
237
              group_types => [
244
              group_types => [
Lines 250-260 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
250
            categories => $categories,
257
            categories => $categories,
251
    );
258
    );
252
259
260
253
    my $input = new CGI;
261
    my $input = new CGI;
254
    my $op = $input->param('op') // 'list';
262
    my $op = $input->param('op') // 'list';
255
263
256
    my @messages;
264
    my @messages;
257
    my @errors;
265
    my @errors;
266
    my $nok = $input->param('nok');
258
267
259
    my ($template, $loggedinuser, $cookie)= get_template_and_user({
268
    my ($template, $loggedinuser, $cookie)= get_template_and_user({
260
                template_name => "/onboarding/onboardingstep3.tt",
269
                template_name => "/onboarding/onboardingstep3.tt",
Lines 266-272 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
266
    });
275
    });
267
276
268
    if($op eq 'add_validate'){
277
    if($op eq 'add_validate'){
269
        my %newdata;
278
         my %newdata;
270
279
271
#Store the template form values in the newdata hash
280
#Store the template form values in the newdata hash
272
         $newdata{borrowernumber} = $input->param('borrowernumber');
281
         $newdata{borrowernumber} = $input->param('borrowernumber');
Lines 281-294 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
281
         $newdata{dateexpiry} = '12/10/2016';
290
         $newdata{dateexpiry} = '12/10/2016';
282
         $newdata{privacy} = "default";
291
         $newdata{privacy} = "default";
283
292
284
        if(my $error_code = checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){
293
         $newdata{'cardnumber'} = undef if $newdata{'cardnumber'} =~ /^\s*$/;
294
         if(my $error_code = checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){
285
            push @errors, $error_code == 1
295
            push @errors, $error_code == 1
286
                ? 'ERROR_cardnumber_already_exists'
296
                ? 'ERROR_cardnumber_already_exists'
287
                :$error_code == 2 
297
                :$error_code == 2
288
                    ? 'ERROR_cardnumber_length'
298
                    ? 'ERROR_cardnumber_length'
289
                    :()
299
                    :()
290
        }
300
         }
291
292
301
293
302
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
303
#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
Lines 299-304 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
299
        $member2{'borrowernumber'}=$borrowernumber;
308
        $member2{'borrowernumber'}=$borrowernumber;
300
309
301
        my $flag = $input->param('flag');
310
        my $flag = $input->param('flag');
311
302
        if ($input->param('newflags')) {
312
        if ($input->param('newflags')) {
303
             my $dbh=C4::Context->dbh();
313
             my $dbh=C4::Context->dbh();
304
             my @perms = $input->multi_param('flag');
314
             my @perms = $input->multi_param('flag');
Lines 314-341 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
314
             }
324
             }
315
325
316
326
317
             # construct flags
327
               # construct flags
318
             my $module_flags = 0;
328
               my $module_flags = 0;
319
             my $sth=$dbh->prepare("SELECT bit,flag FROM userflags ORDER BY bit");
329
               my $sth=$dbh->prepare("SELECT bit,flag FROM userflags ORDER BY bit");
320
             $sth->execute(); 
330
               $sth->execute(); 
321
             while (my ($bit, $flag) = $sth->fetchrow_array) {
331
               while (my ($bit, $flag) = $sth->fetchrow_array) {
322
                 if (exists $all_module_perms{$flag}) {
332
                    if (exists $all_module_perms{$flag}) {
323
                       $module_flags += 2**$bit;
333
                       $module_flags += 2**$bit;
324
                 }
334
                    }
325
             }
335
               }
326
336
327
             $sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?");
337
               $sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?");
328
             $sth->execute($module_flags, $borrowernumber);
338
               $sth->execute($module_flags, $borrowernumber);
329
339
330
340
               #Error handling checking if the patron was created successfully
331
            #Error handling checking if the patron was created successfully
341
               if(!$borrowernumber){
332
             if(!$borrowernumber){
342
                    push @messages, {type=> 'error', code => 'error_on_insert'};
333
                push @messages, {type=> 'error', code => 'error_on_insert'};
343
               }else{
334
             }else{
344
                    push @messages, {type=> 'message', code => 'success_on_insert'};
335
                push @messages, {type=> 'message', code => 'success_on_insert'};
345
               }
336
             }
346
         }
337
        }
347
    }
338
  }
339
}elsif ( $step && $step == 4){
348
}elsif ( $step && $step == 4){
340
    my $createitemtype = $input->param('createitemtype');
349
    my $createitemtype = $input->param('createitemtype');
341
    $template->param('createitemtype'=> $createitemtype );
350
    $template->param('createitemtype'=> $createitemtype );
Lines 363-376 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
363
        my $description = $input->param('description');
372
        my $description = $input->param('description');
364
373
365
        #store the input from the form - only 2 fields 
374
        #store the input from the form - only 2 fields 
366
        my $thisitemtype= Koha::ItemType->new(
375
        $itemtype= Koha::ItemType->new(
367
            { itemtype    => $itemtype_code,
376
            { itemtype    => $itemtype_code,
368
              description => $description,
377
              description => $description,
369
            }
378
            }
370
        );
379
        );
371
        eval{ $thisitemtype->store; };
380
        eval{ $itemtype->store; };
372
        #Error messages
381
        #Error messages
373
        if($thisitemtype){
382
        if($itemtype){
374
            $message = 'success_on_insert';
383
            $message = 'success_on_insert';
375
        }else{
384
        }else{
376
            $message = 'error_on_insert';
385
            $message = 'error_on_insert';
Lines 378-387 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
378
387
379
        $template->param('message' => $message); 
388
        $template->param('message' => $message); 
380
    }
389
    }
381
}elsif ( $step && $step == 5){
382
    my $test="a";
383
    warn $test;
384
390
391
392
393
394
}elsif ( $step && $step == 5){
385
    #Fetching all the existing categories to display in a drop down box
395
    #Fetching all the existing categories to display in a drop down box
386
    my $categories;
396
    my $categories;
387
    $categories= Koha::Patron::Categories->search();
397
    $categories= Koha::Patron::Categories->search();
Lines 395-442 if ( $start && $start eq 'Start setting up my Koha' ){ Link Here
395
        itemtypes => $itemtypes,
405
        itemtypes => $itemtypes,
396
    );
406
    );
397
407
408
    my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
409
    $template->param(libraries   => $libraries,
410
                     group_types => [
411
                {   categorytype => 'searchdomain',
412
                    categories   => [ Koha::LibraryCategories->search( { categorytype => 'searchdomain' } ) ],
413
                },
414
                {   categorytype => 'properties',
415
                    categories   => [ Koha::LibraryCategories->search( { categorytype => 'properties' } ) ],
416
                },
417
                ]
418
    );
419
398
    my $input = CGI->new;
420
    my $input = CGI->new;
399
    my($template, $loggedinuser, $cookie)  =get_template_and_user({
421
    my $dbh = C4::Context->dbh;
400
            template_name => "/onboarding/onboardingstep5.tt",
422
401
            query => $input,
423
    my ($template, $loggedinuser, $cookie)
402
            type => "intranet",
424
        = get_template_and_user({template_name => "/onboarding/onboardingstep5.tt",
403
            authnotrequired=>0,
425
                     query => $input,
404
            flagsrequired=> {parameters => 'manage_circ_rules'},
426
                     type => "intranet",
405
            debug =>1,
427
                     authnotrequired => 0,
406
    });
428
                     flagsrequired => {parameters => 'manage_circ_rules'},
429
                     debug => 1,
430
                     });
407
431
408
    my $type = $input->param('type');
409
    my $branch = $input->param('branch');
432
    my $branch = $input->param('branch');
433
    unless ( $branch ) {
434
           if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) {
435
                $branch = Koha::Libraries->search->count() == 1 ? undef : C4::Context::mybranch();
436
           }
437
           else {
438
                $branch = C4::Context::only_my_library() ? ( C4::Context::mybranch() || '*' ) : '*';
439
           }
440
    }
441
    $branch = '*' if $branch eq 'NO_LIBRARY_SET';
442
    my $op = $input->param('op') || q{};
410
443
411
    if($op eq 'add_validate'){
444
    if($op eq 'add_validate'){
445
446
        my $type = $input->param('type');
447
        my $br = $branch;
412
        my $bor = $input->param('categorycode');
448
        my $bor = $input->param('categorycode');
413
        my $itemtype = $input->param('itemtype');
449
        my $itemtype = $input->param('itemtype');
414
        my $maxissueqty = $input->param('maxissueqty');
450
        my $maxissueqty = $input->param('maxissueqty');
415
        my $issuelength = $input->param('issuelength');
451
        my $issuelength = $input->param('issuelength');
416
        #$issuelength = $issuelength eq q{} ? undef : $issuelength;
417
        my $lengthunit = $input->param('lengthunit');
452
        my $lengthunit = $input->param('lengthunit');
418
        my $renewalsallowed = $input->param('renewalsallowed');
453
        my $renewalsallowed = $input->param('renewalsallowed');
419
        my $renewalperiod = $input->param('renewalperiod');
454
        my $renewalperiod = $input->param('renewalperiod');
420
        my $onshelfholds = $input->param('onshelfholds');
455
        my $onshelfholds = $input->param('onshelfholds') || 0;
456
        $maxissueqty =~ s/\s//g;
457
        $maxissueqty = undef if $maxissueqty !~ /^\d+/;
458
        $issuelength = $issuelength eq q{} ? undef : $issuelength;
421
459
422
        my $params ={
460
        my $params ={
461
            branchcode      => $br,
423
            categorycode    => $bor,
462
            categorycode    => $bor,
424
            itemtype        => $itemtype,
463
            itemtype        => $itemtype,
425
            maxissueqty     => $maxissueqty,
464
            maxissueqty     => $maxissueqty,
426
            renewalsallowed => $renewalsallowed,
465
            renewalsallowed => $renewalsallowed,
427
            renewalperiod   => $renewalperiod,
466
            renewalperiod   => $renewalperiod,
467
            issuelength     => $issuelength, 
428
            lengthunit      => $lengthunit,
468
            lengthunit      => $lengthunit,
429
            onshelfholds    => $onshelfholds,
469
            onshelfholds    => $onshelfholds,
430
        };
470
        };
431
        my $issuingrule = Koha::IssuingRules->find({categorycode => $bor, itemtype => $itemtype});
471
472
        my @messages;
473
474
        my $issuingrule = Koha::IssuingRules->find({categorycode => $bor, itemtype => $itemtype, branchcode => $br });
432
        if($issuingrule){
475
        if($issuingrule){
433
            $issuingrule->set($params)->store();
476
            $issuingrule->set($params)->store();
477
            push @messages, {type=> 'error', code => 'error_on_insert'};#Stops crash of the onboarding tool if someone makes a circulation rule with the same item type, library and patron categroy as an exisiting circulation rule. 
434
        }else{
478
        }else{
435
            Koha::IssuingRule->new()->set($params)->store(); 
479
            Koha::IssuingRule->new()->set($params)->store(); 
436
        }
480
        }
437
    }
481
    }
438
 }
482
}
439
440
483
441
output_html_with_http_headers $input, $cookie, $template->output;
484
output_html_with_http_headers $input, $cookie, $template->output;
442
485
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (+170 lines)
Lines 30-35 jQuery.validator.addMethod( "enrollment_period", function(){ Link Here
30
    }
30
    }
31
}, MSG_ONE_ENROLLMENTPERIOD);
31
}, MSG_ONE_ENROLLMENTPERIOD);
32
32
33
//Testing the jquery
34
35
36
37
38
var debug    = "";
39
var dformat  = "us";
40
var sentmsg = 0;
41
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
42
var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s)."));
43
44
function is_valid_date(date) {
45
  // An empty string is considered as a valid date for convenient reasons.
46
  if ( date === '' ) return 1;
47
    var dateformat = dateformat_str = 'us';
48
    if ( dateformat == 'us' ) {
49
        if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0;
50
        dateformat = 'mm/dd/yy';
51
    } else if ( dateformat == 'metric' ) {
52
        if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0;
53
        dateformat = 'dd/mm/yy';
54
    } else if (dateformat == 'iso' ) {
55
        if ( date.search(/^\d{4}-\d{2}-\d{2}($|\s)/) == -1 ) return 0;
56
        dateformat = 'yy-mm-dd';
57
    } else if ( dateformat == 'dmydot' ) {
58
        if ( date.search(/^\d{2}\.\d{2}\.\d{4}($|\s)/) == -1 ) return 0;
59
        dateformat = 'dd.mm.yy';
60
    }
61
    try {
62
        $.datepicker.parseDate(dateformat, date);
63
    } catch (e) {
64
        return 0;
65
    };
66
        return 1;
67
}
68
69
function get_dateformat_str(dateformat) {
70
    var dateformat_str;
71
    if ( dateformat == 'us' ) {
72
         dateformat_str = 'mm/dd/yyyy';
73
    } else if ( dateformat == 'metric' ) {
74
         dateformat_str = 'dd/mm/yyyy';
75
    } else if (dateformat == 'iso' ) {
76
         dateformat_str = 'yyyy-mm-dd';
77
    } else if ( dateformat == 'dmydot' ) {
78
         dateformat_str = 'dd.mm.yyyy';
79
    }
80
    return dateformat_str;
81
}
82
83
function validate_date (dateText, inst) {
84
    if ( !is_valid_date(dateText) ) {
85
         var dateformat_str = get_dateformat_str( 'us' );
86
         alert(MSG_PLEASE_ENTER_A_VALID_DATE.format(dateformat_str));
87
         $('#'+inst.id).val('');
88
    }
89
}
90
91
function Date_from_syspref(dstring) {
92
    var dateX = dstring.split(/[-/.]/);
93
    if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));}
94
    if (dformat === "iso") {
95
        return new Date(dateX[0], (dateX[1] - 1), dateX[2]);  // YYYY-MM-DD to (YYYY,m(0-11),d)
96
    } else if (dformat === "us") {
97
        return new Date(dateX[2], (dateX[0] - 1), dateX[1]);  // MM/DD/YYYY to (YYYY,m(0-11),d)
98
    } else if (dformat === "metric") {
99
        return new Date(dateX[2], (dateX[1] - 1), dateX[0]);  // DD/MM/YYYY to (YYYY,m(0-11),d)
100
    } else if (dformat === "dmydot") {
101
        return new Date(dateX[2], (dateX[1] - 1), dateX[0]);  // DD.MM.YYYY to (YYYY,m(0-11),d)
102
    } else {
103
        if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);}
104
        return 0;
105
    }
106
}
107
108
function DateTime_from_syspref(date_time) {
109
    var parts = date_time.split(" ");
110
    var date = parts[0];
111
    var time = parts[1];
112
    parts = time.split(":");
113
    var hour = parts[0];
114
    var minute = parts[1];
115
    if ( hour < 0 || hour > 23 ) {
116
         return 0;
117
    }
118
    if ( minute < 0 || minute > 59 ) {
119
         return 0;
120
    }
121
    var datetime = Date_from_syspref( date );
122
    if ( isNaN( datetime.getTime() ) ) {
123
         return 0;
124
    }
125
    datetime.setHours( hour );
126
    datetime.setMinutes( minute );
127
    return datetime;
128
}
129
130
131
/* Instead of including multiple localization files as you would normally see with
132
      jQueryUI we expose the localization strings in the default configuration */
133
jQuery(function($){
134
   $.datepicker.regional[''] = {
135
   closeText: _("Done"),
136
   prevText: _("Prev"),
137
   nextText: _("Next"),
138
   currentText: _("Today"),
139
   monthNames: [_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),
140
   _("July"),_("August"),_("September"),_("October"),_("November"),_("December")],
141
   monthNamesShort: [_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"),
142
   _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")],
143
   dayNames: [_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday")],
144
   dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")],
145
   dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")],
146
   weekHeader: _("Wk"),
147
   dateFormat: "mm/dd/yy",
148
   firstDay: 0,
149
   isRTL: false,
150
   showMonthAfterYear: false,
151
   yearSuffix: ''};
152
   $.datepicker.setDefaults($.datepicker.regional['']);
153
});
154
155
$(document).ready(function(){
156
157
   $.datepicker.setDefaults({
158
        showOn: "both",
159
        changeMonth: true,
160
        changeYear: true,
161
        buttonImage: '/intranet-tmpl/prog/img/famfamfam/silk/calendar.png',
162
        buttonImageOnly: true,
163
        showButtonPanel: true,
164
        showOtherMonths: true,
165
        selectOtherMonths: true
166
   });
167
   $( ".datepicker" ).datepicker({
168
        onClose: function(dateText, inst) {
169
        validate_date(dateText, inst);
170
   },
171
   }).on("change", function(e, value) {
172
        if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
173
   });
174
  // http://jqueryui.com/demos/datepicker/#date-range
175
   var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
176
        changeMonth: true,
177
        numberOfMonths: 1,
178
        onSelect: function( selectedDate ) {
179
             var option = this.id == "from" ? "minDate" : "maxDate",
180
             instance = $( this ).data( "datepicker" );
181
             date = $.datepicker.parseDate(
182
                  instance.settings.dateFormat ||
183
                  $.datepicker._defaults.dateFormat,
184
                  selectedDate, instance.settings );
185
             dates.not( this ).datepicker( "option", option, date );
186
             },
187
             onClose: function(dateText, inst) {
188
                  validate_date(dateText, inst);
189
             },
190
    }).on("change", function(e, value) {
191
    if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
192
    });
193
});
194
195
196
197
198
33
$(document).ready(function(){
199
$(document).ready(function(){
34
     $("#category_form").validate({
200
     $("#category_form").validate({
35
         rules: {
201
         rules: {
Lines 209-214 $(document).ready(function(){ Link Here
209
                                <li>
375
                                <li>
210
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
376
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
211
                                    <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
377
                                    <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
378
                                    <img class="ui-datepicker-trigger" src="/intranet-tmpl/prog/img/famfamfam/silk/calendar.png" alt="..." title="...">
379
380
381
212
                                </li>
382
                                </li>
213
                            </ol>
383
                            </ol>
214
                     </fieldset>
384
                     </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (-1 / +1 lines)
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="number" min="1" id="cardnumber" name="cardnumber" maxlength="20" value="[% borrower.cardnumber | html %]" class="required">
71
                            <input type="number" min="1" id="cardnumber" name="cardnumber" maxlength="[%maxlength_cardnumber%]" minlength="[%minlength_cardnumber%]" value="[% cardnumber | html %]" class="required" required="required">
72
                            <span class="required">Required</span>
72
                            <span class="required">Required</span>
73
                        </li>
73
                        </li>
74
                        <li>
74
                        <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (-2 / +11 lines)
Lines 47-53 Link Here
47
47
48
[% ELSE %]    
48
[% ELSE %]    
49
<!--Create a circulation rule screen 1-->
49
<!--Create a circulation rule screen 1-->
50
       <h1 align="left"> Create a new Circulation rule </h2>
50
       <h1 align="left"> Create a new Circulation rule </h1>
51
  
51
  
52
       <form name="createcirculationrule" method="post" action="onboarding.pl">
52
       <form name="createcirculationrule" method="post" action="onboarding.pl">
53
            <fieldset class="rows">
53
            <fieldset class="rows">
Lines 55-60 Link Here
55
                 <input type="hidden" name="op" value="add_validate" />
55
                 <input type="hidden" name="op" value="add_validate" />
56
                    <ol>
56
                    <ol>
57
                    <li>
57
                    <li>
58
                        <label for="branch" class="required"> Library branch</label>
59
                        <select name="branch" id="branch" required="required">
60
61
                        [% FOREACH library IN libraries %]
62
                            <option name="branch" value="[% library.branchcode %]"> [% library.branchname %]</option>
63
                        [% END %]
64
                        </select>
65
                        <span class="required">Required</span>
66
                    </li>
67
                    <li>
58
                             <label for="categorycode" class="required">Patron Category: </label>
68
                             <label for="categorycode" class="required">Patron Category: </label>
59
                             <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);">
69
                             <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);">
60
                               <!-- <option name="categorycode" value="All">All-->
70
                               <!-- <option name="categorycode" value="All">All-->
61
- 

Return to bug 17855