Upgrade boilerplate
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<div class="card{{ isset($tabs) ? ($outline ? ' card-outline card-outline-tabs' : ' card-tabs') : ($outline ? ' card-outline' : '') }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }} bg-{{ $bgColor ?? 'white' }}{{ $collapsed ? ' collapsed-card' : '' }}{{ !empty($class) ? ' '.$class : '' }}"{!! empty($attributes) ? '' : ' '.$attributes !!}>
|
||||
<div class="card{{ isset($tabs) ? ($outline ? ' card-outline card-outline-tabs' : ' card-tabs') : ($outline ? ' card-outline' : '') }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}{{ ($bgColor ?? null) ? ' bg-'.$bgColor : '' }}{{ $collapsed ? ' collapsed-card' : '' }}{{ !empty($class) ? ' '.$class : '' }}"{!! empty($attributes) ? '' : ' '.$attributes !!}>
|
||||
@if($title ?? false || $header ?? false || $tools ?? false || $maximize || $reduce || $close)
|
||||
<div class="card-header{{ isset($tabs) ? ($outline ? ' p-0' : ' p-0 pt-1') : '' }} border-bottom-0">
|
||||
@if($header ?? false)
|
||||
{{ $header }}
|
||||
{!! $header !!}
|
||||
@else
|
||||
<h3 class="card-title">@lang($title ?? '')</h3>
|
||||
@if($tools ?? false || $maximize || $reduce || $close)
|
||||
<div class="card-tools">
|
||||
@isset($tools)
|
||||
{{ $tools ?? '' }}
|
||||
{!! $tools ?? '' !!}
|
||||
@endisset
|
||||
@if($maximize)
|
||||
<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i></button>
|
||||
@@ -26,6 +26,6 @@
|
||||
@endif
|
||||
<div class="card-body{{ $title ?? false ? ($outline ? ' pt-0' : '') : '' }}">{{ $slot }}</div>
|
||||
@isset($footer)
|
||||
<div class="card-footer">{{ $footer }}</div>
|
||||
<div class="card-footer">{!! $footer !!}</div>
|
||||
@endisset
|
||||
</div>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
The name attribute has not been set
|
||||
</code>
|
||||
@else
|
||||
<div class="form-group">
|
||||
<div class="form-group{{ isset($groupClass) ? ' '.$groupClass : '' }}"{{ isset($groupId) ? ' id="'.$groupId.'"' : '' }}>
|
||||
@isset($label)
|
||||
{{ Form::label($name, __($label)) }}
|
||||
{!! Form::label($name, __($label)) !!}
|
||||
@endisset
|
||||
@if($prepend || $prependText || $append || $appendText)
|
||||
<div class="input-group">
|
||||
@@ -21,13 +21,13 @@
|
||||
</div>
|
||||
@endif
|
||||
@if($type === 'password')
|
||||
{{ Form::password($name, array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
|
||||
{!! Form::password($name, array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@elseif($type === 'file')
|
||||
{{ Form::file($name, array_merge(['class' => 'form-control-file'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
|
||||
{!! Form::file($name, array_merge(['class' => 'form-control-file'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@elseif($type === 'select')
|
||||
{{ Form::select($name, $options ?? [], old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
|
||||
{!! Form::select($name, $options ?? [], old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@else
|
||||
{{ Form::{$type ?? 'text'}($name, old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
|
||||
{!! Form::{$type ?? 'text'}($name, old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@endif
|
||||
@if($append || $appendText)
|
||||
<div class="input-group-append">
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
@if(empty($name))
|
||||
<code>
|
||||
<x-boilerplate::select2>
|
||||
The name attribute has not been set
|
||||
</code>
|
||||
<code><x-boilerplate::select2> The name attribute has not been set</code>
|
||||
@else
|
||||
<div class="form-group">
|
||||
@isset($label)
|
||||
{{ Form::label($name, __($label)) }}
|
||||
@endisset
|
||||
<select id="{{ $id }}" name="{{ $name }}" class="form-control{{ $errors->first($name,' is-invalid') }}{{ isset($class) ? ' '.$class : '' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!}>
|
||||
<select id="{{ $id }}" name="{{ $name }}" class="form-control{{ $errors->first($name,' is-invalid') }}{{ isset($class) ? ' '.$class : '' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!} style="visibility:hidden;height:1rem">
|
||||
@if(!isset($multiple))
|
||||
<option></option>
|
||||
@endif
|
||||
@if(!empty($options) && is_array($options))
|
||||
@foreach($options as $k => $v)
|
||||
<option value="{{ $k }}"{{ collect($selected ?? [])->contains($k) ? ' selected' : '' }}>{{ $v }}</option>
|
||||
@endforeach
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endisset
|
||||
</select>
|
||||
@if($help ?? false)
|
||||
<small class="form-text text-muted">@lang($help)</small>
|
||||
@@ -28,10 +31,10 @@
|
||||
$('#{{ $id }}').select2({
|
||||
placeholder: '{{ $placeholder ?? '—' }}',
|
||||
allowClear: {{ $allowClear }},
|
||||
language: "{{ config('boilerplate.app.locale') }}",
|
||||
language: "{{ App::getLocale() }}",
|
||||
direction: "@lang('boilerplate::layout.direction')",
|
||||
minimumInputLength: {{ $minimumInputLength ?? 0 }},
|
||||
minimumResultsForSearch: {{ $minimumResultsForSearch ?? 0 }},
|
||||
minimumResultsForSearch: {{ $minimumResultsForSearch ?? 10 }},
|
||||
width: '100%',
|
||||
@isset($ajax)
|
||||
ajax: {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<textarea id="{{ $id }}"{!! !empty($attributes) ? ' '.$attributes : '' !!}></textarea>
|
||||
@if(empty($name))
|
||||
<code><x-boilerplate::tinymce>The name attribute has not been set</code>
|
||||
@else
|
||||
<textarea id="{{ $id }}"{!! !empty($attributes) ? ' '.$attributes : '' !!} style="visibility:hidden">{!! $value ?? $slot ?? '' !!}</textarea>
|
||||
@if($hasMediaManager)
|
||||
@include('boilerplate-media-manager::load.tinymce')
|
||||
@else
|
||||
@@ -6,4 +9,5 @@
|
||||
@endif
|
||||
@push('js')
|
||||
<script>$(function(){$('#{{ $id }}').tinymce({})});</script>
|
||||
@endpush
|
||||
@endpush
|
||||
@endif
|
||||
Reference in New Issue
Block a user