Soma Posted September 19, 2011 Posted September 19, 2011 This module checks for changes on forms in the PW admin and throws a confirm dialog before leaving page without saving.Thanks to Ryan for the new module name suggestion. Much better choice I think.The module can be configured to switched on or off the check for each of these areas:- Page Edit- Field Edit- Template Edit- Access Pages- Modules Settings(may this not was neccessary, but just for the fun of trying to do a configurable module, well I just did it) ### update 1.0.3 - fixed issue with delete button throwing the alert ### update 1.0.2 - fixed issue with script adding (again) - updated some texts and documentation #update 1.0.1- fixed issue with script adding- fixed subdir installation path- added script versioning Download: http://modules.processwire.com/modules/form-save-reminder/ Github: https://github.com/somatonic/FormSaveReminder 1
ryan Posted September 19, 2011 Posted September 19, 2011 Thanks for the update Soma! I look forward to installing this, and will be sure to update the module directory later today or tomorrow. Were you able to find a solution for the TinyMCE issue? NM, saw that you already answered this in the other thread.
Soma Posted September 20, 2011 Author Posted September 20, 2011 Just checked in on github, edited first post. Thanks. https://github.com/somatonic/FormSaveReminder
martinluff Posted September 21, 2011 Posted September 21, 2011 Nice work Philip, fills a useful gap IMO. Ryan, wonder if this one should make its way into the core at some point? 1
Soma Posted November 4, 2011 Author Posted November 4, 2011 I fixed some issue with the module not working on TinyMCE fields when editiing a page on deeper than 3th level. For some reason the FormSaveReminder.js which does the checks, was then getting applied after all the tinyMCE scripts and thus not working. (on higher levels it was appended before them) It took me many hours to realize this was the problem What's up with this Ryan? I did now change it to get inserted through str_replace just after JqueryCore script. I'm not sure how future proof this will be, but I guess the JqueryCore will never change. Latest version is now on github. Thanks EDIT: Just found that in Firefox it doesn't work with TinyMCE Fields at all... Firefox is almost like IE now, crap... 1
ryan Posted November 4, 2011 Posted November 4, 2011 What's up with this Ryan? Not sure how you had it before, but I think that the script would have to be added before ProcessPageEdit::execute rather than after. I'm not sure I understand about the level of the page–and can't think of any reason it would matter. But if you find it's doing this in a before(execute) hook, let me know and I'm sure we can track it down.
Soma Posted November 7, 2011 Author Posted November 7, 2011 Thanks Ryan for the Tip. It's an After Hook. I will later test this again with your suggestions.
Soma Posted June 4, 2012 Author Posted June 4, 2012 Made a little update to this module. I strongly encourage to update with the latest version. - unfortunately it stoped working in the latest PW since script/css version (..script.js?v=100) in the admin were introduced (1,5 months?). Since I have to manually str_replace the script tag into the header right after jquery core js, it failed because the string is now different :/. Changed it to use replace on another location/part of the code which will hopefully stay there. - added the admin root path to the script url, so it now also works on PW installed in a subdir. - added script versioning appended to file name ..?v=101. 2
Soma Posted September 30, 2013 Author Posted September 30, 2013 Minor update 1.0.3 to fix delete (move to trash) page button throwing the alert when form was modified before. 1
kongondo Posted January 27, 2014 Posted January 27, 2014 Soma, I don't think this is working in PW 2.3.14 (latest)....I don't get reminders to save..Only tested briefly in chrome...
horst Posted January 28, 2014 Posted January 28, 2014 tested with PW 2.3.14 Default-Install on Win7 FF26: doesn't work with all fields. it works with the title-, headline- and summary-field but doesn't with the body-field (TinyMCE)!
Soma Posted January 28, 2014 Author Posted January 28, 2014 I'm using this a lot and it works also with latest PW, even with TinyMCE (multilang textarea). Though I'm not sure if there's any potential issue.
Soma Posted November 6, 2014 Author Posted November 6, 2014 Just committed an update to the FormSaveReminder as it's an essential tool in your bag Changelog 1.0.4 - refactored code a bunch to simplify things - added support for CKeditor, regular and inline mode - made alert message translatable If you find any issues, please post in this thread or better open an issue on github . Next: - Look into PageTable, and why it's not triggering on changes. - if you find anything or want to help improve the module just shout For module developers To make sure your custom Inputfield works with FormSaveReminder, you'd have to make sure the input is triggering a change event. Sometimes this isn't the case if you simply change a value through js. You can after chaning a value use the $(element).trigger("change") to make sure FormSaveReminder will be able to detect a change. Thanks 2
Soma Posted November 17, 2014 Author Posted November 17, 2014 Note: new commit. 1.0.5 Hot bug fix for TinyMCE introduced in the last update. 3
horst Posted May 6, 2015 Posted May 6, 2015 Hi @soma, thanks for the continuous maintenance of this (and other) tool(s). This is one of my favourite modules. 1
Soma Posted March 3, 2016 Author Posted March 3, 2016 Note: New version 1.0.6 with a hotfix for CKEditors in inline mode not getting recognized anymore due to core and jquery changes it seems. http://modules.processwire.com/modules/form-save-reminder/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now