Skip to content

Commit 45c82a8

Browse files
committed
5465 remove Saving state
1 parent e17358d commit 45c82a8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/javascript/controllers/audit_duplicates_controller.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ export default class extends Controller {
44
connect() {
55
this.boundHandleSubmit = this.handleSubmit.bind(this)
66
this.element.addEventListener("submit", this.boundHandleSubmit)
7+
8+
// Disable Rails UJS for this form to prevent "Saving" state
9+
this.element.removeAttribute('data-remote')
10+
11+
// Remove data-disable-with from all submit buttons
12+
const buttons = this.element.querySelectorAll('input[type="submit"], button[type="submit"]')
13+
buttons.forEach(button => {
14+
button.removeAttribute('data-disable-with')
15+
})
716
}
817

918
handleSubmit(event) {

0 commit comments

Comments
 (0)