[Web] Keep modal data when adding a sync job

master
andryyy 2020-02-06 07:03:03 +01:00
parent 049a930d47
commit 1abd0357d7
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 11 additions and 8 deletions

View File

@ -255,6 +255,8 @@ $(document).ready(function() {
}); });
if (unset === true) { if (unset === true) {
unset = null; unset = null;
// Keep form data for sync jobs
if (id != "add_syncjob") {
$('form').formcache('clear'); $('form').formcache('clear');
$('form').formcache('destroy'); $('form').formcache('destroy');
var i = localStorage.length; var i = localStorage.length;
@ -265,6 +267,7 @@ $(document).ready(function() {
} }
} }
} }
}
else { else {
var add_modal = $('.modal.in').attr('id'); var add_modal = $('.modal.in').attr('id');
localStorage.setItem("add_modal", add_modal); localStorage.setItem("add_modal", add_modal);