1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

Imroved UI of required and optional enum

This commit is contained in:
Matej Baco 2022-01-26 16:04:50 +01:00
parent 5f6c5f8663
commit f6568b3cf5

View file

@ -169,8 +169,11 @@ $logs = $this->getParam('logs', null);
</template> </template>
<template x-if="attr.format === 'enum'"> <template x-if="attr.format === 'enum'">
<select <select
:required="attr.required"
:name="attr.key" :name="attr.key"
data-cast-to="string"> data-cast-to="string">
<option :disabled="attr.required" selected label=" "></option>
<template x-for="element in attr.elements"> <template x-for="element in attr.elements">
<option <option
:value="element" :value="element"
@ -261,9 +264,12 @@ $logs = $this->getParam('logs', null);
</template> </template>
<template x-if="attr.format === 'enum'"> <template x-if="attr.format === 'enum'">
<select <select
:required="attr.required"
:name="attr.key" :name="attr.key"
data-cast-to="string"> data-cast-to="string">
<template x-for="element in attr.elements"> <template x-for="element in attr.elements">
<option :disabled="attr.required" selected label=" "></option>
<option <option
:value="element" :value="element"
x-text="element" x-text="element"