mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Improved example plugin to test for admin section
This commit is contained in:
parent
603d48f739
commit
c1017499e4
3 changed files with 48 additions and 5 deletions
|
|
@ -22,7 +22,7 @@
|
|||
});
|
||||
} else {
|
||||
var link = document.createElement("a");
|
||||
link.download = 'backup.zip';
|
||||
link.download = 'backup-' + Date.now() + '.zip';
|
||||
link.href = 'data:application/zip;base64,' + oData.Result.zip;
|
||||
link.textContent = 'backup.zip';
|
||||
this.viewModelDom.append(link);
|
||||
|
|
@ -32,6 +32,13 @@
|
|||
|
||||
}, 'JsonAdminGetData');
|
||||
}
|
||||
|
||||
submitForm(form) {
|
||||
form.reportValidity()
|
||||
&& rl.pluginRemoteRequest((iError, oData) => {
|
||||
console.dir(oData);
|
||||
}, 'JsonAdminRestoreData', new FormData(form));
|
||||
}
|
||||
}
|
||||
|
||||
rl.addSettingsViewModelForAdmin(BackupAdminSettings, 'BackupAdminSettingsTab',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue