Bug 19857: Use BorrowerUnwantedField system preference for SMS provider selection
authorLari Taskula <lari.taskula@jns.fi>
Thu, 21 Dec 2017 11:56:34 +0000 (13:56 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 22 Dec 2017 16:15:38 +0000 (13:15 -0300)
Optionally hide SMS provider field in patron modification screen with
BorrowerUnwantedField system preference.

To test:
1. Apply patch
2. Append BorrowerUnwantedField with sms_provider_id and save changes
3. Go to patron modification screen in staff client
4. Observe the SMS provider selection is now hidden

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

index 8a17653..468370c 100644 (file)
@@ -1241,6 +1241,7 @@ $(document).ready(function() {
         <p><label for="SMSnumber">SMS number:</label>
             <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" />
         </p>
+        [% UNLESS nosms_provider_id %]
         <p>
             <label for="sms_provider_id">SMS provider:</label>
             <select id="sms_provider_id" name="sms_provider_id"/>
@@ -1254,6 +1255,7 @@ $(document).ready(function() {
                 [% END %]
             </select>
         </p>
+        [% END %]
     [% END %]
   </fieldset>
 [% END %] [% END %]