Skip to content

Commit 7011aee

Browse files
committed
1.3.2
1 parent 0920e9f commit 7011aee

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cloudgrayau/oopspam",
33
"description": "OOPSpam Anti-Spam for Craft CMS",
44
"type": "craft-plugin",
5-
"version": "1.3.1",
5+
"version": "1.3.2",
66
"keywords": [
77
"craft",
88
"cms",

src/controllers/LogsController.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class LogsController extends Controller {
1717

1818
public function actionIndex(): void {
1919
Craft::$app->response->redirect(UrlHelper::url('oopspam/logs'))->send();
20+
exit();
2021
}
2122

2223
public function actionUpdate(): void {
@@ -45,8 +46,10 @@ public function actionLogs(): Response {
4546
$settings = OOPSpam::$plugin->getSettings();
4647
$js = <<<JS
4748
$('#main-form').submit(function(e){
48-
if (confirm('Are you sure you wish to delete the selected logs?')){
49-
return true;
49+
if ($('input[name="deleteLogs[]"]:checked').length){
50+
if (confirm('Are you sure you wish to delete the selected logs?')){
51+
return true;
52+
}
5053
}
5154
return false;
5255
});
@@ -126,7 +129,8 @@ public function actionLog(int $id): Response {
126129
'id' => $id
127130
]);
128131
} else {
129-
throw new NotFoundHttpException('Page not found.');
132+
Craft::$app->response->redirect(UrlHelper::url('oopspam/logs'))->send();
133+
exit();
130134
}
131135
}
132136

src/templates/settings/_includes/security.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@
5656
const $numInput = $('#settings-spamScore-num');
5757
$rangeInput.on('input', () => {
5858
$numInput.val($rangeInput.val());
59+
$numInput.trigger('change');
5960
});
6061
$numInput.on('input', () => {
6162
$rangeInput.val($numInput.val());
6263
});
6364
$numInput.on('blur', () => {
6465
$numInput.val($rangeInput.val());
66+
$numInput.trigger('change');
6567
});
6668
})();
6769
{% endjs %}

0 commit comments

Comments
 (0)