Clean the new account fields after registration

This commit is contained in:
Rodolphe Bréard 2023-07-25 23:04:03 +02:00
parent 2699b34ae1
commit 064665d0a3

View file

@ -142,6 +142,10 @@ document.addEventListener('DOMContentLoaded', () => {
console.log(new_account);
new_account.register();
console.log(`Account ${new_account.getName()} added.`);
['#new-addr-local-part', '#new-addr-domain', '#new-addr-key'].forEach((selector) => {
document.querySelector(selector).value = '';
});
document.querySelector('#new-addr-separator').value = '+';
syncAccountList();
closeAllModals();
});