Mercurial > lada > lada-client
diff app/view/widget/base/TextField.js @ 1144:5ceb0381ae73
Set a regex and required for ortszuordnungstyp field.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 27 May 2016 14:51:12 +0200 |
parents | d6e259e76de6 |
children | bfdc00c24baf |
line wrap: on
line diff
--- a/app/view/widget/base/TextField.js Thu May 26 14:56:41 2016 +0200 +++ b/app/view/widget/base/TextField.js Fri May 27 14:51:12 2016 +0200 @@ -28,7 +28,7 @@ enforceMaxLength: this.enforceMaxLength || true, fieldLabel: this.fieldLabel, labelWidth: this.labelWidth, - readOnly: this.readOnly || false, + readOnly: this.readOnly || false, listeners: this.listeners }, { xtype: 'image', @@ -46,6 +46,12 @@ hidden: true }]; this.callParent(arguments); + if (this.regex) { + Ext.apply(this.down('textfield'), {regex: this.regex}); + } + if (this.allowBlank === false) { + Ext.apply(this.down('textfield'), {allowBlank: this.allowBlank}); + } }, showWarnings: function(warnings) {