Only allow to submit group dialog if group name is valid
This commit is contained in:
@@ -81,9 +81,10 @@ defineExpose({
|
||||
:title="group ? $t('users.editGroupDialog.title', { name: group.name }) : $t('users.addGroupDialog.title')"
|
||||
:confirm-label="group ? $t('main.dialog.save') : $t('users.group.addGroupAction')"
|
||||
:confirm-busy="busy"
|
||||
:confirm-active="!busy"
|
||||
:confirm-active="!busy && name !== ''"
|
||||
reject-style="secondary"
|
||||
:reject-label="busy ? null : $t('main.dialog.cancel')"
|
||||
:reject-label="$t('main.dialog.cancel')"
|
||||
:reject-active="!busy"
|
||||
@confirm="onSubmit()"
|
||||
>
|
||||
<p class="text-warning" v-if="group?.source">{{ $t('users.editGroupDialog.externalLdapWarning') }}</p>
|
||||
@@ -95,7 +96,7 @@ defineExpose({
|
||||
|
||||
<FormGroup>
|
||||
<label for="nameInput">{{ $t('users.group.name') }}</label>
|
||||
<TextInput id="nameInput" v-model="name" />
|
||||
<TextInput id="nameInput" v-model="name" required/>
|
||||
<div class="error-label" v-if="formError.name">{{ formError.name }}</div>
|
||||
</FormGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user