diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2019-10-25 10:59:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-25 10:59:48 +0300 |
commit | ce26719ab00947f194fee73e3718734740402466 (patch) | |
tree | 3dda4e5510d7e79a94d4b6112e57df4cf714500e | |
parent | 5e7c3715c04df78cd1505c6cd8e66497f1f7236c (diff) | |
parent | 8fd73b9bc5d07f9b00dcd9bdd7756a612f04f873 (diff) |
Merge pull request #2160 from nextcloud/fix/account-settings-form
Account settings should be a form
-rw-r--r-- | src/components/AccountForm.vue | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/components/AccountForm.vue b/src/components/AccountForm.vue index bf21dad42..26badffcb 100644 --- a/src/components/AccountForm.vue +++ b/src/components/AccountForm.vue @@ -1,5 +1,5 @@ <template> - <div id="account-form"> + <form id="account-form" @submit.prevent="onSubmit"> <tabs :options="{useUrlFragment: false, defaultTabHash: settingsPage ? 'manual' : 'auto'}" cache-lifetime="0" @@ -227,14 +227,14 @@ </tab> </tabs> <slot name="feedback"></slot> - <input type="submit" class="primary" :disabled="loading" :value="submitButtonText" @click="onSubmit" /> - </div> + <input type="submit" class="primary" :disabled="loading" :value="submitButtonText" @click.prevent="onSubmit" /> + </form> </template> <script> import {Tab, Tabs} from 'vue-tabs-component' -import Logger from '../logger' +import logger from '../logger' export default { name: 'AccountForm', @@ -329,7 +329,7 @@ export default { } } }, - onImapSslModeChange: function() { + onImapSslModeChange() { switch (this.manualConfig.imapSslMode) { case 'none': case 'tls': @@ -340,7 +340,7 @@ export default { break } }, - onSmtpSslModeChange: function() { + onSmtpSslModeChange() { switch (this.manualConfig.smtpSslMode) { case 'none': case 'tls': @@ -364,11 +364,13 @@ export default { }) } }, - onSubmit: function() { + onSubmit(event) { + console.debug('account form submitted', {event}) + this.loading = true this.saveChanges() - .catch(error => Logger.error('could not save account details', {error})) + .catch(error => logger.error('could not save account details', {error})) .then(() => (this.loading = false)) }, }, |