Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some style changes in label field selector for the DefaultLabel template #14791

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions resources/views/partials/label2-field-definitions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;' : 'background-color:#FFF;'"
x-on:click="selectedField = field"
>
<label><span x-text="index+1"></span>: <span x-text="getFieldLabel(field)"></span></label>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/settings/labels.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class="table table-striped snipe-table"
{{ 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>
Expand Down
Loading