blade pour les settings theme du BO

This commit is contained in:
Olivier Legat 2021-05-06 17:48:06 +02:00
parent a811c75d08
commit 70cb2163df

View file

@ -0,0 +1,46 @@
@extends('layouts.bo-layout')
@section('content')
<form method="POST" action="{{route('bo.themesettings')}}">
@method('PUT')
@csrf
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Paramètres Site Public</h1>
@if (session('success'))
<span class="float-center text-success">{{ session('success') }}</span>
@endif
<div class="text-right">
<button type="submit" class="btn btn-primary">Enregistrer</button>
</div>
</div>
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@foreach ($settingsToPrint as $key => $value)
<div class="form-group">
@switch($config_settings[str_replace('theme_', '', $key)]['control_type'])
@case('bool')
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="{{$key}}" name="{{$key}}" @if($value) checked @endif>
<label class="custom-control-label" for="{{$key}}">{{ __($config_settings[str_replace('theme_', '', $key)]['label'] ?? $key) }}</label>
</div>
<small class="text-muted">{{ __($config_settings[str_replace('theme_', '', $key)]['help_text'] ?? '') }}</small>
@break
@default
<label class="col-form-label">
{{ __($config_settings[str_replace('theme_', '', $key)]['label'] ?? $key) }}
<input type="text" name="{{$key}}" class="form-control" value="{{$value}}">
<small class="text-muted">{{ __($config_settings[str_replace('theme_', '', $key)]['help_text'] ?? '') }}</small>
</label>
@endswitch
</div>
@endforeach
</form>
@endsection