From 1e633eaa8d3ef83f6bb60776b9b21463abbd8f38 Mon Sep 17 00:00:00 2001 From: Benny Born Date: Mon, 24 Feb 2020 12:45:57 +0100 Subject: [PATCH 1/4] Improve handling of palettes in DCA (fixes #10) --- src/Resources/contao/dca/tl_settings.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Resources/contao/dca/tl_settings.php b/src/Resources/contao/dca/tl_settings.php index 2654a8d..9846e1e 100755 --- a/src/Resources/contao/dca/tl_settings.php +++ b/src/Resources/contao/dca/tl_settings.php @@ -1,23 +1,29 @@ [ 'label' => &$GLOBALS['TL_LANG']['tl_settings']['recaptchaType'], 'inputType' => 'select', - 'options_callback' => function () + 'options_callback' => function () { return [ - 'invisible' => 'reCAPTCHA v2: Invisible', - 'recaptcha2' => 'reCAPTCHA v2: Checkbox', + 'invisible' => 'reCAPTCHA v2: Invisible', + 'recaptcha2' => 'reCAPTCHA v2: Checkbox', 'recaptcha3' => 'reCAPTCHA v3', ]; }, From 6253da514ac0d7e0da19a9390ed3d6730ee59c63 Mon Sep 17 00:00:00 2001 From: Benny Born Date: Mon, 24 Feb 2020 12:50:34 +0100 Subject: [PATCH 2/4] Remove "defer" and "async" on inline scripts (fixes #15) --- src/Resources/contao/templates/ce_background_recaptcha.html5 | 2 +- src/Resources/contao/templates/form_recaptcha.html5 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Resources/contao/templates/ce_background_recaptcha.html5 b/src/Resources/contao/templates/ce_background_recaptcha.html5 index 896e220..bdf7cc5 100644 --- a/src/Resources/contao/templates/ce_background_recaptcha.html5 +++ b/src/Resources/contao/templates/ce_background_recaptcha.html5 @@ -1,7 +1,7 @@ recaptchaType != 'recaptcha3') return; ?> - -