[Web] Keep modal data when adding a sync job
parent
049a930d47
commit
1abd0357d7
|
@ -255,13 +255,16 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
if (unset === true) {
|
if (unset === true) {
|
||||||
unset = null;
|
unset = null;
|
||||||
$('form').formcache('clear');
|
// Keep form data for sync jobs
|
||||||
$('form').formcache('destroy');
|
if (id != "add_syncjob") {
|
||||||
var i = localStorage.length;
|
$('form').formcache('clear');
|
||||||
while(i--) {
|
$('form').formcache('destroy');
|
||||||
var key = localStorage.key(i);
|
var i = localStorage.length;
|
||||||
if(/formcache/.test(key)) {
|
while(i--) {
|
||||||
localStorage.removeItem(key);
|
var key = localStorage.key(i);
|
||||||
|
if(/formcache/.test(key)) {
|
||||||
|
localStorage.removeItem(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue