patron reg stub buttons user/berick/lp1452950-web-client-patron-reg-wip
authorBill Erickson <berickxx@gmail.com>
Mon, 25 May 2015 23:42:44 +0000 (19:42 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 25 May 2015 23:42:44 +0000 (19:42 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2

index 4f840de..50db86c 100644 (file)
@@ -8,8 +8,15 @@
     <button type="button" class="btn btn-default">[% l('Save') %]</button>
     <button type="button" class="btn btn-default">[% l('Save & Clone') %]</button>
   </div>
-  <div class="pad-all-min"><a href>[% l('Show Only Required Field') %]</a></div>
-  <div class="pad-all-min"><a href>[% l('Show Suggested Field') %]</a></div>
+  <div class="pad-all-min" ng-show="!display_required_fields">
+    <a href>[% l('Show Only Required Fields') %]</a>
+  </div>
+  <div class="pad-all-min" ng-show="!display_suggested_fields">
+    <a href>[% l('Show Suggested Fields') %]</a>
+  </div>
+  <div class="pad-all-min" ng-show="!display_all_fields">
+    <a href>[% l('Show All Fields') %]</a>
+  </div>
   <fieldset id="reg-field-doc" ng-show="selected_field_doc">
     <legend>
     {{idl_fields[selected_field_doc.fm_class()][selected_field_doc.field()].label}}
   </div>
 
   <div class="col-md-3 patron-reg-example">
-    [% set_str = "org_settings['ui.patron.edit." _ 
-        cls _ "." _ field _ ".example']"; %]
-
-    <span ng-if="[% set_str %]">
-      [% l('Example: [_1]', "{{" _ set_str _ "}}") %]
-    </span>
-
-    [% IF field.match('phone') %]
-      <!-- phones have a fall-through example option -->
-      <span ng-if="![% set_str %]">
-        [% l('Example: [_1]', 
-         "{{org_settings['ui.patron.edit.phone.example']}}") %]
+
+    [% IF field == 'barcode' %]
+
+      <button class="btn btn-default">[% l('Replace Barcode') %]</button>
+      <button class="btn btn-default">[% l('See All') %]</button>
+
+    [% ELSIF field == 'password' %]
+
+      <button class="btn btn-default">[% l('Generate Password') %]</button>
+
+    [% ELSE %]
+      [% set_str = "org_settings['ui.patron.edit." _ 
+          cls _ "." _ field _ ".example']"; %]
+
+      <span ng-if="[% set_str %]">
+        [% l('Example: [_1]', "{{" _ set_str _ "}}") %]
       </span>
+
+      [% IF field.match('phone') %]
+        <!-- phones have a fall-through example option -->
+        <span ng-if="![% set_str %]">
+          [% l('Example: [_1]', 
+           "{{org_settings['ui.patron.edit.phone.example']}}") %]
+        </span>
+      [% END %]
     [% END %]
 
   </div>
     <input eg-date-input 
       class="form-control" ng-model="patron.expire_date"/>
   </div>
+  <div class="col-md-3">
+    <button class="btn btn-default">[% l('Update Expire Date') %]</button>
+  </div>
 </div>
 
 <!-- net_access_level -->
 [% formfield('aua', 'valid', 'mailing_address', 'checkbox') %]
 [% formfield('aua', 'within_city_limits', 'mailing_address', 'checkbox') %]
 
+<div class="row">
+  <button type="button" class="btn btn-success">[% l('New Address') %]</button>
+</div>
+
 <!-- pending address -->
 
 <div class="alert alert-success row" role="alert" ng-if="stat_cats.length > 0">