LP#1759352-webstaff fix checkout specific due date UX user/cesardv/lp1759352_webstaff_specific_due_date_ux
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Fri, 30 Mar 2018 15:32:45 +0000 (11:32 -0400)
committerCesar Velez <cesar.velez@equinoxinitiative.org>
Fri, 30 Mar 2018 15:32:45 +0000 (11:32 -0400)
The Date Options dropdown UI added as a result of bug 1717025
hides the state of the "checkboxes" for custom due date and
the datepicker wasn't disabled when custom due date was disabled.
This addresses these UX issues, to that the user has visual feedback
as to the state of that option.

Cesar Velez <cesar.velez@equinoxinitiative.org>

Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2

index f52451d..85df24c 100644 (file)
@@ -41,7 +41,7 @@
 
 <div class="input-group">
 <div class="input-group-btn" uib-dropdown>
-      <button type="button" class="btn btn-default" uib-dropdown-toggle>
+      <button type="button" ng-class="{'btn-success' : date_options.has_sticky_date}" class="btn btn-default" uib-dropdown-toggle>
         [% l('Date Options') %]
         <span class="caret"></span>
       </button>
@@ -77,7 +77,8 @@
       </div> -->
       <!-- FIXME: This needs a time component as well, but type="datetime" 
             is not yet supported by any browsers -->
-      <div><eg-date-input ng-model="checkoutArgs.due_date"></eg-date-input>
+      <div>
+        <eg-date-input ng-model="checkoutArgs.due_date" ng-disabled="!date_options.has_sticky_date"></eg-date-input>
       </div>
 </div>
     </div>