From 9f4167c850b1ee6570c4368e8b89cd6c0d632312 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 25 May 2023 14:39:18 +0000 Subject: [PATCH] Bug 20859: Add SMSalertnumber to OPAC registration page This patch adds the SMS number field to patron self registration. To test: 1. Apply patch. 2. Make sure an SMSSendDriver 3. Go to the OPAC self registration form. 4. Notice the SMS Number field now appears. 5. Use the PatronSelfRegistrationBorrowerMandatoryField and PatronSelfRegistrationBorrowerUnwantedField system preferences to ensure you can hide the field and make it required. 6. Self register while adding a SMS number. Make sure that when you view the newly self-registered patron that the SMS number is properly populated in the staff interface. --- .../bootstrap/en/modules/opac-memberentry.tt | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index cacaaf671e..8d538b2398 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -214,7 +214,7 @@
- [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'middle_name' 'dateofbirth' 'initials' 'pronouns' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_streettype' 'B_streetnumber' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' ] %] + [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'middle_name' 'dateofbirth' 'initials' 'pronouns' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_streettype' 'B_streetnumber' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' 'smsalertnumber' ] %] [% IF mandatory.defined( field ) %] [% SET required.$field = 'required' %] [% END %] @@ -902,7 +902,26 @@ [% END %] + [% IF ( Koha.Preference('SMSSendDriver') ) && !hidden.defined('smsalertnumber') && action != 'edit' %] +
+
+
+ SMS number +
    + [% UNLESS hidden.defined('smsalertnumber') %] +
  1. + + +
    Required
    + Please enter numbers only. Prefix the number with + or 00 if including the country code. +
  2. + [% END %] +
+
+
+
+ [% END %] [% UNLESS action == 'edit' || hidden.defined('password') %]
-- 2.30.2