honoring IDL 'required' attr for autofieldwidget for styling
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Aug 2010 20:19:47 +0000 (20:19 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Aug 2010 20:19:47 +0000 (20:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17105 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js

index 57d9cc2..b033f49 100644 (file)
@@ -515,7 +515,7 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
             if(this.onload)
                 this.onload(this.widget, this);
 
-            if(!this.readOnly && this.dijitArgs && this.dijitArgs.required) {
+            if(!this.readOnly && (this.idlField.required || (this.dijitArgs && this.dijitArgs.required))) {
                 // a required dijit is not given any styling to indicate the value
                 // is invalid until the user has focused the widget then left it with
                 // invalid data.  This change tells dojo to pretend this focusing has