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

(-)a/Koha/Schema/Result/Borrower.pm (-1 / +5 lines)
Lines 1021-1026 __PACKAGE__->has_many( Link Here
1021
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-07 08:15:21
1021
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-07 08:15:21
1022
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TQTGI0fDt+xCFs+8nOarfA
1022
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TQTGI0fDt+xCFs+8nOarfA
1023
1023
1024
__PACKAGE__->belongs_to(
1025
    "guarantor",
1026
    "Koha::Schema::Result::Borrower",
1027
    { borrowernumber => "guarantorid" },
1028
);
1024
1029
1025
# You can replace this text with custom content, and it will be preserved on regeneration
1026
1;
1030
1;
(-)a/Koha/Template/Plugin/Koha.pm (+15 lines)
Lines 22-27 use Modern::Perl; Link Here
22
use base qw( Template::Plugin );
22
use base qw( Template::Plugin );
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::Database;
25
26
26
=pod
27
=pod
27
28
Lines 44-47 sub Preference { Link Here
44
    return C4::Context->preference( $pref );
45
    return C4::Context->preference( $pref );
45
}
46
}
46
47
48
sub Find {
49
    my ( $self, $rs, $id ) = @_;
50
51
    return unless ( $rs && $id );
52
53
    my $resultset = Koha::Database->new()->schema()->resultset($rs);
54
55
    return unless $resultset;
56
57
    my $row = $resultset->find($id);
58
59
    return $row;
60
}
61
47
1;
62
1;
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 25-31 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
25
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
25
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
26
('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'),
26
('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'),
27
('AllowOnShelfHolds','0','','Allow hold requests to be placed on items that are not on loan','YesNo'),
27
('AllowOnShelfHolds','0','','Allow hold requests to be placed on items that are not on loan','YesNo'),
28
('AllowPatronToSetRelativesCheckoutsVisibility',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to guarantor from opac-memberentry.pl',  'YesNo'),
28
('AllowPatronToSetRelativesCheckoutsVisibility',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
29
('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'),
29
('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'),
30
('AllowPurchaseSuggestionBranchChoice','0','1','Allow user to choose branch when making a purchase suggestion','YesNo'),
30
('AllowPurchaseSuggestionBranchChoice','0','1','Allow user to choose branch when making a purchase suggestion','YesNo'),
31
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
31
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +1 lines)
Lines 8615-8621 if(CheckVersion($DBversion)) { Link Here
8615
        INSERT INTO systempreferences (variable, value, options, explanation, type )
8615
        INSERT INTO systempreferences (variable, value, options, explanation, type )
8616
        VALUES (
8616
        VALUES (
8617
            'AllowPatronToSetRelativesCheckoutsVisibility',  '0', NULL,
8617
            'AllowPatronToSetRelativesCheckoutsVisibility',  '0', NULL,
8618
            'If enabled, the patron can set checkouts to be visible to guarantor from opac-memberentry.pl',  'YesNo'
8618
            'If enabled, the patron can set checkouts to be visible to  his or her guarantor',  'YesNo'
8619
        )
8619
        )
8620
    });
8620
    });
8621
8621
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 593-599 OPAC: Link Here
593
              choices:
593
              choices:
594
                  yes: Allow
594
                  yes: Allow
595
                  no: "Don't allow"
595
                  no: "Don't allow"
596
            - patrons to choose their own privacy settings for showing checkouts to relatives from "your personal details" reguardless of the setting for OPACPrivacy.
596
            - patrons to choose their own privacy settings for showing the patron's checkouts to the patron's guarantor".
597
        -
597
        -
598
            - Use borrowernumber
598
            - Use borrowernumber
599
            - pref: AnonymousPatron
599
            - pref: AnonymousPatron
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-3 / +7 lines)
Lines 54-65 Link Here
54
                    <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
54
                    <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
55
                [% END %]
55
                [% END %]
56
56
57
                [% IF Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %]
57
                [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %]
58
                    <fieldset class="rows" id="memberentry_privacy">
58
                    <fieldset class="rows" id="memberentry_privacy">
59
                        <legend id="privacy_legend">Privacy</legend>
59
                        <legend id="privacy_legend">Privacy</legend>
60
                        <ol>
60
                        <ol>
61
                            <li>
61
                            <li>
62
                                <label>Allow relatives to view your current checkouts?</label>
62
                                <label>Allow your guarantor to view your current checkouts?</label>
63
                                <select id="privacy_relative_checkouts">
63
                                <select id="privacy_relative_checkouts">
64
                                    <option value="0">No</option>
64
                                    <option value="0">No</option>
65
                                    [% IF borrower.privacy_relative_checkouts %]
65
                                    [% IF borrower.privacy_relative_checkouts %]
Lines 72-77 Link Here
72
                                    <a id="update_privacy_relative_checkouts" href="#" class="btn">Update</a>
72
                                    <a id="update_privacy_relative_checkouts" href="#" class="btn">Update</a>
73
                                    <span id="update_privacy_relative_checkouts_message" class="alert" style="display:none"></span>
73
                                    <span id="update_privacy_relative_checkouts_message" class="alert" style="display:none"></span>
74
                                </span>
74
                                </span>
75
                                <span class="hint">
76
                                    [% SET g = Koha.Find('Borrower',borrower.guarantorid) %]
77
                                    Your guarantor is <i>[% g.firstname %] [% g.surname %]</i>
78
                                </span>
75
                            </li>
79
                            </li>
76
                        </ol>
80
                        </ol>
77
                    </fieldset>
81
                    </fieldset>
Lines 801-807 Link Here
801
                $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
805
                $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
802
            [% END %]
806
            [% END %]
803
807
804
            [% IF Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %]
808
            [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %]
805
                $('#update_privacy_relative_checkouts').click( function() {
809
                $('#update_privacy_relative_checkouts').click( function() {
806
                    $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_relative_checkouts: $('#privacy_relative_checkouts').val() })
810
                    $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_relative_checkouts: $('#privacy_relative_checkouts').val() })
807
                     .done(function( data ) {
811
                     .done(function( data ) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt (-12 / +18 lines)
Lines 68-85 Link Here
68
                                        </select>
68
                                        </select>
69
                                    </div>
69
                                    </div>
70
70
71
                                    <div>
71
                                    [% SET b = Koha.Find('Borrower', borrower.borrowernumber) %]
72
                                        <label for="privacy_relative_checkouts">Allow relatives to view your current checkouts?</label>
72
                                    [% IF b.guarantorid && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %]
73
                                        <select name="privacy_relative_checkouts">
73
                                        <div>
74
                                            [% IF borrower.privacy_relative_checkouts %]
74
                                            <label for="privacy_relative_checkouts">Allow your guarantor to view your current checkouts?</label>
75
                                                <option value="0">No</option>
75
                                            <select name="privacy_relative_checkouts">
76
                                                <option value="1" selected>Yes</option>
76
                                                [% IF borrower.privacy_relative_checkouts %]
77
                                            [% ELSE %]
77
                                                    <option value="0">No</option>
78
                                                <option value="0" selected>No</option>
78
                                                    <option value="1" selected>Yes</option>
79
                                                <option value="1">Yes</option>
79
                                                [% ELSE %]
80
                                            [% END %]
80
                                                    <option value="0" selected>No</option>
81
                                        </select>
81
                                                    <option value="1">Yes</option>
82
                                    </div>
82
                                                [% END %]
83
                                            </select>
84
                                            <span class="hint">
85
                                                Your guarantor is <i>[% b.guarantor.firstname %] [% b.guarantor.surname %]</i>
86
                                            </span>
87
                                        </div>
88
                                    [% END %]
83
89
84
                                    <button type="Submit" class="btn">Save</button>
90
                                    <button type="Submit" class="btn">Save</button>
85
                                </fieldset>
91
                                </fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-4 / +3 lines)
Lines 134-140 Link Here
134
                                                [% IF ( show_barcode ) %]
134
                                                [% IF ( show_barcode ) %]
135
                                                    <th>Barcode</th>
135
                                                    <th>Barcode</th>
136
                                                [% END %]
136
                                                [% END %]
137
                                                    <th>Call No.</th>
137
                                                    <th>Call number</th>
138
                                                [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
138
                                                [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
139
                                                    <th class="nosort">Renew</th>
139
                                                    <th class="nosort">Renew</th>
140
                                                [% END %]
140
                                                [% END %]
Lines 371-377 Link Here
371
                                            <th class="anti-the">Title</th>
371
                                            <th class="anti-the">Title</th>
372
                                            <th>Due</th>
372
                                            <th>Due</th>
373
                                            <th>Barcode</th>
373
                                            <th>Barcode</th>
374
                                            <th>Call No.</th>
374
                                            <th>Call number</th>
375
                                            <th class="psort">Relative</th>
375
                                            <th class="psort">Relative</th>
376
                                        </tr>
376
                                        </tr>
377
                                    </thead>
377
                                    </thead>
Lines 420-426 Link Here
420
                                            <th class="anti-the">Title</th>
420
                                            <th class="anti-the">Title</th>
421
                                            [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
421
                                            [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
422
                                            [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
422
                                            [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
423
                                            <th>Call no.</th>
423
                                            <th>Call number</th>
424
                                            <th class="title-string psort">Due</th>
424
                                            <th class="title-string psort">Due</th>
425
                                            [% IF ( OpacRenewalAllowed ) %]
425
                                            [% IF ( OpacRenewalAllowed ) %]
426
                                                <th class="nosort">Renew</th>
426
                                                <th class="nosort">Renew</th>
427
- 

Return to bug 9303