From f5993346970daa22e66094821a4392445ced6189 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Wed, 31 May 2017 17:03:54 +0300 Subject: [PATCH] Bug 18692: (follow-up) Fix misplaced columns and add this feature for phone as well Fixes misplaced columns introduced by previous patch and adds the "-" for phone transport type. To test: 1. Set SMSSendDriver system preference on 2. Go to intra and OPAC messaging preferences 3. By default you should see checkboxes for all messages for SMS 4. Ensure columns are not misplaced (pushing one column too much to the right) 5. Delete sms method from one of the messages in message_transports table 6. Observe that "-" is displayed instead of checkbox for that message for SMS 7. Repeat same for TalkingTechItivaPhoneNotification system preference. By default it may not have transports in message_transports, so make sure to assign some in order to have the checkboxes visible. --- .../prog/en/includes/messaging-preference-form.inc | 20 ++++++++++++++++---- .../opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 8 +++++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc index a5da438..70761a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc @@ -63,7 +63,9 @@ $(document).ready(function(){ - [% END %] - [% IF Koha.Preference('SMSSendDriver') %] + [% IF Koha.Preference('SMSSendDriver') %] + [% IF ( messaging_preference.transport_sms ) %] + [% IF ( messaging_form_inactive ) %] [% IF ( messaging_preference.transports_sms ) %] [% END %] [% END %] - [% END %] + + [% ELSE %] + - + [% END %] + [% END %] - [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %] + [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %] + [% IF ( messaging_preference.transport_phone ) %] + [% IF ( messaging_form_inactive ) %] [% IF ( messaging_preference.transports_phone ) %] [% END %] [% END %] - [% END %] + + [% ELSE %] + - + [% END %] + [% END %] [% IF ( messaging_preference.transport_email ) %] 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 32d1416..a487750 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -64,6 +64,7 @@ - [% END %] [% IF ( SMSSendDriver ) %] + [% IF ( messaging_preference.transport_sms ) %] [% IF ( messaging_preference.transports_sms ) %] @@ -71,10 +72,12 @@ [% END %] - [% ELSE %] + [% ELSE %] - + [% END %] [% END %] [% IF ( TalkingTechItivaPhone ) %] + [% IF ( messaging_preference.transport_phone ) %] [% IF ( messaging_preference.transports_phone ) %] [% END %] + [% ELSE %] + - + [% END %] [% END %] [% IF ( messaging_preference.transport_email ) %] -- 2.7.4