diff --git a/app/javascript/controllers/modal_controller.js b/app/javascript/controllers/modal_controller.js index 5ee48b9..cd37d81 100644 --- a/app/javascript/controllers/modal_controller.js +++ b/app/javascript/controllers/modal_controller.js @@ -3,9 +3,6 @@ import { Controller } from "@hotwired/stimulus" // Generic modal controller for showing/hiding modal dialogs export default class extends Controller { static targets = ["dialog"] - static values = { - refreshOnClose: { type: Boolean, default: false } - } show(event) { // If called from a button with data-modal-id, find and show that modal @@ -14,8 +11,6 @@ export default class extends Controller { const modal = document.getElementById(modalId); if (modal) { modal.classList.remove("hidden"); - // Store the refresh preference from the button - this.refreshOnCloseValue = event.currentTarget?.dataset?.refreshOnClose === "true"; } } else if (this.hasDialogTarget) { // Otherwise show the dialog target @@ -36,11 +31,6 @@ export default class extends Controller { } else { this.element.classList.add("hidden"); } - - // Refresh page if requested - if (this.refreshOnCloseValue) { - window.location.reload(); - } } // Close modal when clicking backdrop