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

(-)a/admin/categories.pl (-45 / +56 lines)
Lines 57-84 if ( $op eq 'add_form' ) { Link Here
57
    }
57
    }
58
}
58
}
59
elsif ( $op eq 'cud-add_validate' ) {
59
elsif ( $op eq 'cud-add_validate' ) {
60
    my $categorycode                           = $input->param('categorycode');
61
    my $description                            = $input->param('description');
62
    my $enrolmentperiod                        = $input->param('enrolmentperiod');
63
    my $enrolmentperioddate                    = $input->param('enrolmentperioddate')  || undef;
64
    my $password_expiry_days                   = $input->param('password_expiry_days') || undef;
65
    my $upperagelimit                          = $input->param('upperagelimit');
66
    my $dateofbirthrequired                    = $input->param('dateofbirthrequired');
67
    my $enrolmentfee                           = $input->param('enrolmentfee');
68
    my $reservefee                             = $input->param('reservefee');
69
    my $hidelostitems                          = $input->param('hidelostitems');
70
    my $overduenoticerequired                  = $input->param('overduenoticerequired');
71
    my $category_type                          = $input->param('category_type');
72
    my $BlockExpiredPatronOpacActions          = $input->param('BlockExpiredPatronOpacActions');
73
    my $checkPrevCheckout                      = $input->param('checkprevcheckout');
74
    my $can_place_ill_in_opac                  = $input->param('can_place_ill_in_opac') // 1;
75
    my $default_privacy                        = $input->param('default_privacy');
76
    my $reset_password                         = $input->param('reset_password');
77
    my $change_password                        = $input->param('cud-change_password');
78
    my $exclude_from_local_holds_priority      = $input->param('exclude_from_local_holds_priority');
79
    my $min_password_length                    = $input->param('min_password_length');
80
    my $require_strong_password                = $input->param('require_strong_password');
81
    my $noissuescharge                         = $input->param('noissuescharge') || undef;
82
    my $noissueschargeguarantees               = $input->param('noissueschargeguarantees') || undef;
83
    my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef;
60
84
61
    my $categorycode = $input->param('categorycode');
62
    my $description = $input->param('description');
63
    my $enrolmentperiod = $input->param('enrolmentperiod');
64
    my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef;
65
    my $password_expiry_days = $input->param('password_expiry_days') || undef;
66
    my $upperagelimit = $input->param('upperagelimit');
67
    my $dateofbirthrequired = $input->param('dateofbirthrequired');
68
    my $enrolmentfee = $input->param('enrolmentfee');
69
    my $reservefee = $input->param('reservefee');
70
    my $hidelostitems = $input->param('hidelostitems');
71
    my $overduenoticerequired = $input->param('overduenoticerequired');
72
    my $category_type = $input->param('category_type');
73
    my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions');
74
    my $checkPrevCheckout = $input->param('checkprevcheckout');
75
    my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1;
76
    my $default_privacy = $input->param('default_privacy');
77
    my $reset_password = $input->param('reset_password');
78
    my $change_password = $input->param('cud-change_password');
79
    my $exclude_from_local_holds_priority = $input->param('exclude_from_local_holds_priority');
80
    my $min_password_length = $input->param('min_password_length');
81
    my $require_strong_password = $input->param('require_strong_password');
82
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
85
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
83
    my $can_be_guarantee = $input->param('can_be_guarantee');
86
    my $can_be_guarantee = $input->param('can_be_guarantee');
84
87
Lines 113-118 elsif ( $op eq 'cud-add_validate' ) { Link Here
113
        $category->exclude_from_local_holds_priority($exclude_from_local_holds_priority);
116
        $category->exclude_from_local_holds_priority($exclude_from_local_holds_priority);
114
        $category->min_password_length($min_password_length);
117
        $category->min_password_length($min_password_length);
115
        $category->require_strong_password($require_strong_password);
118
        $category->require_strong_password($require_strong_password);
119
        $category->noissuescharge($noissuescharge);
120
        $category->noissueschargeguarantees($noissueschargeguarantees);
121
        $category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees);
116
        eval {
122
        eval {
117
            $category->store;
123
            $category->store;
118
            $category->replace_library_limits( \@branches );
124
            $category->replace_library_limits( \@branches );
Lines 124-153 elsif ( $op eq 'cud-add_validate' ) { Link Here
124
        }
130
        }
125
    }
131
    }
126
    else {
132
    else {
127
        my $category = Koha::Patron::Category->new({
133
        my $category = Koha::Patron::Category->new(
128
            categorycode => $categorycode,
134
            {
129
            description => $description,
135
                categorycode                           => $categorycode,
130
            enrolmentperiod => $enrolmentperiod,
136
                description                            => $description,
131
            enrolmentperioddate => $enrolmentperioddate,
137
                enrolmentperiod                        => $enrolmentperiod,
132
            password_expiry_days => $password_expiry_days,
138
                enrolmentperioddate                    => $enrolmentperioddate,
133
            upperagelimit => $upperagelimit,
139
                password_expiry_days                   => $password_expiry_days,
134
            dateofbirthrequired => $dateofbirthrequired,
140
                upperagelimit                          => $upperagelimit,
135
            enrolmentfee => $enrolmentfee,
141
                dateofbirthrequired                    => $dateofbirthrequired,
136
            reservefee => $reservefee,
142
                enrolmentfee                           => $enrolmentfee,
137
            hidelostitems => $hidelostitems,
143
                reservefee                             => $reservefee,
138
            overduenoticerequired => $overduenoticerequired,
144
                hidelostitems                          => $hidelostitems,
139
            category_type => $category_type,
145
                overduenoticerequired                  => $overduenoticerequired,
140
            can_be_guarantee => $can_be_guarantee,
146
                category_type                          => $category_type,
141
            BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions,
147
                can_be_guarantee                       => $can_be_guarantee,
142
            checkprevcheckout => $checkPrevCheckout,
148
                BlockExpiredPatronOpacActions          => $BlockExpiredPatronOpacActions,
143
            can_place_ill_in_opac => $can_place_ill_in_opac,
149
                checkprevcheckout                      => $checkPrevCheckout,
144
            default_privacy => $default_privacy,
150
                can_place_ill_in_opac                  => $can_place_ill_in_opac,
145
            reset_password => $reset_password,
151
                default_privacy                        => $default_privacy,
146
            change_password => $change_password,
152
                reset_password                         => $reset_password,
147
            exclude_from_local_holds_priority => $exclude_from_local_holds_priority,
153
                change_password                        => $change_password,
148
            min_password_length => $min_password_length,
154
                exclude_from_local_holds_priority      => $exclude_from_local_holds_priority,
149
            require_strong_password => $require_strong_password,
155
                min_password_length                    => $min_password_length,
150
        });
156
                require_strong_password                => $require_strong_password,
157
                noissuescharge                         => $noissuescharge,
158
                noissueschargeguarantees               => $noissueschargeguarantees,
159
                noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees,
160
            }
161
        );
151
        eval {
162
        eval {
152
            $category->store;
163
            $category->store;
153
            $category->replace_library_limits( \@branches );
164
            $category->replace_library_limits( \@branches );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (-1 / +30 lines)
Lines 438-443 Link Here
438
                    </select>
438
                    </select>
439
                    <div class="hint">If <i>Yes</i>, holds placed by patrons of this category will not be given priority</div>
439
                    <div class="hint">If <i>Yes</i>, holds placed by patrons of this category will not be given priority</div>
440
                </li>
440
                </li>
441
                <li>
442
                    <label for="noissuescharge">No Issues Charge: </label>
443
                    <input type="text" name="noissuescharge" id="noissuescharge" value="[% category.noissuescharge | html %]" size="3" maxlength="3" />
444
                </li>
445
                <li>
446
                    <label for="noissueschargeguarantees">No Issues Charge Guarantees: </label>
447
                    <input type="text" name="noissueschargeguarantees" id="noissueschargeguarantees" value="[% category.noissueschargeguarantees | html %]" size="3" maxlength="3" />
448
                </li>
449
                <li>
450
                    <label for="noissueschargeguarantorswithguarantees">No Issues Charge Guarantors With Guarantees: </label>
451
                    <input type="text" name="noissueschargeguarantorswithguarantees" id="noissueschargeguarantorswithguarantees" value="[% category.noissueschargeguarantorswithguarantees | html %]" size="3" maxlength="3" />
452
                </li>
441
            </ol>
453
            </ol>
442
        </fieldset>
454
        </fieldset>
443
455
Lines 583-588 Link Here
583
                    <th scope="col">Can be guarantee</th>
595
                    <th scope="col">Can be guarantee</th>
584
                    <th scope="col">Default privacy</th>
596
                    <th scope="col">Default privacy</th>
585
                    <th scope="col">Exclude from local holds priority</th>
597
                    <th scope="col">Exclude from local holds priority</th>
598
                    <th scope="col">No Issues Charge</th>
599
                    <th scope="col">No Issues Charge Guarantees</th>
600
                    <th scope="col">No Issues Charge Guarantors With Guarantees</th>
586
                    <th scope="col">Actions</th>
601
                    <th scope="col">Actions</th>
587
                </tr>
602
                </tr>
588
            </thead>
603
            </thead>
Lines 720-725 Link Here
720
                                <span>No</span>
735
                                <span>No</span>
721
                            [% END %]
736
                            [% END %]
722
                        </td>
737
                        </td>
738
                        [% IF (category.noissuescharge) %]
739
                            <td>[% category.noissuescharge | html %]</td>
740
                        [% ELSE %]
741
                            <td>0.00</td>
742
                        [% END %]
743
                        [% IF (category.noissueschargeguarantees) %]
744
                            <td>[% category.noissueschargeguarantees | html %]</td>
745
                        [% ELSE %]
746
                            <td>0.00</td>
747
                        [% END %]
748
                        [% IF (category.noissueschargeguarantorswithguarantees) %]
749
                            <td>[% category.noissueschargeguarantorswithguarantees | html %]</td>
750
                        [% ELSE %]
751
                            <td>0.00</td>
752
                        [% END %]
723
                        <td class="actions">
753
                        <td class="actions">
724
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&amp;categorycode=[% category.categorycode |uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
754
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&amp;categorycode=[% category.categorycode |uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
725
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&amp;categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash-can"></i> Delete</a>
755
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&amp;categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash-can"></i> Delete</a>
726
- 

Return to bug 28924