LP#1695062 - webstaff Make non-freetext required stat cats actually required
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Fri, 14 Jul 2017 17:25:44 +0000 (13:25 -0400)
committerKathy Lussier <klussier@masslnc.org>
Mon, 24 Jul 2017 19:17:44 +0000 (15:17 -0400)
In the Patron registration form this custom drop down needed to
have an ng-class attribute with the proper
object expression in order to do add class ng-invalid if the
stat cat was required and not there.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>

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

index 2b85fd0..76649b7 100644 (file)
@@ -861,7 +861,7 @@ within the "form" by name for validation.
     <div class="col-md-3 reg-field-input">
       <div ng-if="cat.entries().length != 0">
         <div class="btn-group" uib-dropdown>
-          <button type="button" class="btn btn-default" uib-dropdown-toggle>
+          <button type="button" class="btn btn-default" ng-class="{'ng-invalid': cat.required() == 1 && !stat_cat_entry_maps[cat.id()] }" uib-dropdown-toggle>
             <span style="padding-right: 5px;">
               {{stat_cat_entry_maps[cat.id()]}}</span>
             <span class="caret"></span>