Bug 24616: Do not save form if user press cancel
If one starts to copy a notice but then cancels this when pop-up is displayed, changes are still saved. This patch fixes this. To test: 1. Copy notice to a library where it already exists 2. Press save and then cancel when pop-up is displayed => Form and changes are still saved 3. Apply this patch. 4. Repeat steps 1. and 2. => Form is no longer saved Sponsored-by: Koha-Suomi Oy Signed-off-by: ml-inlibro <marie-luce.laflamme@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
7362059bb6
commit
a99f2e6530
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ function checkCodes( new_lettercode, new_branchcode ){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//This has bug
|
||||||
function confirmOverwrite( new_lettercode, new_branchcode ){
|
function confirmOverwrite( new_lettercode, new_branchcode ){
|
||||||
var letter_exists;
|
var letter_exists;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -127,7 +127,7 @@ $(document).ready(function() {
|
||||||
var new_lettercode = $("#code").val();
|
var new_lettercode = $("#code").val();
|
||||||
var new_branchcode = $("#branch").val();
|
var new_branchcode = $("#branch").val();
|
||||||
var confirm = confirmOverwrite( new_lettercode, new_branchcode );
|
var confirm = confirmOverwrite( new_lettercode, new_branchcode );
|
||||||
if( confirm && confirm === false){
|
if(confirm === false){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue