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

(-)a/admin/categories.pl (+15 lines)
Lines 80-85 if ( $op eq 'add_form' ) { Link Here
80
    my $noissueschargeguarantees               = $input->param('noissueschargeguarantees')               || undef;
80
    my $noissueschargeguarantees               = $input->param('noissueschargeguarantees')               || undef;
81
    my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef;
81
    my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef;
82
    my $enforce_expiry_notice                  = $input->param('enforce_expiry_notice');
82
    my $enforce_expiry_notice                  = $input->param('enforce_expiry_notice');
83
    my $self_renewal_enabled                   = $input->param('self_renewal_enabled');
84
    my $self_renewal_availability_start        = $input->param('self_renewal_availability_start');
85
    my $self_renewal_fines_block               = $input->param('self_renewal_fines_block');
86
    my $self_renewal_failure_message           = $input->param('self_renewal_failure_message');
87
    my $self_renewal_if_expired                = $input->param('self_renewal_if_expired');
83
88
84
    my @branches                               = grep { $_ ne q{} } $input->multi_param('branches');
89
    my @branches                               = grep { $_ ne q{} } $input->multi_param('branches');
85
    my $can_be_guarantee                       = $input->param('can_be_guarantee');
90
    my $can_be_guarantee                       = $input->param('can_be_guarantee');
Lines 122-127 if ( $op eq 'add_form' ) { Link Here
122
        $category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees);
127
        $category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees);
123
        $category->force_password_reset_when_set_by_staff($force_password_reset_when_set_by_staff);
128
        $category->force_password_reset_when_set_by_staff($force_password_reset_when_set_by_staff);
124
        $category->enforce_expiry_notice($enforce_expiry_notice);
129
        $category->enforce_expiry_notice($enforce_expiry_notice);
130
        $category->self_renewal_enabled($self_renewal_enabled);
131
        $category->self_renewal_availability_start($self_renewal_availability_start);
132
        $category->self_renewal_fines_block($self_renewal_fines_block);
133
        $category->self_renewal_failure_message($self_renewal_failure_message);
134
        $category->self_renewal_if_expired($self_renewal_if_expired);
125
        eval {
135
        eval {
126
            $category->store;
136
            $category->store;
127
            $category->replace_library_limits( \@branches );
137
            $category->replace_library_limits( \@branches );
Lines 161-166 if ( $op eq 'add_form' ) { Link Here
161
                noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees,
171
                noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees,
162
                enforce_expiry_notice                  => $enforce_expiry_notice,
172
                enforce_expiry_notice                  => $enforce_expiry_notice,
163
                force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff,
173
                force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff,
174
                self_renewal_enabled                   => $self_renewal_enabled,
175
                self_renewal_availability_start        => $self_renewal_availability_start,
176
                self_renewal_fines_block               => $self_renewal_fines_block,
177
                self_renewal_failure_message           => $self_renewal_failure_message,
178
                self_renewal_if_expired                => $self_renewal_if_expired,
164
            }
179
            }
165
        );
180
        );
166
        eval {
181
        eval {
(-)a/admin/patron-attr-types.pl (-29 / +31 lines)
Lines 106-126 sub add_update_attribute_type { Link Here
106
    my $template = shift;
106
    my $template = shift;
107
    my $code     = shift;
107
    my $code     = shift;
108
108
109
    my $description               = $input->param('description');
109
    my $description                     = $input->param('description');
110
    my $repeatable                = $input->param('repeatable')                ? 1 : 0;
110
    my $repeatable                      = $input->param('repeatable')                      ? 1 : 0;
111
    my $unique_id                 = $input->param('unique_id')                 ? 1 : 0;
111
    my $unique_id                       = $input->param('unique_id')                       ? 1 : 0;
112
    my $is_date                   = $input->param('is_date')                   ? 1 : 0;
112
    my $is_date                         = $input->param('is_date')                         ? 1 : 0;
113
    my $opac_display              = $input->param('opac_display')              ? 1 : 0;
113
    my $opac_display                    = $input->param('opac_display')                    ? 1 : 0;
114
    my $opac_editable             = $input->param('opac_editable')             ? 1 : 0;
114
    my $opac_editable                   = $input->param('opac_editable')                   ? 1 : 0;
115
    my $staff_searchable          = $input->param('staff_searchable')          ? 1 : 0;
115
    my $staff_searchable                = $input->param('staff_searchable')                ? 1 : 0;
116
    my $searched_by_default       = $input->param('searched_by_default')       ? 1 : 0;
116
    my $searched_by_default             = $input->param('searched_by_default')             ? 1 : 0;
117
    my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0;
117
    my $keep_for_pseudonymization       = $input->param('keep_for_pseudonymization')       ? 1 : 0;
118
    my $mandatory                 = $input->param('mandatory')                 ? 1 : 0;
118
    my $mandatory                       = $input->param('mandatory')                       ? 1 : 0;
119
    my $opac_mandatory            = $input->param('opac_mandatory')            ? 1 : 0;
119
    my $opac_mandatory                  = $input->param('opac_mandatory')                  ? 1 : 0;
120
    my $authorised_value_category = $input->param('authorised_value_category');
120
    my $self_renewal_verification_check = $input->param('self_renewal_verification_check') ? 1 : 0;
121
    my $display_checkout          = $input->param('display_checkout') ? 1 : 0;
121
    my $authorised_value_category       = $input->param('authorised_value_category');
122
    my $category_code             = $input->param('category_code') || undef;
122
    my $display_checkout                = $input->param('display_checkout') ? 1 : 0;
123
    my $class                     = $input->param('class');
123
    my $category_code                   = $input->param('category_code') || undef;
124
    my $class                           = $input->param('class');
124
125
125
    my $attr_type = Koha::Patron::Attribute::Types->find($code);
126
    my $attr_type = Koha::Patron::Attribute::Types->find($code);
126
    if ( $op eq 'edit' ) {
127
    if ( $op eq 'edit' ) {
Lines 144-163 sub add_update_attribute_type { Link Here
144
145
145
    $attr_type->set(
146
    $attr_type->set(
146
        {
147
        {
147
            repeatable                => $repeatable,
148
            repeatable                      => $repeatable,
148
            unique_id                 => $unique_id,
149
            unique_id                       => $unique_id,
149
            is_date                   => $is_date,
150
            is_date                         => $is_date,
150
            opac_display              => $opac_display,
151
            opac_display                    => $opac_display,
151
            opac_editable             => $opac_editable,
152
            opac_editable                   => $opac_editable,
152
            staff_searchable          => $staff_searchable,
153
            staff_searchable                => $staff_searchable,
153
            searched_by_default       => $searched_by_default,
154
            searched_by_default             => $searched_by_default,
154
            keep_for_pseudonymization => $keep_for_pseudonymization,
155
            keep_for_pseudonymization       => $keep_for_pseudonymization,
155
            mandatory                 => $mandatory,
156
            mandatory                       => $mandatory,
156
            opac_mandatory            => $opac_mandatory,
157
            opac_mandatory                  => $opac_mandatory,
157
            authorised_value_category => $authorised_value_category,
158
            self_renewal_verification_check => $self_renewal_verification_check,
158
            display_checkout          => $display_checkout,
159
            authorised_value_category       => $authorised_value_category,
159
            category_code             => $category_code,
160
            display_checkout                => $display_checkout,
160
            class                     => $class,
161
            category_code                   => $category_code,
162
            class                           => $class,
161
        }
163
        }
162
    )->store;
164
    )->store;
163
165
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (+51 lines)
Lines 508-513 Link Here
508
                        [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantorsWithGuarantees&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a>' -%]
508
                        [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantorsWithGuarantees&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a>' -%]
509
                        <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.</div>
509
                        <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.</div>
510
                    </li>
510
                    </li>
511
                </ol>
512
            </fieldset>
513
514
            <fieldset class="rows">
515
                <legend>Account expiry and self-renewal</legend>
516
                <ol>
511
                    <li>
517
                    <li>
512
                        <label for="enforce_expiry_notice">Enforce patron account expiry notice:</label>
518
                        <label for="enforce_expiry_notice">Enforce patron account expiry notice:</label>
513
                        <select name="enforce_expiry_notice" id="enforce_expiry_notice">
519
                        <select name="enforce_expiry_notice" id="enforce_expiry_notice">
Lines 521-526 Link Here
521
                        </select>
527
                        </select>
522
                        <div class="hint">Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences</div>
528
                        <div class="hint">Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences</div>
523
                    </li>
529
                    </li>
530
                    <li>
531
                        <label for="self_renewal_enabled">Allow self-renewal:</label>
532
                        <select name="self_renewal_enabled" id="self_renewal_enabled">
533
                            [% IF category.self_renewal_enabled %]
534
                                <option value="1" selected>Yes</option>
535
                                <option value="0">No</option>
536
                            [% ELSE %]
537
                                <option value="1">Yes</option>
538
                                <option value="0" selected>No</option>
539
                            [% END %]
540
                        </select>
541
                        <div class="hint">Allow patrons to self renew via the OPAC</div>
542
                    </li>
543
                    <li>
544
                        <label for="self_renewal_availability_start">Self-renewal availability period: </label>
545
                        <input type="text" name="self_renewal_availability_start" id="self_renewal_availability_start" value="[% category.self_renewal_availability_start | html %]" size="3" maxlength="5" /> days
546
                        [%- SET pre_notifyborrowerdeparture_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NotifyBorrowerDeparture&ok=Search">NotifyBorrowerDeparture</a>' -%]
547
                        <div class="hint"
548
                            >How long before expiry the self-renewal page will be made available to the patron. If set, this will override the global value set in the [%- pre_notifyborrowerdeparture_link | $raw | $KohaSpan -%] system
549
                            preference.</div
550
                        >
551
                    </li>
552
                    <li>
553
                        <label for="self_renewal_fines_block">Self-renewal charge limit: </label>
554
                        <input type="text" pattern="^\d+(\.\d{2})?$" name="self_renewal_fines_block" id="self_renewal_fines_block" value="[% category.self_renewal_fines_block | $Price on_editing => 1 %]" size="5" maxlength="8" />
555
                        [%- SET pref_noissuescharge_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">noissuescharge</a>' -%]
556
                        <div class="hint"
557
                            >How much can be accrued in charges before self-renewal is blocked for the patron. If set, this will override charge levels set for this category. If these are not set then it overrides the global value set in
558
                            the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.</div
559
                        >
560
                    </li>
561
                    <li>
562
                        <label for="self_renewal_failure_message">Self-renewal failure message: </label>
563
                        [% IF (category.self_renewal_failure_message) %]
564
                            <textarea type="text" name="self_renewal_failure_message" id="self_renewal_failure_message" cols="40" rows="2">[% category.self_renewal_failure_message | html %]</textarea>
565
                        [% ELSE %]
566
                            [% SET default_message = t("Your self-renewal can't be processed at this time. Please visit your local branch to complete your renewal.") %]
567
                            <textarea type="text" name="self_renewal_failure_message" id="self_renewal_failure_message" cols="40" rows="4">[% default_message | html %]</textarea>
568
                        [% END %]
569
                    </li>
570
                    <li>
571
                        <label for="self_renewal_if_expired">Self-renewal availability post-expiry: </label>
572
                        <input type="text" name="self_renewal_if_expired" id="self_renewal_if_expired" value="[% category.self_renewal_if_expired | html %]" size="3" maxlength="5" /> days
573
                        <div class="hint">How long after a patron's account has expired before self-renewal will no longer be available.</div>
574
                    </li>
524
                </ol>
575
                </ol>
525
            </fieldset>
576
            </fieldset>
526
577
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-1 / +9 lines)
Lines 211-216 Link Here
211
                        [% END %]
211
                        [% END %]
212
                        <span class="hint">Check to show this attribute in the brief information panel in the patron's record (staff interface).</span>
212
                        <span class="hint">Check to show this attribute in the brief information panel in the patron's record (staff interface).</span>
213
                    </li>
213
                    </li>
214
                    <li
215
                        ><label for="self_renewal_verification_check">Self-renewal verification check: </label>
216
                        [% IF attribute_type AND attribute_type.self_renewal_verification_check %]
217
                            <input type="checkbox" id="self_renewal_verification_check" name="self_renewal_verification_check" checked="checked" />
218
                        [% ELSE %]
219
                            <input type="checkbox" id="self_renewal_verification_check" name="self_renewal_verification_check" />
220
                        [% END %]
221
                        <span class="hint">Check to use this as a verification step when a patron goes through self-renewal.</span>
222
                    </li>
214
223
215
                    [% IF Koha.Preference('Pseudonymization') %]
224
                    [% IF Koha.Preference('Pseudonymization') %]
216
                        <li>
225
                        <li>
217
- 

Return to bug 26355