Sha256: d2ac996d9f46ff187b28033fd1b5222ba081c06af57d15e9776993c685de7e8e
Contents?: true
Size: 901 Bytes
Versions: 64
Compression:
Stored size: 901 Bytes
Contents
/** * Since the delete account has a modal to confirm it we need to copy the content of the * reason field to the hidden field in the form inside the modal. */ $(() => { const $deleteAccountForm = $(".delete-account"); const $deleteAccountModalForm = $(".delete-account-modal"); if ($deleteAccountForm.length > 0) { const $openModalButton = $(".open-modal-button"); const $modal = $("#deleteConfirm"); $openModalButton.on("click", (event) => { try { const reasonValue = $deleteAccountForm.find("textarea#delete_account_delete_reason").val(); $deleteAccountModalForm.find("input#delete_account_delete_reason").val(reasonValue); $modal.foundation("open"); } catch (error) { console.error(error); // eslint-disable-line no-console } event.preventDefault(); event.stopPropagation(); return false; }); } });
Version data entries
64 entries across 64 versions & 1 rubygems