mirror of
https://github.com/bringout/oca-ocb-security.git
synced 2026-04-22 02:32:03 +02:00
19.0 vanilla
This commit is contained in:
parent
20ddc1b4a3
commit
c0efcc53f5
1162 changed files with 125577 additions and 105287 deletions
|
|
@ -0,0 +1,23 @@
|
|||
import { Interaction } from "@web/public/interaction";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
import { addLoadingEffect } from "@web/core/utils/ui";
|
||||
|
||||
export class Signup extends Interaction {
|
||||
static selector = ".oe_signup_form, .oe_reset_password_form";
|
||||
dynamicContent = {
|
||||
_root: { "t-on-submit": this.onSubmit },
|
||||
};
|
||||
|
||||
onSubmit() {
|
||||
const submitEl = this.el.querySelector('.oe_login_buttons > button[type="submit"]');
|
||||
if (submitEl && !submitEl.disabled) {
|
||||
const removeLoadingEffect = addLoadingEffect(submitEl);
|
||||
this.registerCleanup(removeLoadingEffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registry
|
||||
.category("public.interactions")
|
||||
.add("auth_signup.signup", Signup);
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
odoo.define("auth_signup.reset_password", function (require) {
|
||||
"use strict";
|
||||
|
||||
var publicWidget = require("web.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"/> ');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
odoo.define('auth_signup.signup', function (require) {
|
||||
'use strict';
|
||||
|
||||
var publicWidget = require('web.public.widget');
|
||||
|
||||
publicWidget.registry.SignUpForm = publicWidget.Widget.extend({
|
||||
selector: '.oe_signup_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"/> ');
|
||||
},
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue