Skip to content

Commit 3bfdbbd

Browse files
vishesh92dhslove
authored andcommitted
Fill fields in login, forgotPassword and resetPassword from url (apache#10291)
1 parent a2d363e commit 3bfdbbd

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

ui/src/views/auth/ForgotPassword.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ export default {
129129
initForm () {
130130
this.formRef = ref()
131131
this.form = reactive({
132-
server: (this.server.apiHost || '') + this.server.apiBase
132+
server: (this.server.apiHost || '') + this.server.apiBase,
133+
username: this.$route.query?.username || '',
134+
domain: this.$route.query?.domain || ''
133135
})
134136
this.rules = {
135137
username: [{

ui/src/views/auth/Login.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ export default {
264264
initForm () {
265265
this.formRef = ref()
266266
this.form = reactive({
267-
server: (this.server.apiHost || '') + this.server.apiBase
267+
server: (this.server.apiHost || '') + this.server.apiBase,
268+
username: this.$route.query?.username || '',
269+
domain: this.$route.query?.domain || ''
268270
})
269271
this.rules = reactive({})
270272
this.setRules()

ui/src/views/auth/ResetPassword.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default {
157157
this.form = reactive({
158158
server: (this.server.apiHost || '') + this.server.apiBase,
159159
username: this.$route.query?.username || '',
160+
domain: this.$route.query?.domain || '',
160161
token: this.$route.query?.token || ''
161162
})
162163
this.rules = {

0 commit comments

Comments
 (0)