diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ce02c..66fbf1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,23 @@ # Changelog ## 3.0.0 - Unreleased -> {warning} The Excluded URI Patterns setting has been removed. Use the new Exclude Controller Actions setting instead. +> {warning} The “Excluded URI Patterns” setting has been removed. Use the new “Exclude Controller Actions” setting instead. -> {tip} The error screen has been updated. If you previously set a custom error message then it may need some tweaking. +> {tip} The error screen has been updated. If you previously set a custom error message then you should review the plugin settings. ### Added - Added a customisable error screen that allows users to resubmit their data if a submission is flagged as spam. -- Added an Exclude Controller Actions setting. -- Added an Allow List of IP addresses that will not be validated. +- Added an “Exclude Controller Actions” setting. +- Added an “Allow List” of IP addresses that will not be validated. - Added unit tests. ### Changed -- Changed minimum requirement of Craft to version 3.2.1. -- Renamed Blacklist to Deny List, a list of IP addresses that will always be denied. +- Changed the minimum requirement of Craft to version 3.2.1. +- Renamed “Blacklist” to “Deny List”, a list of IP addresses that will always be denied. - The hidden input field now has an `autocomplete` attribute set to `off`. ### Removed -- Removed the Excluded URI Patterns setting. Use the new Exclude Controller Actions setting instead. +- Removed the “Excluded URI Patterns” setting. Use the new “Exclude Controller Actions” setting instead. ## 2.3.1 - 2020-12-21 ### Changed diff --git a/src/models/SettingsModel.php b/src/models/SettingsModel.php index f2098c0..897f24b 100644 --- a/src/models/SettingsModel.php +++ b/src/models/SettingsModel.php @@ -67,7 +67,7 @@ class SettingsModel extends Model /** * @var int */ - public $minimumSubmitTime = 3; + public $minimumSubmitTime = 1; /** * @var array|string diff --git a/src/resources/js/error.js b/src/resources/js/error.js index 11142e7..3a77d1f 100644 --- a/src/resources/js/error.js +++ b/src/resources/js/error.js @@ -5,4 +5,4 @@ document.getElementById('graphic').classList.remove('hidden'); setTimeout(function() { document.getElementById('graphic').remove(); document.getElementById('resubmit').classList.remove('disabled'); -}, document.getElementById('resubmit').dataset.timeout); +}, document.getElementById('resubmit').dataset.timeout * 1000); diff --git a/src/templates/_error.html b/src/templates/_error.html index a2e7289..c70c43d 100644 --- a/src/templates/_error.html +++ b/src/templates/_error.html @@ -24,7 +24,7 @@

{{ settings.errorTitle }}

{{ craft.snaptcha.field }} - diff --git a/src/templates/_settings.html b/src/templates/_settings.html index 364e8e9..9bcaa3b 100644 --- a/src/templates/_settings.html +++ b/src/templates/_settings.html @@ -153,6 +153,7 @@ { type: 'text', heading: 'IP Address'|t('snaptcha'), + code: true, }, ], rows: settings.allowList, @@ -170,6 +171,7 @@ { type: 'text', heading: 'IP Address'|t('snaptcha'), + code: true, }, ], rows: settings.denyList,