Bug 18692 - same with syspref TalkingTechItivaPhone
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 1 Jun 2017 15:22:42 +0000 (17:22 +0200)
committerMason James <mtj@kohaaloha.com>
Tue, 24 Oct 2017 03:42:13 +0000 (16:42 +1300)
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.

https://bugs.koha-community.org/show_bug.cgi?id=8692

Signed-off-by: Michael Andrew Cabus <michael@bywatersolutons.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt

index a653f2d..9a96585 100644 (file)
@@ -77,6 +77,7 @@
                                             [% END %]
                                         [% END %]
                                         [% IF ( TalkingTechItivaPhone ) %]
+                                            [% IF ( messaging_preference.transport_phone ) %]
                                             <td>
                                               [% IF ( messaging_preference.transports_phone ) %]
                                               <input type="checkbox"
@@ -90,6 +91,9 @@
                                                          value="phone" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
                                               [% END %]
                                             </td>
+                                            [% ELSE %]
+                                                <td>-</td>
+                                            [% END %]
                                         [% END %]
 
                                         [% IF ( messaging_preference.transport_email ) %]