[open-ils-commits] r13356 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jun 9 17:35:14 EDT 2009
Author: erickson
Date: 2009-06-09 17:35:09 -0400 (Tue, 09 Jun 2009)
New Revision: 13356
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
when using a text box and a value is required or regEx is defined, use a ValidationTextBox instead
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-06-09 20:54:36 UTC (rev 13355)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-06-09 21:35:09 UTC (rev 13356)
@@ -177,8 +177,13 @@
if(this._buildLinkSelector()) break;
default:
- dojo.require('dijit.form.TextBox');
- this.widget = new dijit.form.TextBox(this.dijitArgs, this.parentNode);
+ if(this.dijitArgs && (this.dijitArgs.required || this.dijitArgs.regExp)) {
+ dojo.require('dijit.form.ValidationTextBox');
+ this.widget = new dijit.form.ValidationTextBox(this.dijitArgs, this.parentNode);
+ } else {
+ dojo.require('dijit.form.TextBox');
+ this.widget = new dijit.form.TextBox(this.dijitArgs, this.parentNode);
+ }
}
}
More information about the open-ils-commits
mailing list