add some css in label field selector

This commit is contained in:
Godfrey M 2024-05-29 13:07:33 -07:00
parent 037ee8c07a
commit 713ce7836f
2 changed files with 9 additions and 4 deletions

View file

@ -261,13 +261,18 @@
<h1 class="l2fd-title" style="grid-area: fields-title">Fields</h1>
<div class="l2fd-list" style="grid-area: fields-list">
<template x-for="(field, index) in fields">
<div
x-bind:key="'field-' + index"
<div
x-data="{
template: '{{ $template }}'
}"
x-bind:key="'field-' + index"
x-bind:class="{
'l2fd-listitem': true,
'selected': selectedField === field
}"
x-on:click="selectedField = field" >
x-bind:style="index < 4 && template === 'DefaultLabel' ? 'background-color:#EEEEEE;' : ''"
x-on:click="selectedField = field"
>
<label><span x-text="index+1"></span>: <span x-text="getFieldLabel(field)"></span></label>
</div>
</template>

View file

@ -216,7 +216,7 @@
{{ Form::label('label2_fields', trans('admin/settings/general.label2_fields')) }}
</div>
<div class="col-md-9">
@include('partials.label2-field-definitions', [ 'name' => 'label2_fields', 'value' => old('label2_fields', $setting->label2_fields), 'customFields' => $customFields ])
@include('partials.label2-field-definitions', [ 'name' => 'label2_fields', 'value' => old('label2_fields', $setting->label2_fields), 'customFields' => $customFields, 'template' => $setting->label2_template])
{!! $errors->first('label2_fields', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.label2_fields_help') }}</p>
</div>