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]>

[skip ci]
  • Loading branch information
provokateurin authored and backportbot[bot] committed Jan 14, 2025
1 parent 44e23ce commit 8991183
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 @@ -46,11 +46,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 @@ -66,11 +64,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 @@ -91,11 +87,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 8991183

Please sign in to comment.