forked from enviPath/enviPy
Initial bayer app Show Pack Classification Adjusted docker compose to bayer specifics Adjusted Dockerfile for Bayer Adding secret flags to group, add secret pools to packages Adjusted View for Package creation Prep configs, added Package Create Modal wip More on PES wip wip Wip minor PW interactions API PES wip Make Select Widget reflect required make required generallay available Update UI if pathway mode is set to build Added ais circle adjustments Initial Zoom, fix AD Creation wip
71 lines
2.0 KiB
HTML
71 lines
2.0 KiB
HTML
{# Select dropdown widget - pure HTML template #}
|
|
<div class="form-control">
|
|
<div class="flex flex-col gap-2 sm:flex-row sm:items-baseline">
|
|
<!-- Label -->
|
|
<label class="label sm:w-48 sm:shrink-0">
|
|
<span
|
|
class="label-text"
|
|
:class="{
|
|
'text-error': $store.validationErrors.hasError(fieldName, context),
|
|
'text-sm text-base-content/60': isViewMode
|
|
}"
|
|
x-text="label"
|
|
></span>
|
|
</label>
|
|
|
|
<!-- Input column -->
|
|
<div class="flex-1">
|
|
<!-- Help text -->
|
|
<template x-if="helpText">
|
|
<div class="label">
|
|
<span
|
|
class="label-text-alt text-base-content/60"
|
|
x-text="helpText"
|
|
></span>
|
|
</div>
|
|
</template>
|
|
|
|
<!-- View mode -->
|
|
<template x-if="isViewMode">
|
|
<div class="mt-1">
|
|
<template x-if="value">
|
|
<span class="text-base" x-text="value"></span>
|
|
</template>
|
|
<template x-if="!value">
|
|
<span class="text-base-content/50">—</span>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
|
|
<!-- Edit mode -->
|
|
<template x-if="isEditMode">
|
|
<select
|
|
class="select select-bordered w-full"
|
|
:class="{ 'select-error': $store.validationErrors.hasError(fieldName, context) }"
|
|
x-model="value"
|
|
:multiple="multiple"
|
|
:required="isRequired"
|
|
>
|
|
<option value="" :selected="!value">Select...</option>
|
|
|
|
<template x-for="opt in options" :key="opt">
|
|
<option :value="opt" x-text="opt"></option>
|
|
</template>
|
|
</select>
|
|
</template>
|
|
|
|
<!-- Errors -->
|
|
<template x-if="$store.validationErrors.hasError(fieldName, context)">
|
|
<div class="label">
|
|
<template
|
|
x-for="errMsg in $store.validationErrors.getErrors(fieldName, context)"
|
|
:key="errMsg"
|
|
>
|
|
<span class="label-text-alt text-error" x-text="errMsg"></span>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</div>
|