jquery.AreYouSure icon indicating copy to clipboard operation
jquery.AreYouSure copied to clipboard

Check for dirty fields in modal dialog

Open AkinOlawale opened this issue 6 years ago • 1 comments

How can i enable the are you sure check in a modal dialog? Currently what happens is that it only displays the are you sure check when i close the dialog and try to either re-load or switch pages.

AkinOlawale avatar Nov 09 '18 08:11 AkinOlawale

I found a way around this.

  1. I turned on the silent mode using $('#form').areYouSure({'silent': true});
  2. Then i used this hasClass('dirty') to check if the form is dirty
  3. Then i added a fancy box to alert the user before proceeding to close the modal dialog

AkinOlawale avatar Nov 09 '18 09:11 AkinOlawale