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

(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 116-122 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
116
('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
116
('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
117
('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''),
117
('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''),
118
('EnableSearchHistory','0','','Enable or disable search history','YesNo'),
118
('EnableSearchHistory','0','','Enable or disable search history','YesNo'),
119
('EnhancedMessagingPreferences','0','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'),
119
('EnhancedMessagingPreferences','1','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'),
120
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
120
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
121
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
121
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
122
('ExpireReservesMaxPickUpDelayCharge','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'),
122
('ExpireReservesMaxPickUpDelayCharge','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+1 lines)
Lines 9807-9812 if ( CheckVersion($DBversion) ) { Link Here
9807
$DBversion = 'XXX';
9807
$DBversion = 'XXX';
9808
if ( CheckVersion($DBversion) ) {
9808
if ( CheckVersion($DBversion) ) {
9809
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES ('OPACEnhancedMessagingPreferences', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo')");
9809
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES ('OPACEnhancedMessagingPreferences', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo')");
9810
    $dbh->do("UPDATE systempreferences SET value =  '1' WHERE  variable = 'EnhancedMessagingPreferences'");
9810
    print "Upgrade to $DBversion done (Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC)\n";
9811
    print "Upgrade to $DBversion done (Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC)\n";
9811
    SetVersion($DBversion);
9812
    SetVersion($DBversion);
9812
}
9813
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-3 / +3 lines)
Lines 59-67 Patrons: Link Here
59
     -
59
     -
60
         - pref: EnhancedMessagingPreferences
60
         - pref: EnhancedMessagingPreferences
61
           choices:
61
           choices:
62
               yes: Allow
62
               yes: Show
63
               no: "Don't allow"
63
               no: "Don't show"
64
         - patrons to choose which notices they receive and when they receive them. Note that this only applies to certain kinds of notices.
64
         - "patron messaging setting on the intranet."
65
     -
65
     -
66
         - pref: ExtendedPatronAttributes
66
         - pref: ExtendedPatronAttributes
67
           choices:
67
           choices:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-6 / +6 lines)
Lines 20-26 Link Here
20
                </div>
20
                </div>
21
            </div>
21
            </div>
22
            <div class="span10">
22
            <div class="span10">
23
                [% IF (Authorized) %]
23
                [% IF Koha.Preference('OPACEnhancedMessagingPreferences') %]
24
                <div id="usermessaging">
24
                <div id="usermessaging">
25
                    <h3>Your messaging settings</h3>
25
                    <h3>Your messaging settings</h3>
26
                    [% IF ( settings_updated ) %]
26
                    [% IF ( settings_updated ) %]
Lines 30-36 Link Here
30
                        <input type="hidden" name="modify" value="yes" />
30
                        <input type="hidden" name="modify" value="yes" />
31
31
32
                            <table class="table table-bordered table-condensed table-striped">
32
                            <table class="table table-bordered table-condensed table-striped">
33
                                <tr><th>&nbsp;</th><th>Days in advance</th>[% IF ( SMSSendDriver ) %]<th>SMS</th>[% END %][% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]<th>Email</th><th>Digests only?</th><!-- <th>RSS</th> --><th>Do not notify</th></tr>
33
                                <tr><th>&nbsp;</th><th>Days in advance</th>[% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %][% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]<th>Phone</th>[% END %]<th>Email</th><th>Digests only?</th><!-- <th>RSS</th> --><th>Do not notify</th></tr>
34
                                [% FOREACH messaging_preference IN messaging_preferences %]
34
                                [% FOREACH messaging_preference IN messaging_preferences %]
35
                                    <tr>
35
                                    <tr>
36
                                        <td>[% IF ( messaging_preference.Item_Due ) %]Item due
36
                                        <td>[% IF ( messaging_preference.Item_Due ) %]Item due
Lines 54-60 Link Here
54
                                            <td>-</td>
54
                                            <td>-</td>
55
                                        [% END %]
55
                                        [% END %]
56
                                        [% IF ( messaging_preference.transport_sms ) %]
56
                                        [% IF ( messaging_preference.transport_sms ) %]
57
                                            [% IF ( SMSSendDriver ) %]
57
                                            [% IF Koha.Preference('SMSSendDriver') %]
58
                                                <td>
58
                                                <td>
59
                                                    [% IF ( messaging_preference.transports_sms ) %]
59
                                                    [% IF ( messaging_preference.transports_sms ) %]
60
                                                      <input type="checkbox" id="sms[% messaging_preference.message_attribute_id %]" name="[% messaging_preference.message_attribute_id %]" value="sms" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
60
                                                      <input type="checkbox" id="sms[% messaging_preference.message_attribute_id %]" name="[% messaging_preference.message_attribute_id %]" value="sms" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
Lines 64-70 Link Here
64
                                                </td>
64
                                                </td>
65
                                            [% END %]
65
                                            [% END %]
66
                                        [% END %]
66
                                        [% END %]
67
                                        [% IF ( TalkingTechItivaPhone ) %]
67
                                        [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]
68
                                            <td>
68
                                            <td>
69
                                              [% IF ( messaging_preference.transports_phone ) %]
69
                                              [% IF ( messaging_preference.transports_phone ) %]
70
                                              <input type="checkbox"
70
                                              <input type="checkbox"
Lines 110-116 Link Here
110
                        </table>
110
                        </table>
111
111
112
                        <fieldset class="rows">
112
                        <fieldset class="rows">
113
                        [% IF ( SMSSendDriver ) %]
113
                        [% IF Koha.Preference('SMSSendDriver') %]
114
                            <ol><li><label for="SMSnumber">SMS number:</label> <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" /></li></ol>
114
                            <ol><li><label for="SMSnumber">SMS number:</label> <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" /></li></ol>
115
                        [% END %]
115
                        [% END %]
116
                        </fieldset>
116
                        </fieldset>
Lines 122-128 Link Here
122
                </div> <!-- / #usermessaging -->
122
                </div> <!-- / #usermessaging -->
123
                [% ELSE %]
123
                [% ELSE %]
124
                    <h4>You are not allowed to call this page directly</h4>
124
                    <h4>You are not allowed to call this page directly</h4>
125
                    <span> To report this problem, you can <a href="mailto:[% admin %]">email the Koha Administrator</a>.</span>
125
                    <span> To report this problem, you can <a href="mailto:[% Koha.Preference('KohaAdminEmailAddress') %]">email the Koha Administrator</a>.</span>
126
                [% END %]
126
                [% END %]
127
            </div> <!-- / .span10 -->
127
            </div> <!-- / .span10 -->
128
        </div> <!-- / .row-fluid -->
128
        </div> <!-- / .row-fluid -->
(-)a/opac/opac-messaging.pl (-6 / +1 lines)
Lines 66-75 C4::Form::MessagingPreferences::set_form_values({ borrowernumber => $borrowe Link Here
66
# warn( Data::Dumper->Dump( [ $messaging_options ], [ 'messaging_options' ] ) );
66
# warn( Data::Dumper->Dump( [ $messaging_options ], [ 'messaging_options' ] ) );
67
$template->param( BORROWER_INFO         => [ $borrower ],
67
$template->param( BORROWER_INFO         => [ $borrower ],
68
                  messagingview         => 1,
68
                  messagingview         => 1,
69
                  SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'},
69
                  SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'});
70
                  SMSSendDriver                =>  C4::Context->preference("SMSSendDriver"),
71
                  TalkingTechItivaPhone        =>  C4::Context->preference("TalkingTechItivaPhoneNotification"),
72
                  admin                        =>  C4::Context->preference('KohaAdminEmailAddress'),
73
                  Authorized                   =>  C4::Context->preference('OPACEnhancedMessagingPreferences'));
74
70
75
output_html_with_http_headers $query, $cookie, $template->output;
71
output_html_with_http_headers $query, $cookie, $template->output;
76
- 

Return to bug 12528