Corrected KPAC hold notification code to allow for text messaging preferences.
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 11 Dec 2014 23:38:31 +0000 (18:38 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 10 Oct 2016 12:23:44 +0000 (08:23 -0400)
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates/kpac/getit.tt2

index 08a8ced..9ceef57 100644 (file)
 
                                  <!-- HIDDEN FIELDS FOR DEFAULT NOTIFICATION PREFERENCES -->
                                  [%- IF ctx.notify_method -%]
-                                     [%- IF ctx.notify_method == '' OR ctx.notify_method == 'phone:email' -%]
+                                     [%- IF ctx.notify_method == '' -%]
                                          [%- SET ctx.notify_method = 'email|phone' -%]
                                      [%- END -%]
                                  [%- ELSE -%]
                                      [%- SET ctx.notify_method = 'email|phone' -%]
                                  [%- END -%]
+
+
+                                 [% ctx.notify_method.search('email') ? 
+                                     '<input type="hidden" id="email_notify" name="email_notify" value="t"/>' : '' %]
+
+
+                                 [%- IF allow_phone_notifications == 'true' -%]
+                                     [% IF ctx.default_phone %]
+                                            [% phone_value = ctx.default_phone %]
+                                     [% ELSE %]
+                                            [% phone_value= ctx.user.day_phone %]
+                                     [% END %]
+                                                   
+                                     [% ctx.notify_method.search('phone') ? 
+                                          '<input type="hidden" id="phone_notify_checkbox" name="phone_notify_checkbox" value="t"/>
+                                            <input type="hidden" name="phone_notify" value="' _ phone_value _ '"/>' : '' %]
+                                 [%- END -%]
+
                                  
                                  [%- IF ctx.user.email -%]
                                       [% ctx.notify_method.search('email') ?