mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
FIX: NoCaptcha fields
This commit is contained in:
parent
172ef3395a
commit
8a9516cb78
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
125
dist/records.json
vendored
125
dist/records.json
vendored
@ -72,6 +72,56 @@
|
||||
831
|
||||
]
|
||||
},
|
||||
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./node_modules/.pnpm/@a2nt/meta-lightbox@2.7.1/node_modules/@a2nt/meta-lightbox/src/scss/app.scss": [
|
||||
{
|
||||
"chunks": {
|
||||
"byName": {
|
||||
"mini-css-extract-plugin": 323
|
||||
},
|
||||
"bySource": {
|
||||
"0 mini-css-extract-plugin": 323
|
||||
},
|
||||
"usedIds": [
|
||||
323
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./node_modules/.pnpm/babel-loader@8.2.2_3ea652ad0eeb1c91bd4bd943f4964921/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/runtime/api.js": 254,
|
||||
"./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./node_modules/.pnpm/@a2nt/meta-lightbox@2.7.1/node_modules/@a2nt/meta-lightbox/src/scss/app.scss": 953
|
||||
},
|
||||
"usedIds": [
|
||||
254,
|
||||
953
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/_components/_ui.map.scss": [
|
||||
{
|
||||
"chunks": {
|
||||
"byName": {
|
||||
"mini-css-extract-plugin": 323
|
||||
},
|
||||
"bySource": {
|
||||
"0 mini-css-extract-plugin": 323
|
||||
},
|
||||
"usedIds": [
|
||||
323
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./node_modules/.pnpm/babel-loader@8.2.2_3ea652ad0eeb1c91bd4bd943f4964921/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/runtime/api.js": 254,
|
||||
"./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/_components/_ui.map.scss": 140
|
||||
},
|
||||
"usedIds": [
|
||||
140,
|
||||
254
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/app.scss": [
|
||||
{
|
||||
"chunks": {
|
||||
@ -99,6 +149,81 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/types/cms.scss": [
|
||||
{
|
||||
"chunks": {
|
||||
"byName": {
|
||||
"mini-css-extract-plugin": 323
|
||||
},
|
||||
"bySource": {
|
||||
"0 mini-css-extract-plugin": 323
|
||||
},
|
||||
"usedIds": [
|
||||
323
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./node_modules/.pnpm/babel-loader@8.2.2_3ea652ad0eeb1c91bd4bd943f4964921/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/runtime/api.js": 254,
|
||||
"./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/types/cms.scss": 209
|
||||
},
|
||||
"usedIds": [
|
||||
209,
|
||||
254
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/types/editor.scss": [
|
||||
{
|
||||
"chunks": {
|
||||
"byName": {
|
||||
"mini-css-extract-plugin": 323
|
||||
},
|
||||
"bySource": {
|
||||
"0 mini-css-extract-plugin": 323
|
||||
},
|
||||
"usedIds": [
|
||||
323
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./node_modules/.pnpm/babel-loader@8.2.2_3ea652ad0eeb1c91bd4bd943f4964921/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/runtime/api.js": 254,
|
||||
"./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/types/editor.scss": 98
|
||||
},
|
||||
"usedIds": [
|
||||
98,
|
||||
254
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/types/order.scss": [
|
||||
{
|
||||
"chunks": {
|
||||
"byName": {
|
||||
"mini-css-extract-plugin": 323
|
||||
},
|
||||
"bySource": {
|
||||
"0 mini-css-extract-plugin": 323
|
||||
},
|
||||
"usedIds": [
|
||||
323
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./node_modules/.pnpm/babel-loader@8.2.2_3ea652ad0eeb1c91bd4bd943f4964921/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/runtime/api.js": 254,
|
||||
"./node_modules/.pnpm/css-loader@5.0.1_webpack@5.11.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.0_node-sass@5.0.0+webpack@5.11.1/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./src/scss/types/order.scss": 558
|
||||
},
|
||||
"usedIds": [
|
||||
254,
|
||||
558
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./node_modules/.pnpm/babel-loader@8.2.2_3ea652ad0eeb1c91bd4bd943f4964921/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/bootstrap@4.5.3_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/alert.js": 6,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
||||
"version": "2.8.1",
|
||||
"version": "2.8.2",
|
||||
"author": "Tony Air <tony@twma.pro>",
|
||||
"license": "MIT",
|
||||
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
||||
|
@ -18,7 +18,19 @@ const NoCaptcha = (($) => {
|
||||
ui.dispose();
|
||||
|
||||
console.log(`${NAME}: init`);
|
||||
|
||||
if ($('.g-recaptcha').length && typeof grecaptcha === 'undefined') {
|
||||
console.log(`${NAME}: Loading Captcha API`);
|
||||
|
||||
$.getScript(
|
||||
'https://www.google.com/recaptcha/api.js?render=explicit&hl=en&onload=noCaptchaFieldRender',
|
||||
() => {
|
||||
this.renderCaptcha();
|
||||
},
|
||||
);
|
||||
} else {
|
||||
this.renderCaptcha();
|
||||
}
|
||||
}
|
||||
|
||||
static dispose() {
|
||||
@ -28,12 +40,13 @@ const NoCaptcha = (($) => {
|
||||
static renderCaptcha() {
|
||||
console.log(`${NAME}: Rendering Captcha`);
|
||||
|
||||
if (typeof grecaptcha === 'undefined') {
|
||||
console.log(`${NAME}: Captcha API isn't available yet`);
|
||||
}
|
||||
|
||||
const $_noCaptchaFields = $('.g-recaptcha');
|
||||
|
||||
if (!$('.g-recaptcha').length) {
|
||||
console.log(`${NAME}: No Captcha fields`);
|
||||
return;
|
||||
}
|
||||
|
||||
const submitListener = (e) => {
|
||||
const $field = $(e.currentTarget).find('.g-recaptcha');
|
||||
grecaptcha.execute($field.data('widgetid'));
|
||||
@ -42,7 +55,7 @@ const NoCaptcha = (($) => {
|
||||
$_noCaptchaFields.each((i, field) => {
|
||||
const $field = $(field);
|
||||
|
||||
if ($field.data('widgetid')) {
|
||||
if ($field.data('widgetid') || $field.html().length) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -62,7 +75,7 @@ const NoCaptcha = (($) => {
|
||||
}
|
||||
}
|
||||
|
||||
$(W).on(`${Events.AJAX}`, () => {
|
||||
$(W).on(`${NAME}.init ${Events.AJAX} ${Events.LOADED}`, () => {
|
||||
NoCaptcha.init();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user