Hide user ID + Reset password when creating a user (#367)

This commit is contained in:
sephrat 2021-04-29 23:12:08 +02:00 committed by GitHub
parent b65555fc2f
commit 7153ff6f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@
</v-toolbar-title> </v-toolbar-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-toolbar-title class="headline"> <v-toolbar-title class="headline" v-if="!this.createMode">
{{ $t("user.user-id-with-value", { id: editedItem.id }) }} {{ $t("user.user-id-with-value", { id: editedItem.id }) }}
</v-toolbar-title> </v-toolbar-title>
</v-app-bar> </v-app-bar>
@ -75,7 +75,7 @@
:label="$t('group.user-group')" :label="$t('group.user-group')"
></v-select> ></v-select>
</v-col> </v-col>
<v-col cols="12" sm="12" md="6" v-if="showPassword"> <v-col cols="12" sm="12" md="6" v-if="createMode">
<v-text-field <v-text-field
dense dense
v-model="editedItem.password" v-model="editedItem.password"
@ -93,7 +93,7 @@
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions>
<v-btn color="info" text @click="resetPassword"> <v-btn color="info" text @click="resetPassword" v-if="!createMode">
{{$t('user.reset-password')}} {{$t('user.reset-password')}}
</v-btn> </v-btn>
<v-spacer></v-spacer> <v-spacer></v-spacer>
@ -192,11 +192,11 @@ export default {
computed: { computed: {
formTitle() { formTitle() {
return this.editedIndex === -1 return this.createMode
? this.$t("user.new-user") ? this.$t("user.new-user")
: this.$t("user.edit-user"); : this.$t("user.edit-user");
}, },
showPassword() { createMode() {
return this.editedIndex === -1 ? true : false; return this.editedIndex === -1 ? true : false;
}, },
existingGroups() { existingGroups() {