89 lines
6.5 KiB
PHP
89 lines
6.5 KiB
PHP
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center">
|
|
<h2><small class="text-muted">{{ __('Contenu du post') }}</small></h2>
|
|
</div>
|
|
<div class="forms-group mb-4 border border-1 border-secondary rounded-2 p-3 bg-light wdt50">
|
|
<div class="form-group mb-4">
|
|
<label for="picture_news">{{ __('Image du post') }} <small class="text-muted">- JPEG/PNG, 1Mo max. Dimensions maximum {{ Config::get('bo.post_news_image_maxwidth') }} px par {{ Config::get('bo.post_news_image_maxheight') }} px</small></label><br/>
|
|
@if (!empty($post->picture_news))
|
|
<input type="file" id="picture_news" name="picture_news" accept="image/png, image/jpeg">
|
|
<br/>
|
|
<br/>
|
|
<img src="{{$post->picture_news}}" alt="{{$post->title}}" style="max-height: 100px;">
|
|
@else
|
|
<input type="file" id="picture_news" name="picture_news" accept="image/png, image/jpeg" required>
|
|
@endif
|
|
@include('back.modules.input-error', ['inputName'=>'picture_news'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="name">{{ __('Text alternatif de l\'image') }} *</label>
|
|
<input type="text" id="alt_text_picture_news" name="alt_text_picture_news" class="form-control" placeholder="{{ __('Texte alternatif de l\'image') }} *" value="{{ old('alt_text_picture_news', $post->alt_text_picture_news ?? '') }}" required>
|
|
@include('back.modules.input-error', ['inputName'=>'alt_text_picture_news'])
|
|
</div>
|
|
<div class="form-group wdt75 mb-4">
|
|
<label for="title">{{ __('Titre') }} *</label>
|
|
<input type="text" id="title" name="title" class="form-control" placeholder="{{ __('Titre') }} *" value="{{ old('title', $post->title ?? '') }}" required>
|
|
@include('back.modules.input-error', ['inputName'=>'title'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="text">{{ __('Texte') }} *</label>
|
|
<textarea class="form-control" placeholder="{{ __('Texte') }}" id="text" name="text" style="height: 150px;">{{ old('text', $post->text ?? '') }}</textarea>
|
|
@include('back.modules.input-error', ['inputName'=>'text'])
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center">
|
|
<h2><small class="text-muted">{{ __('Période de publication') }}</small></h2>
|
|
</div>
|
|
<div class="d-flex mb-4 border border-1 border-secondary rounded-2 p-3 bg-light wdt50">
|
|
<div class="form-group col">
|
|
<label for="date_start_date">{{ __('Début') }} <small class="text-muted">{{ __('de publication') }}</small></label>
|
|
@if($post->date_start !== null)
|
|
<input type="date" id="date_start_date" name="date_start_date" class="form-control" value="{{ old('date_start_date', date_format($post->date_start, "Y-m-d")) }}" required>
|
|
<input type="time" id="date_start_time" name="date_start_time" class="form-control" value="{{ old('date_start_time', date_format($post->date_start, "H:i")) }}" required>
|
|
@else
|
|
<input type="date" id="date_start_date" name="date_start_date" class="form-control" value="{{ old('date_start_date') }}" required>
|
|
<input type="time" id="date_start_time" name="date_start_time" class="form-control" value="{{ old('date_start_time') }}" required>
|
|
@endif
|
|
{{-- <small class="text-muted">{{ __('Laisser vide pour un affichage immédiat') }}</small> --}}
|
|
@include('back.modules.input-error', ['inputName'=>'date_start'])
|
|
</div>
|
|
<div class="form-group col">
|
|
<label for="date_end_date">{{ __('Fin') }} <small class="text-muted">{{ __('de publication') }}</small></label>
|
|
@if($post->date_end !== null)
|
|
<input type="date" id="date_end_date" name="date_end_date" class="form-control" value="{{ old('date_end_date', date_format($post->date_end, "Y-m-d")) }}" required>
|
|
<input type="time" id="date_end_time" name="date_end_time" class="form-control" value="{{ old('date_end_time', date_format($post->date_end, "H:i")) }}" required>
|
|
@else
|
|
<input type="date" id="date_end_date" name="date_end_date" class="form-control" value="{{ old('date_end_date') }}" required>
|
|
<input type="time" id="date_end_time" name="date_end_time" class="form-control" value="{{ old('date_end_time') }}" required>
|
|
@endif
|
|
@include('back.modules.input-error', ['inputName'=>'date_end'])
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center">
|
|
<h2><small class="text-muted">{{ __('Affichage sur la Homepage') }}</small></h2>
|
|
</div>
|
|
<div class="forms-group border border-1 border-secondary rounded-2 p-3 bg-light wdt50">
|
|
<div class="form-group mb-4">
|
|
<label for="picture_home">{{ __('Image de mise en avant') }} <small class="text-muted">- JPEG/PNG, 2Mo max. Dimensions maximum {{ Config::get('bo.post_home_image_maxwidth') }} px par {{ Config::get('bo.post_home_image_maxheight') }} px</small></label><br/>
|
|
@if (!empty($post->picture_home))
|
|
<input type="file" id="picture_home" name="picture_home" accept="image/png, image/jpeg">
|
|
<br/>
|
|
<br/>
|
|
<img src="{{$post->picture_home}}" alt="{{$post->title}}" style="max-height: 100px;">
|
|
@else
|
|
<input type="file" id="picture_home" name="picture_home" accept="image/png, image/jpeg" required>
|
|
@endif
|
|
@include('back.modules.input-error', ['inputName'=>'picture_home'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="name">{{ __('Text alternatif de l\'image') }} *</label>
|
|
<input type="text" id="alt_text_picture_home" name="alt_text_picture_home" class="form-control" placeholder="{{ __('Texte alternatif de l\'image') }} *" value="{{ old('alt_text_picture_home', $post->alt_text_picture_home ?? '') }}" required>
|
|
@include('back.modules.input-error', ['inputName'=>'alt_text_picture_home'])
|
|
</div>
|
|
<div class="form-group">
|
|
<input class="form-check-input" type="checkbox" id="on_top" name="on_top" @if (old('on_top', $post->on_top) === 1 || old('on_top', $post->on_top) === 'on')checked="checked" @endif>
|
|
<label class="form-check-label" for="on_top">{{ __('A la une') }}</label>
|
|
@include('back.modules.input-error', ['inputName'=>'on_top'])
|
|
</div>
|
|
</div>
|