27 lines
746 B
JavaScript
27 lines
746 B
JavaScript
/** @odoo-module **/
|
|
|
|
import publicWidget from "@web/legacy/js/public/public_widget";
|
|
|
|
publicWidget.registry.ResetPasswordForm = publicWidget.Widget.extend({
|
|
selector: '.oe_reset_password_form',
|
|
events: {
|
|
'submit': '_onSubmit',
|
|
},
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Handlers
|
|
//--------------------------------------------------------------------------
|
|
|
|
/**
|
|
* @private
|
|
*/
|
|
_onSubmit: function () {
|
|
var $btn = this.$('.oe_login_buttons > button[type="submit"]');
|
|
if ($btn.prop("disabled")) {
|
|
return;
|
|
}
|
|
$btn.attr('disabled', 'disabled');
|
|
$btn.prepend('<i class="fa fa-refresh fa-spin"/> ');
|
|
},
|
|
});
|