mirror of
https://github.com/directus/directus.git
synced 2026-01-31 00:48:16 -05:00
Prevent add/edit dialogs from saving if value is null
This commit is contained in:
@@ -35,7 +35,9 @@
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-button secondary @click="renameActive = false">{{ $t('cancel') }}</v-button>
|
||||
<v-button @click="renameSave" :loading="renameSaving">{{ $t('save') }}</v-button>
|
||||
<v-button @click="renameSave" :disabled="renameValue === null" :loading="renameSaving">
|
||||
{{ $t('save') }}
|
||||
</v-button>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-button secondary @click="dialogActive = false">{{ $t('cancel') }}</v-button>
|
||||
<v-button :disabled="!newFolderName || newFolderName.length === 0" @click="addFolder" :loading="saving">
|
||||
<v-button :disabled="newFolderName === null" @click="addFolder" :loading="saving">
|
||||
{{ $t('save') }}
|
||||
</v-button>
|
||||
</v-card-actions>
|
||||
|
||||
@@ -74,7 +74,9 @@
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-button secondary @click="renameActive = false">{{ $t('cancel') }}</v-button>
|
||||
<v-button @click="renameSave" :loading="renameSaving">{{ $t('save') }}</v-button>
|
||||
<v-button @click="renameSave" :disabled="renameValue === null" :loading="renameSaving">
|
||||
{{ $t('save') }}
|
||||
</v-button>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
<v-button secondary @click="duplicateActive = false">
|
||||
{{ $t('cancel') }}
|
||||
</v-button>
|
||||
<v-button @click="saveDuplicate" :loading="duplicating">
|
||||
<v-button @click="saveDuplicate" :disabled="duplicateName === null" :loading="duplicating">
|
||||
{{ $t('duplicate') }}
|
||||
</v-button>
|
||||
</v-card-actions>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-button to="/settings/roles" secondary>{{ $t('cancel') }}</v-button>
|
||||
<v-button @click="save" :loading="saving">{{ $t('save') }}</v-button>
|
||||
<v-button @click="save" :disabled="roleName === null" :loading="saving">{{ $t('save') }}</v-button>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@@ -38,7 +38,7 @@ import { unexpectedError } from '@/utils/unexpected-error';
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const roleName = ref<string>();
|
||||
const roleName = ref<string | null>(null);
|
||||
const appAccess = ref(true);
|
||||
const adminAccess = ref(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user