69 lines
4 KiB
PHP
69 lines
4 KiB
PHP
@extends('layouts.backend')
|
|
|
|
@section('content')
|
|
<form action="{{route('bo.advices.update', $advice->id)}}" method="POST" enctype="multipart/form-data">
|
|
@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"><a href="{{route('bo.home')}}" class="h2 text-decoration-none">
|
|
< </a> {{ __('Présentation') }} <small class="text-muted">{{ __('Edition') }}</small></h1>
|
|
<div class="btn-toolbar mb-2 mb-md-0">
|
|
<button type="submit" class="btn btn-sm btn-primary">{{ __('Enregistrer') }}</a>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
// dd($advice->page->equals(\App\Enums\Page::marqueHeader()), \App\Enums\Page::toArray()); exit;
|
|
// dd($advice->page->equals(\App\Enums\Page::marqueHeader()), \App\Enums\Page::toValues()); exit;
|
|
?>
|
|
<div class="form-group">
|
|
<label for="title1">{{ __('Titre 1er bloc') }} *</label>
|
|
<input type="text" id="title1" name="title1" class="form-control" placeholder="{{ __('Titre 1er bloc') }} *" value="{{ old('title1', $advice->title1 ?? '') }}" required>
|
|
@include('back.modules.input-error', ['inputName'=>'title1'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="text1">{{ __('Texte 1er bloc') }}</label>
|
|
<textarea class="form-control" id="text1" name="text1" placeholder="{{ __('Texte 1er bloc') }}" style="height: 300px; width: 50%;">{{ old('text1', $advice->text1) }}</textarea>
|
|
@include('back.modules.input-error', ['inputName'=>'text1'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="picture1">{{ __('Image') }} <small class="text-muted">- JPEG/PNG, 2Mo max. Dimensions {{ Config::get('bo.advice_image_maxwidth') }} px par {{ Config::get('bo.advice_image_maxheight') }} px</small></label><br/>
|
|
<input type="file" id="picture1" name="picture1" accept="image/png, image/jpeg">
|
|
@if ($advice->picture1 !== null)
|
|
<br />
|
|
<br />
|
|
<img src="{{$advice->picture1}}" alt="{{$advice->title1}}" style="max-height: 100px;">
|
|
@endif
|
|
@include('back.modules.input-error', ['inputName'=>'picture1'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="title1">{{ __('Titre 1er bloc') }} *</label>
|
|
<input type="text" id="title1" name="title1" class="form-control" placeholder="{{ __('Titre 1er bloc') }} *" value="{{ old('title1', $advice->title1 ?? '') }}" required>
|
|
@include('back.modules.input-error', ['inputName'=>'title1'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="text1">{{ __('Texte 1er bloc') }}</label>
|
|
<textarea class="form-control" id="text1" name="text1" placeholder="{{ __('Texte 1er bloc') }}" style="height: 300px; width: 50%;">{{ old('text1', $advice->text1) }}</textarea>
|
|
@include('back.modules.input-error', ['inputName'=>'text1'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="picture2">{{ __('Image') }} <small class="text-muted">- JPEG/PNG, 1Mo max. Dimensions {{ Config::get('bo.advice_image_maxwidth') }} px par {{ Config::get('bo.advice_image_maxheight') }} px</small></label><br/>
|
|
<input type="file" id="picture2" name="picture2" accept="image/png, image/jpeg">
|
|
@if ($advice->picture2 !== null)
|
|
<br />
|
|
<br />
|
|
<img src="{{$advice->picture2}}" alt="{{$advice->title2}}" style="max-height: 100px;">
|
|
@endif
|
|
@include('back.modules.input-error', ['inputName'=>'picture2'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="picture3">{{ __('Image') }} <small class="text-muted">- JPEG/PNG, 1Mo max. Dimensions {{ Config::get('bo.advice_image_maxwidth') }} px par {{ Config::get('bo.advice_image_maxheight') }} px</small></label><br/>
|
|
<input type="file" id="picture3" name="picture3" accept="image/png, image/jpeg">
|
|
@if ($advice->picture3 !== null)
|
|
<br />
|
|
<br />
|
|
<img src="{{$advice->picture3}}" alt="{{$advice->title3}}" style="max-height: 100px;">
|
|
@endif
|
|
@include('back.modules.input-error', ['inputName'=>'picture3'])
|
|
</div>
|
|
</form>
|
|
@endsection
|