Bugzilla – Attachment 36818 Details for
Bug 12528
Enable staff to deny message setting access to patrons on the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix koha plugin to access system pref. and EnhancedMessagingPreferences description
Fix-koha-plugin-to-access-system-pref-and-Enhanced.patch (text/plain), 8.83 KB, created by
simith.doliveira
on 2015-03-11 17:20:05 UTC
(
hide
)
Description:
Fix koha plugin to access system pref. and EnhancedMessagingPreferences description
Filename:
MIME Type:
Creator:
simith.doliveira
Created:
2015-03-11 17:20:05 UTC
Size:
8.83 KB
patch
obsolete
>From ed599b33aaec3ea7b91fb6bfc0cc6f3c873645d4 Mon Sep 17 00:00:00 2001 >From: simith <simith@inlibro.com> >Date: Wed, 11 Mar 2015 13:18:26 -0400 >Subject: [PATCH] Fix koha plugin to access system pref. and > EnhancedMessagingPreferences description > >http://bugs.koha-community.org/show_bug.cgi?id=12528 >--- > installer/data/mysql/sysprefs.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 1 + > .../prog/en/modules/admin/preferences/patrons.pref | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 12 ++++++------ > opac/opac-messaging.pl | 6 +----- > 5 files changed, 12 insertions(+), 15 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 93cff15..bab7994 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -116,7 +116,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'), > ('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''), > ('EnableSearchHistory','0','','Enable or disable search history','YesNo'), >-('EnhancedMessagingPreferences','0','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'), >+('EnhancedMessagingPreferences','1','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'), > ('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'), > ('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'), > ('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'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 011eb90..dadca32 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9807,6 +9807,7 @@ if ( CheckVersion($DBversion) ) { > $DBversion = 'XXX'; > if ( CheckVersion($DBversion) ) { > $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES ('OPACEnhancedMessagingPreferences', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo')"); >+ $dbh->do("UPDATE systempreferences SET value = '1' WHERE variable = 'EnhancedMessagingPreferences'"); > print "Upgrade to $DBversion done (Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC)\n"; > SetVersion($DBversion); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 3799423..6883128 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -59,9 +59,9 @@ Patrons: > - > - pref: EnhancedMessagingPreferences > choices: >- yes: Allow >- no: "Don't allow" >- - patrons to choose which notices they receive and when they receive them. Note that this only applies to certain kinds of notices. >+ yes: Show >+ no: "Don't show" >+ - "patron messaging setting on the intranet." > - > - pref: ExtendedPatronAttributes > choices: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index 5656d35..866ec91 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -20,7 +20,7 @@ > </div> > </div> > <div class="span10"> >- [% IF (Authorized) %] >+ [% IF Koha.Preference('OPACEnhancedMessagingPreferences') %] > <div id="usermessaging"> > <h3>Your messaging settings</h3> > [% IF ( settings_updated ) %] >@@ -30,7 +30,7 @@ > <input type="hidden" name="modify" value="yes" /> > > <table class="table table-bordered table-condensed table-striped"> >- <tr><th> </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> >+ <tr><th> </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> > [% FOREACH messaging_preference IN messaging_preferences %] > <tr> > <td>[% IF ( messaging_preference.Item_Due ) %]Item due >@@ -54,7 +54,7 @@ > <td>-</td> > [% END %] > [% IF ( messaging_preference.transport_sms ) %] >- [% IF ( SMSSendDriver ) %] >+ [% IF Koha.Preference('SMSSendDriver') %] > <td> > [% IF ( messaging_preference.transports_sms ) %] > <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;" /> >@@ -64,7 +64,7 @@ > </td> > [% END %] > [% END %] >- [% IF ( TalkingTechItivaPhone ) %] >+ [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %] > <td> > [% IF ( messaging_preference.transports_phone ) %] > <input type="checkbox" >@@ -110,7 +110,7 @@ > </table> > > <fieldset class="rows"> >- [% IF ( SMSSendDriver ) %] >+ [% IF Koha.Preference('SMSSendDriver') %] > <ol><li><label for="SMSnumber">SMS number:</label> <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" /></li></ol> > [% END %] > </fieldset> >@@ -122,7 +122,7 @@ > </div> <!-- / #usermessaging --> > [% ELSE %] > <h4>You are not allowed to call this page directly</h4> >- <span> To report this problem, you can <a href="mailto:[% admin %]">email the Koha Administrator</a>.</span> >+ <span> To report this problem, you can <a href="mailto:[% Koha.Preference('KohaAdminEmailAddress') %]">email the Koha Administrator</a>.</span> > [% END %] > </div> <!-- / .span10 --> > </div> <!-- / .row-fluid --> >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index d365e32..a8c4b43 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -66,10 +66,6 @@ C4::Form::MessagingPreferences::set_form_values({ borrowernumber => $borrowe > # warn( Data::Dumper->Dump( [ $messaging_options ], [ 'messaging_options' ] ) ); > $template->param( BORROWER_INFO => [ $borrower ], > messagingview => 1, >- SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'}, >- SMSSendDriver => C4::Context->preference("SMSSendDriver"), >- TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"), >- admin => C4::Context->preference('KohaAdminEmailAddress'), >- Authorized => C4::Context->preference('OPACEnhancedMessagingPreferences')); >+ SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'}); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12528
:
29505
|
30259
|
30348
|
30349
|
30487
|
31047
|
36511
|
36512
|
36513
|
36818
|
44302
|
44820
|
44826
|
45885
|
45886
|
45962
|
46003
|
46015
|
46082
|
46156
|
46217
|
46218
|
50649
|
50650
|
50651
|
50652
|
50988
|
50989
|
51000
|
51001
|
51002
|
51003
|
51004