[IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files. Part-of: odoo/odoo#95500
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
'web.assets_frontend': [
|
||||
'google_recaptcha/static/src/scss/recaptcha.scss',
|
||||
'google_recaptcha/static/src/js/recaptcha.js',
|
||||
'google_recaptcha/static/src/xml/recaptcha.xml',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
odoo.define('google_recaptcha.ReCaptchaV3', function (require) {
|
||||
"use strict";
|
||||
|
||||
const ajax = require('web.ajax');
|
||||
const Class = require('web.Class');
|
||||
const core = require('web.core');
|
||||
const { session } = require('@web/session');
|
||||
const { loadJS } = require('@web/core/assets');
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
@@ -22,7 +22,7 @@ const ReCaptcha = Class.extend({
|
||||
*/
|
||||
loadLibs: function () {
|
||||
if (this._publicKey) {
|
||||
this._recaptchaReady = ajax.loadJS(`https://www.recaptcha.net/recaptcha/api.js?render=${this._publicKey}`)
|
||||
this._recaptchaReady = loadJS(`https://www.recaptcha.net/recaptcha/api.js?render=${this._publicKey}`)
|
||||
.then(() => new Promise(resolve => window.grecaptcha.ready(() => resolve())));
|
||||
return this._recaptchaReady.then(() => !!document.querySelector('.grecaptcha-badge'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user