Sha256: 0ca48d2a97c916f83137e95d1f2668270fb5dda1f46300059f57c1a595cdeaaa
Contents?: true
Size: 901 Bytes
Versions: 46
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
46 entries across 46 versions & 2 rubygems