Summary: | Notify user if leaving modified patron edit form without saving | ||
---|---|---|---|
Product: | Koha | Reporter: | Josef Moravec <josef.moravec> |
Component: | Templates | Assignee: | Josef Moravec <josef.moravec> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | albintk33, fraktik |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 23100: Add leave page confirmation to patron edit form
Bug 23100: Add leave page confirmation to patron edit form |
Description
Josef Moravec
2019-06-12 06:35:23 UTC
Created attachment 90526 [details] [review] Bug 23100: Add leave page confirmation to patron edit form Test plan: 1) Apply the patch 2) Try to edit a patron, change some value and try to go out without saving, you should be notified you have unsaved changes This patch seems to be working well and I think it's a good idea. However, the custom message doesn't appear for me in Firefox or Chrome. Is this expected? Is there a browser which will show the message defined in the template? Created attachment 90617 [details] [review] Bug 23100: Add leave page confirmation to patron edit form Test plan: 1) Apply the patch 2) Try to edit a patron, change some value and try to go out without saving, you should be notified you have unsaved changes For me,it works on chrome and firefox Signed-off-by: Bin Wen <bin.wen@inlibro.com> I've tried it in Firefox and Chrome, while both times I am asked for confirmation before leaving the page, it always shows the default message from the browser instead of the custom one. Josef, can you have a look? I might also change it to: You have modified this patron record, ... or You have made a change to this patron record... or similar. Looks like the parts of this patch related to adding a custom message can be removed: https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload#Browser_compatibility Hi Josef, do you have time for a follow-up with the change Owen suggested? Still a good idea, I think. Maybe someone would like to adopt? |