Skip to content

Commit

Permalink
Fix some fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ilestis committed Jun 3, 2024
1 parent 1e7032e commit a704c65
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions resources/views/calendars/form/_panes.blade.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="tab-pane pane-calendar {{ (request()->get('tab') == 'form-calendar' ? ' active' : '') }}" id="form-calendar">
@include('calendars.form._calendar', ['source' => $source])
@include('calendars.form._calendar')
</div>
<div class="tab-pane pane-months {{ (request()->get('tab') == 'form-months' ? ' active' : '') }}" id="form-months">
@include('calendars.form._months', ['source' => $source])
@include('calendars.form._months')
</div>
<div class="tab-pane pane-weeks {{ (request()->get('tab') == 'form-weeks' ? ' active' : '') }}" id="form-weeks">
@include('calendars.form._weeks', ['source' => $source])
@include('calendars.form._weeks')
</div>
<div class="tab-pane pane-moons {{ (request()->get('tab') == 'form-moons' ? ' active' : '') }}" id="form-moons">
@include('calendars.form._moons', ['source' => $source])
@include('calendars.form._moons')
</div>
<div class="tab-pane pane-seasons {{ (request()->get('tab') == 'form-seasons' ? ' active' : '') }}" id="form-seasons">
@include('calendars.form._seasons', ['source' => $source])
@include('calendars.form._seasons')
</div>
14 changes: 7 additions & 7 deletions resources/views/cruds/forms/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<ul class="nav-tabs flex items-stretch w-full" role="tablist">
<x-tab.tab target="entry" :default="true" :title="__('crud.fields.entry')"></x-tab.tab>

@includeIf($name . '.form._tabs', ['source' => $source])
@includeIf($name . '.form._tabs')

@if ($tabBoosted && config('services.stripe.enabled'))
<x-tab.tab target="premium" icon="premium" :title="auth()->check() && auth()->user()->hasBoosterNomenclature() ? __('crud.tabs.boost') : __('crud.tabs.premium')"></x-tab.tab>
Expand All @@ -56,36 +56,36 @@
<div class="tab-content bg-base-100 p-4 rounded-bl rounded-br">
<div class="tab-pane pane-entry {{ (request()->get('tab') == null ? ' active' : '') }}" id="form-entry">
<x-grid type="1/1">
@include($name . '.form._entry', ['source' => $source])
@include($name . '.form._entry')
</x-grid>
</div>
@includeIf($name . '.form._panes', ['source' => $source])
@includeIf($name . '.form._panes')

@if ($tabBoosted && config('services.stripe.enabled'))
<div class="tab-pane pane-premium {{ (request()->get('tab') == 'premium' ? ' active' : '') }}" id="form-premium">
<x-grid type="1/1">
@include('cruds.forms._premium', ['source' => $source])
@include('cruds.forms._premium')
</x-grid>
</div>
@endif
@if ((!empty($source) || !empty(old('copy_source_id'))) && $tabCopy)
<div class="tab-pane pane-copy {{ (request()->get('tab') == 'copy' ? ' active' : '') }}" id="form-copy">
<x-grid type="1/1">
@include('cruds.forms._copy', ['source' => $source])
@include('cruds.forms._copy')
</x-grid>
</div>
@endif
@if ($tabAttributes)
<div class="tab-pane pane-attributes {{ (request()->get('tab') == 'attributes' ? ' active' : '') }}" id="form-attributes">
<x-grid type="1/1">
@include('cruds.forms._attributes', ['source' => $source])
@include('cruds.forms._attributes')
</x-grid>
</div>
@endif
@if ($tabPermissions)
<div class="tab-pane pane-permissions {{ (request()->get('tab') == 'permissions' ? ' active' : '') }}" id="form-permissions">
<x-grid type="1/1">
@include('cruds.forms._permission', ['source' => $source])
@include('cruds.forms._permission')
</x-grid>
</div>
@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/maps/form/_panes.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="tab-pane {{ (request()->get('tab') == 'form-settings' ? ' active' : '') }}" id="form-settings">
@include('maps.form._settings', ['source' => null])
@include('maps.form._settings')
</div>
4 changes: 2 additions & 2 deletions resources/views/maps/form/_settings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
:label="__('maps.fields.distance_name')">
{!! Form::text(
'config[distance_name]',
FormCopy::field('config[distance_name]')->string(),
$source->config['distance_name'] ?? null,
[
'placeholder' => __('maps.placeholders.distance_name'),
'class' => '',
Expand All @@ -89,7 +89,7 @@
:tooltip="true"
:helper="__('maps.helpers.distance_measure') . ' ' . __('maps.helpers.distance_measure_2')"
>
<input type="number" name="config[distance_measure]" class="w-full" value="{{ FormCopy::field('config[distance_measure]')->string() ?: old('config[distance_measure]', $model->config['distance_measure'] ?? null) }}" min="0.001" max="100.99" step="0.0001"/>
<input type="number" name="config[distance_measure]" class="w-full" value="{{ $source->config['distance_measure'] ?? old('config[distance_measure]', $model->config['distance_measure'] ?? null) }}" min="0.001" max="100.99" step="0.0001"/>
</x-forms.field>

<hr class="col-span-2 m-0" />
Expand Down
6 changes: 3 additions & 3 deletions resources/views/maps/markers/_form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@

<x-forms.field field="stroke" :label="__('maps/markers.fields.polygon_style.stroke')">
<span>
{!! Form::text('polygon_style[stroke]', \App\Facades\FormCopy::field('polygon_style[stroke]')->string(), ['class' => ' spectrum']) !!}
{!! Form::text('polygon_style[stroke]', $source->polygon_style['stroke'] ?? null, ['class' => ' spectrum']) !!}
</span>
</x-forms.field>

<x-forms.field field="width" :label="__('maps/markers.fields.polygon_style.stroke-width')">

<input type="number" name="polygon_style[stroke-width]" value="{{ \App\Facades\FormCopy::field('polygon_style[stroke-width]')->string() ?: old('polygon_style[stroke-width]', $model->polygon_style['stroke-width'] ?? null) }}" id="stroke-width" step="1" min="0" max="99" maxlength="2" />
<input type="number" name="polygon_style[stroke-width]" value="{{ $source->polygon_style['stroke-width'] ?? old('polygon_style[stroke-width]', $model->polygon_style['stroke-width'] ?? null) }}" id="stroke-width" step="1" min="0" max="99" maxlength="2" />
</x-forms.field>

<x-forms.field field="opacity" :label="__('maps/markers.fields.polygon_style.stroke-opacity')">
<input type="number" name="polygon_style[stroke-opacity]" value="{{ \App\Facades\FormCopy::field('polygon_style[stroke-opacity]')->string() ?: old('polygon_style[stroke-opacity]', $model->polygon_style['stroke-opacity'] ?? null) }}" id="stroke-opacity" step="10" min="0" max="100" maxlength="3" />
<input type="number" name="polygon_style[stroke-opacity]" value="{{ $source->polygon_style['stroke-opacity'] ?? old('polygon_style[stroke-opacity]', $model->polygon_style['stroke-opacity'] ?? null) }}" id="stroke-opacity" step="10" min="0" max="100" maxlength="3" />
</x-forms.field>
</x-grid>
</div>
Expand Down

0 comments on commit a704c65

Please sign in to comment.