2012-07-25 23:02:17 +00:00
|
|
|
openerp.auth_signup = function(instance) {
|
2014-01-21 15:20:27 +00:00
|
|
|
openerp.web.LoginForm.include({
|
|
|
|
start: function () {
|
2012-06-25 12:26:30 +00:00
|
|
|
var self = this;
|
2014-01-21 15:20:27 +00:00
|
|
|
this.$el.on('submit', function () {
|
|
|
|
var password = self.get_password_field('password');
|
|
|
|
var confirm_password = self.get_password_field('confirm_password');
|
|
|
|
if (password && confirm_password && (password.value != confirm_password.value)) {
|
|
|
|
alert("Passwords do not match; please retype them.");
|
2012-12-20 14:43:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
2012-08-06 15:38:32 +00:00
|
|
|
},
|
2014-01-21 15:20:27 +00:00
|
|
|
get_password_field: function (field) {
|
|
|
|
var selector = 'input[name="' + field + '"][type="password"]:visible';
|
|
|
|
return this.$(selector)[0];
|
2012-12-03 14:44:24 +00:00
|
|
|
},
|
|
|
|
});
|
2012-06-25 12:26:30 +00:00
|
|
|
};
|