Files
jric11 1e63076123
Security and workflow regressions / regression (push) Has been cancelled
Chat's updates for security, db and workflow
2026-10-20 06:45:30 -04:00

11 lines
682 B
JavaScript

$(function(){
const application=$('#APPLICATION_MNEMONIC').val();if(!application)return;
const key=application+':autosave:'+window.location.pathname;
let saved={};try{saved=JSON.parse(sessionStorage.getItem(key)||'{}');}catch(error){sessionStorage.removeItem(key);}
$('.autosave').filter(':not([type="password"]):not([type="hidden"])').each(function(){
if(Object.prototype.hasOwnProperty.call(saved,this.name)){
if(this.type==='checkbox')$(this).prop('checked',!!saved[this.name]);else $(this).val(saved[this.name]);
}
}).on('change',function(){saved[this.name]=this.type==='checkbox'?this.checked:$(this).val();sessionStorage.setItem(key,JSON.stringify(saved));});
});