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

(-)a/installer/data/mysql/atomicupdate/bug_38776.pl (+13 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "BUG_38776",
5
    description => "Add RESTRICTION_COMMENTS authorised_value category",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{INSERT INTO authorised_value_categories VALUES ('RESTRICTION_COMMENTS',0,0);});
11
        say $out "Added 'RESTRICTION_COMMENTS' authorised_values category";
12
    },
13
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc (-6 / +8 lines)
Lines 82-94 Link Here
82
                [% END %]
82
                [% END %]
83
                <li>
83
                <li>
84
                <label for="rcomment">Comment:</label>
84
                <label for="rcomment">Comment:</label>
85
                    <input type="text" id="rcomment" list="rcomments" name="comment"/>
85
                <select class="select-reason" id="restriction-reason">
86
                    <datalist id="rcomments">
86
                    <option value=""> -- Choose a reason -- </option>
87
                    [% FOREACH rcomment IN AuthorisedValues.Get( 'R_COMMENTS' ) %]
87
                    [% FOREACH rcomment IN AuthorisedValues.Get( 'RESTRICTION_COMMENTS' ) %]
88
                         <option value="[% rcomment.lib | html %]">[% rcomment.lib | html %]</option>
88
                        <option value="[% rcomment.lib | html %]">[% rcomment.lib | html %]</option>
89
                    [% END %]
89
                    [% END %]
90
                    </datalist>
90
                    <option value="other">Others...</option>
91
                    <input type="submit">
91
                </select>
92
                <input type="text" id="other_reason" placeholder="please note your reason here..." />
93
                <input type="hidden" id="rcomment" name="comment">
92
                </li>
94
                </li>
93
                <li>
95
                <li>
94
                    <label for="rexpiration">Expiration:</label>
96
                    <label for="rexpiration">Expiration:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-1 / +1 lines)
Lines 543-549 Link Here
543
            <p>Can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</p>
543
            <p>Can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</p>
544
        [% CASE 'RESTRICTED' %]
544
        [% CASE 'RESTRICTED' %]
545
           <p>Restricted status of an item</p>
545
           <p>Restricted status of an item</p>
546
        [% CASE 'R_COMMENTS' %]
546
        [% CASE 'RESTRICTION_COMMENTS' %]
547
            <p>Values for custom patron restriction comments to pre-fill the manual restrictions. The value in the description field should be the message text and is limited to 200 characters</p>
547
            <p>Values for custom patron restriction comments to pre-fill the manual restrictions. The value in the description field should be the message text and is limited to 200 characters</p>
548
        [% CASE 'ROADTYPE' %]
548
        [% CASE 'ROADTYPE' %]
549
            <p>Road types to be used in patron addresses</p>
549
            <p>Road types to be used in patron addresses</p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+1 lines)
Lines 840-845 Link Here
840
    </script>
840
    </script>
841
    [% Asset.js("js/checkouts.js") | $raw %]
841
    [% Asset.js("js/checkouts.js") | $raw %]
842
    [% Asset.js("js/tables/bookings.js") | $raw %]
842
    [% Asset.js("js/tables/bookings.js") | $raw %]
843
    [% Asset.js("js/patron-restrictions.js") | $raw %]
843
[% END %]
844
[% END %]
844
845
845
[% INCLUDE 'intranet-bottom.inc' %]
846
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/patron-restrictions.js (-1 / +14 lines)
Line 0 Link Here
0
- 
1
$(document).ready(function(){
2
    $("#other_reason").on('change', function(){
3
        $("#rcomment").val($(this).val());
4
    });
5
    $("select#restriction-reason").on('change', function(){
6
        if($(this).val() == "other"){
7
            $("#other_reason").show();
8
            $("#rcomment").val('');
9
            return;
10
        }
11
        $("#other_reason").hide();
12
        $("#rcomment").val($(this).val());
13
    })
14
});

Return to bug 38776