X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=widgets%2FSecurePass.js;h=8190c7d8da269845f200d2a106cb64e6fd6870bf;hb=443623f47935eb52acd65a3ff0d84eab1fd5a98b;hp=ee82f4644972ebfb4665221d39c9c294030ec45e;hpb=933c4ed489eb4dd5870aa4cc75c6e395f6a85a04;p=Pman.Core diff --git a/widgets/SecurePass.js b/widgets/SecurePass.js index ee82f464..8190c7d8 100644 --- a/widgets/SecurePass.js +++ b/widgets/SecurePass.js @@ -77,7 +77,7 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, { onRender: function (ct, position) { Ext.form.SecurePass.superclass.onRender.call(this, ct, position); this.wrap = this.el.wrap({cls: 'x-form-field-wrap'}); - this.trigger = this.wrap.createChild({tag: 'div', cls: 'StrengthMeter ' + this.triggerClass}); + this.trigger = this.wrap.createChild({tag: 'div', cls: 'roo-strength-meter ' + this.triggerClass}); this.trigger.createChild({ tag: 'div', @@ -161,11 +161,7 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, { }, // private validateValue: function (value) { - Roo.log('validateValue'); - if(this.insecure){ - Roo.log('in'); - return true; - } + if (!Ext.form.TextField.superclass.validateValue.call(this, value)) { return false; } @@ -178,7 +174,12 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, { this.markInvalid(this.errors.PwdEmpty); return false; } - if ('[\x21-\x7e]*'.match(value)) { + + if(this.insecure){ + return true; + } + + if (value.match(/[\x21-\x7e]*/)) { this.markInvalid(this.errors.PwdBadChar); return false; }