ldc-jeusselin/resources/views/bo/articles/edit.blade.php
Jérémy Munsch de4dcfb283
Closes #2 and #4
- Add status checker + admin secure packages + upgrade enum + add sentry + upgrade to sitemap generator + bump to CRMV2
- Set customer role enum and user role enum
- Update customer migration to set roles
- phpcbf
- faker local to fr
- update lang
- composer update
- bump laravel ui
- Redo all user crud
- npm bump
- Create admin command
- rearrange views
- redo all auth system
- redo customer pro bo
2023-08-21 15:43:33 +02:00

79 lines
3.8 KiB
PHP

@extends('layouts.bo')
@section('content')
<div class="card">
<div class="card-header">
Modification d'un article
<a href="{{route('bo.articles.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
<form action="{{route('bo.articles.destroy', $a->id)}}" method="POST" class="d-inline">
@method('DELETE')
@csrf
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
onclick="return confirm('Êtes-vous sûr(e) ?')">
</form>
</div>
<div class="card-body">
<form action="{{route('bo.articles.update', $a->id)}}" method="POST" enctype="multipart/form-data">
@method('PUT')
@csrf
<div class="row">
<div class="col-md-8 offset-md-2">
<div class="form-group">
<input type="text" class="form-control" name="title" placeholder="Titre *" value="{{$a->title}}" required>
</div>
<div class="form-group">
<label>Visuel * de type JPEG/PNG - 2Mo max. - 340 x 340px</label>
<input type="file" name="picture" accept="image/png, image/jpeg">
</br>
</br>
<img src="{{ asset($a->picture) }}" style="max-height: 200px;">
</div>
<div class="form-group">
<label>Visuel * de type JPEG/PNG - 2Mo max. - 780 x 508px</label>
<input type="file" name="picture_r" accept="image/png, image/jpeg">
</br>
</br>
<img src="{{ asset($a->picture_r) }}" style="max-height: 200px;">
</div>
<div class="form-group">
<label class="col-form-label">Contenu *</label>
<custom-ckeditor name="content" dbtext="{{ $a->content }}"></custom-ckeditor>
</div>
<div class="form-group row">
<label class="col-form-label col-md-3">Catégorie *</label>
<select class="custom-select col-md-9" id="category" name="category">
@foreach ($ac as $article_category)
@if ($article_category->id === $a->category_id)
<option value="{{$article_category->id}}" selected>{{$article_category->name}}</option>
@else
<option value="{{$article_category->id}}">{{$article_category->name}}</option>
@endif
@endforeach
</select>
</div>
<div class="form-group">
<label>
@if ($a->status === 1)
<input type="checkbox" name="status" value="1" checked>
@else
<input type="checkbox" name="status" value="1">
@endif
Publié ?
</label>
</div>
<div class="form-group text-center">
<input type="submit" class="btn btn-secondary" value="Modifier">
</div>
</div>
</div>
</form>
</div>
</div>
@endsection
@section('scripts')
<script>
</script>
@endsection