Skip to content

Commit

Permalink
fix(settings): Fix mail server settings form
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin authored and backportbot[bot] committed Jan 14, 2025
1 parent 082a3fa commit 83e4104
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions apps/settings/src/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ window.addEventListener('DOMContentLoaded', () => {
data: $('#mail_general_settings_form').serialize(),
success: () => {
OC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))
},
error: (xhr) => {
OC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)
},
})
}).catch((error) => {
OC.msg.finishedError('#mail_settings_msg', error)
})
}

const toggleEmailCredentials = function() {
Expand All @@ -70,11 +68,9 @@ window.addEventListener('DOMContentLoaded', () => {
data: $('#mail_credentials_settings').serialize(),
success: () => {
OC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))
},
error: (xhr) => {
OC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)
},
})
}).catch((error) => {
OC.msg.finishedError('#mail_settings_msg', error)
})
}

$('#mail_general_settings_form').change(changeEmailSettings)
Expand All @@ -95,11 +91,9 @@ window.addEventListener('DOMContentLoaded', () => {
type: 'POST',
success: () => {
OC.msg.finishedSuccess('#sendtestmail_msg', t('settings', 'Email sent'))
},
error: (xhr) => {
OC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON)
},
})
}).catch((error) => {
OC.msg.finishedError('#sendtestmail_msg', error)
})
})

const setupChecks = () => {
Expand Down

0 comments on commit 83e4104

Please sign in to comment.