You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/06/02 08:19:46 UTC
[cloudstack] branch 4.15 updated: ui: fix adduser form (#5063)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new 937def5 ui: fix adduser form (#5063)
937def5 is described below
commit 937def533aa11b45974ffb82aac14a4da4fc7750
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Wed Jun 2 13:48:59 2021 +0530
ui: fix adduser form (#5063)
AddUser form wrongly shows the account dropdown when adding a user for an account. Account dropdown remains empty in the form.
When an account is not selected prior to opening the form, the account input should be required.
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
ui/src/views/iam/AddUser.vue | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ui/src/views/iam/AddUser.vue b/ui/src/views/iam/AddUser.vue
index 8ef88eb..efec665 100644
--- a/ui/src/views/iam/AddUser.vue
+++ b/ui/src/views/iam/AddUser.vue
@@ -137,7 +137,9 @@
</a-tooltip>
</span>
<a-select
- v-decorator="['account']"
+ v-decorator="['account', {
+ rules: [{ required: true, message: $t('message.error.required.input') }]
+ }]"
:loading="loadingAccount"
:placeholder="apiParams.account.description">
<a-select-option v-for="(item, idx) in accountList" :key="idx">
@@ -225,7 +227,7 @@ export default {
this.apiConfig.params.forEach(param => {
this.apiParams[param.name] = param
})
- this.apiConfig = this.$store.getters.apis.authorizeSamlSso || {}
+ this.apiConfig = this.$store.getters.apis.authorizeSamlSso || { params: [] }
this.apiConfig.params.forEach(param => {
this.apiParams[param.name] = param
})
@@ -319,7 +321,7 @@ export default {
if (this.account) {
params.account = this.account
- } else if (values.account) {
+ } else if (this.accountList[values.account]) {
params.account = this.accountList[values.account].name
}