lp1903424 Bootstrap opac notification methods not saving
authorGarry Collum <gcollum@gmail.com>
Sun, 8 Nov 2020 01:16:42 +0000 (20:16 -0500)
committerJane Sandberg <sandbej@linnbenton.edu>
Fri, 18 Dec 2020 18:51:07 +0000 (10:51 -0800)
The hold and email hold notification methods in the Bootstrap opac do not save to the database.
This patch fixes that behavior.

To test in concerto.
1. Enter an email address into a patron record.
2. Place a hold in the Bootstrap Opac logged in as this patron.
3. For notification, select Yes for email, and Yes by phone. Enter a phone number.
4. Go to the staff interface and observe that the hold for this patron does not have the Notifications Phone set, and Notify by Email is No.
5. Apply the patch.
6. Place another hold for this patron using the same notification settings.  The Notifications Phone is now set, and Notify by Email is yes.
7. Use a combination of notification settings for other holds to verify that setting a phone or email notification method is set or not depending on what is selected.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>

Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2

index 419e7c1..a0387bc 100755 (executable)
@@ -216,7 +216,7 @@ function maybeToggleNumCopies(obj) {
             <span class="font-weight-bold">[% l('Notify when hold is ready for pickup?') %]</span>
             <p>
              <div class="form-check m-2">
-                <input class="form-check-input" type="checkbox" value="" id="email_notify"  [% IF !ctx.user.email %]disabled="true"[% ELSIF ctx.default_email_notify %]checked="checked"[% END %]>
+                <input class="form-check-input" type="checkbox" value="t" id="email_notify" name="email_notify" [% IF !ctx.user.email %]disabled="true"[% ELSIF ctx.default_email_notify %]checked="checked"[% END %]>
                 <label class="form-check-label" for="email_notify">
                    [% l('Yes, by Email') %]
 
@@ -230,7 +230,7 @@ function maybeToggleNumCopies(obj) {
                 </p>
                 [%- IF allow_phone_notifications == 'true' %]
                 <div class="form-check m-2">
-                    <input class="form-check-input" type="checkbox" value="" id="phone_notify_checkbox"  [% IF ctx.default_phone_notify %]checked="checked"[% END %]>
+                    <input class="form-check-input" type="checkbox" id="phone_notify_checkbox" name="phone_notify_checkbox" [% IF ctx.default_phone_notify %]checked="checked"[% END %]>
                     <label class="form-check-label" for="phone_notify_checkbox">
                     [% l('Yes, by Phone') %]
                     </label>