Skip to content

Commit bfefb52

Browse files
committed
v0.5.9: Fix CSRF error - only disable buttons, not inputs
- Don't disable CSRF token input during form submission - Only disable buttons to prevent double-click
1 parent 74c72d3 commit bfefb52

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

django_forms_workflows/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Enterprise-grade, database-driven form builder with approval workflows
44
"""
55

6-
__version__ = "0.5.8"
6+
__version__ = "0.5.9"
77
__author__ = "Django Forms Workflows Contributors"
88
__license__ = "LGPL-3.0-only"
99

django_forms_workflows/templates/django_forms_workflows/approve.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ <h5 class="mb-0">Your Decision</h5>
132132
actionButtons.classList.add('d-none');
133133
loadingSpinner.classList.remove('d-none');
134134

135-
// Disable all form inputs to prevent double submission
136-
const inputs = form.querySelectorAll('input, textarea, button');
137-
inputs.forEach(function(input) {
138-
input.disabled = true;
135+
// Disable only buttons to prevent double-click (not inputs - that breaks CSRF)
136+
const buttons = form.querySelectorAll('button');
137+
buttons.forEach(function(btn) {
138+
btn.disabled = true;
139139
});
140140
});
141141
});

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-forms-workflows"
3-
version = "0.5.8"
3+
version = "0.5.9"
44
description = "Enterprise-grade, database-driven form builder with approval workflows and external data integration"
55
license = "LGPL-3.0-only"
66
readme = "README.md"

0 commit comments

Comments
 (0)