diff --git a/CHANGELOG.md b/CHANGELOG.md index a6f89a8..9a6ba43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ ### Code +- Changer + - Revert the checked state of a checkbox if an error occured + - Form - Migrate missing input fields to BrickChanger diff --git a/static/scripts/changer.js b/static/scripts/changer.js index ffa41ac..a32af76 100644 --- a/static/scripts/changer.js +++ b/static/scripts/changer.js @@ -174,6 +174,11 @@ class BrickChanger { console.log(error.message); this.status_error(error.message); + + // Reverse the checked state + if (this.html_type == "checkbox") { + this.html_element.checked = !this.html_element.checked; + } } } }