seminars icon indicating copy to clipboard operation
seminars copied to clipboard

Edit seminar series with no frequency forces unnecessary confirmation

Open AndrewVSutherland opened this issue 4 years ago • 0 comments

If you go to the Edit Series page of a seminar series with periodicity set to No fixed schedule you are warned about unsaved changes when navigating away even when there are no unsaved changes. You can reproduce this by going to

https://researchseminars.org/edit/seminar/?shortname=TestSeries

and then clicking the View series tab. This problem only seems to happen when the frequency is set to 0) and is caused by the prevent_unsaved macro detecting a difference in the form serializations between the initial load and the attempt to navigate away. There is java script logic that is executed on form load (and on window refresh) that depends on the setting of frequency, but I don't think any of it changes any form values (and even if it does, I'm not sure what the best fix is).

AndrewVSutherland avatar Jul 22 '20 15:07 AndrewVSutherland