LP#1356477: move email receipt checkbox on patron editor
authorGalen Charlton <gmc@esilibrary.com>
Thu, 4 Aug 2016 16:07:14 +0000 (12:07 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 24 Aug 2016 21:58:47 +0000 (17:58 -0400)
This patch updates the patron editor so that the checkbox
for setting whether the user wishes to get email checkout
receipts by default is moved next to the email address
input.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2

index d6345b0..5543e9d 100644 (file)
@@ -334,6 +334,17 @@ within the "form" by name for validation.
   </div>
 </div>
 
+<div class="row reg-field-row" ng-show="show_field('au.email') && opt_in_setting_types['circ.send_email_checkout_receipts']">
+  <div class="col-md-3 reg-field-label">
+    <label>{{opt_in_setting_types['circ.send_email_checkout_receipts'].label()}}</label>
+  </div>
+  <div class="col-md-3 reg-field-input">
+    <input
+      ng-change="field_modified()"
+      type='checkbox' ng-model="user_settings['circ.send_email_checkout_receipts']"/>
+  </div>
+</div>
+
 <!-- DAY_PHONE -->
 
 <div class="row reg-field-row" ng-show="show_field('au.day_phone')">
@@ -657,10 +668,10 @@ within the "form" by name for validation.
 </div>
 
 <div class="row reg-field-row" ng-repeat="type in opt_in_setting_types">
-  <div class="col-md-3 reg-field-label">
+  <div class="col-md-3 reg-field-label" ng-if="type.name() != 'circ.send_email_checkout_receipts'">
     <label>{{type.label()}}</label>
   </div>
-  <div class="col-md-3 reg-field-input">
+  <div class="col-md-3 reg-field-input" ng-if="type.name() != 'circ.send_email_checkout_receipts'">
     <input 
       ng-change="field_modified()" 
       type='checkbox' ng-model="user_settings[type.name()]"/>