email: cleanup; allow re-enabling of custom email without changes

This commit is contained in:
Harvey Tindall
2021-07-24 19:49:08 +01:00
parent 27ad7a4cf7
commit 9885c25a2e
3 changed files with 113 additions and 196 deletions
+2 -2
View File
@@ -999,11 +999,11 @@ class EmailEditor {
// };
this._form.onsubmit = (event: Event) => {
if (this._textArea.value == this._content) {
event.preventDefault()
if (this._textArea.value == this._content && this._names[this._currentID].enabled) {
window.modals.editor.close();
return;
}
event.preventDefault()
_post("/config/emails/" + this._currentID, { "content": this._textArea.value }, (req: XMLHttpRequest) => {
if (req.readyState == 4) {
window.modals.editor.close();