add VType for password confirmation

This commit is contained in:
Dietmar Maurer 2017-03-29 17:50:05 +02:00
parent 1d9804a953
commit 36704a2fcc

View File

@ -124,7 +124,18 @@ Ext.apply(Ext.form.field.VTypes, {
return true;
},
HostListText: gettext('Not a valid list of hosts')
HostListText: gettext('Not a valid list of hosts'),
password: function(val, field) {
if (field.initialPassField) {
var pwd = field.up('form').down(
'[name=' + field.initialPassField + ']');
return (val == pwd.getValue());
}
return true;
},
passwordText: gettext('Passwords do not match')
});
// ExtJs 5-6 has an issue with caching