Bug 14473 - Warning about unsaved changes in cataloging
Summary: Warning about unsaved changes in cataloging
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P3 enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on: 14754
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-29 17:06 UTC by Vitor Fernandes
Modified: 2020-01-07 23:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Fernandes 2015-06-29 17:06:57 UTC
Add a warning about unsaved changes when exiting the cataloguing (addbiblio.pl) page.

http://stackoverflow.com/questions/11844256/alert-for-unsaved-changes-in-form

Possible code:

var unsaved = false;

$(":input").change(function(){ //trigers change in all input fields including text type
    unsaved = true;
});

function unloadPage(){ 
    if(unsaved){
        return "You have unsaved changes on this page. Do you want to leave this page and discard your changes or stay on this page?";
    }
}

window.onbeforeunload = unloadPage;
Comment 1 Katrin Fischer 2020-01-07 22:38:53 UTC
The advanced editor does this already - so it might be nice to have the same on the normal editor.