- Introduce Flash Message to refactorize code
- npm i sweetalert2 --save-dev - create confirm module - replace all natives confirm with sweet alert
This commit is contained in:
parent
e13cf5f750
commit
d81e4df777
58 changed files with 214 additions and 419 deletions
|
|
@ -99,6 +99,7 @@ class AdsController extends Controller
|
|||
|
||||
$a->delete();
|
||||
|
||||
return redirect()->route('bo.ads.index');
|
||||
return redirect()->route('bo.ads.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,8 @@ class ArticlesController extends Controller
|
|||
$article->notifiable()->delete();
|
||||
$article->delete();
|
||||
|
||||
return redirect()->route('bo.articles.index');
|
||||
return redirect()->route('bo.articles.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function exportSondage(Articles $article)
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ class BalancedMenusController extends Controller
|
|||
|
||||
$m->delete();
|
||||
|
||||
return redirect()->route('bo.balanced-menus.index');
|
||||
return redirect()->route('bo.balanced-menus.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ class BreederPortraitController extends Controller
|
|||
|
||||
$breederportrait->delete();
|
||||
|
||||
return redirect()->route('bo.breederportraits.index');
|
||||
return redirect()->route('bo.breederportraits.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ class ConsumptionTimesController extends Controller
|
|||
);
|
||||
}
|
||||
|
||||
return redirect()->route('bo.consumption-times.index');
|
||||
return redirect()->route('bo.consumption-times.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ class FaqQuestionsController extends Controller
|
|||
{
|
||||
$q->delete();
|
||||
|
||||
return redirect()->route('bo.faq-questions.index');
|
||||
return redirect()->route('bo.faq-questions.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ class FaqThemesController extends Controller
|
|||
->withErrors('Le thème que vous souhaitez supprimer est encore lié à une ou plusieurs question(s).');
|
||||
}
|
||||
|
||||
return redirect()->route('bo.faq-themes.index');
|
||||
return redirect()->route('bo.faq-themes.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder($id, $action)
|
||||
|
|
|
|||
|
|
@ -191,7 +191,8 @@ class HomeSliderPicturesController extends Controller
|
|||
|
||||
$h->delete();
|
||||
|
||||
return redirect()->route('bo.home-slider-pictures.index');
|
||||
return redirect()->route('bo.home-slider-pictures.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder($id, $action)
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class MeatTypesController extends Controller
|
|||
}
|
||||
$mt->delete();
|
||||
|
||||
return redirect()->route('bo.meat-types.index');
|
||||
return redirect()->route('bo.meat-types.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,7 +438,8 @@ class MomentsController extends Controller
|
|||
|
||||
$m->delete();
|
||||
|
||||
return redirect()->route('bo.moments.index');
|
||||
return redirect()->route('bo.moments.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@ class NewsSliderPicturesController extends Controller
|
|||
|
||||
$n->delete();
|
||||
|
||||
return redirect()->route('bo.news-slider-pictures.index');
|
||||
return redirect()->route('bo.news-slider-pictures.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder($id, $action)
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ class OCBBreedersController extends Controller
|
|||
public function destroy(OCBBreeder $b)
|
||||
{
|
||||
$b->delete();
|
||||
return redirect()->route('bo.ocbbreeders.index', $b->ocbType);
|
||||
return redirect()->route('bo.ocbbreeders.index', $b->ocbType)
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ class OCBContentController extends Controller
|
|||
|
||||
$ocb->delete();
|
||||
|
||||
return redirect()->route('bo.ocb.content', $ocb->type);
|
||||
return redirect()->route('bo.ocb.content', $ocb->type)
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder(OCBContent $current, $action)
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ class ProductPictogramsController extends Controller
|
|||
}
|
||||
$pp->delete();
|
||||
|
||||
return redirect()->route('bo.product-pictograms.index');
|
||||
return redirect()->route('bo.product-pictograms.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,8 @@ class ProductSliderPicturesController extends Controller
|
|||
|
||||
$p->delete();
|
||||
|
||||
return redirect()->route('bo.product-slider-pictures.index');
|
||||
return redirect()->route('bo.product-slider-pictures.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder($id, $action)
|
||||
|
|
|
|||
|
|
@ -441,7 +441,8 @@ class ProductsController extends Controller
|
|||
->withErrors('Le produit que vous souhaitez supprimer est encore lié à une ou plusieurs recette(s).');
|
||||
}
|
||||
|
||||
return redirect()->route('bo.products.index');
|
||||
return redirect()->route('bo.products.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder($id, $action)
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ class RangesController extends Controller
|
|||
|
||||
$r->delete();
|
||||
|
||||
return redirect()->route('bo.ranges.index');
|
||||
return redirect()->route('bo.ranges.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function changeOrder($id, $action)
|
||||
|
|
|
|||
|
|
@ -153,7 +153,8 @@ class RecipesController extends Controller
|
|||
$r->notifiable()->delete();
|
||||
$r->delete();
|
||||
|
||||
return redirect()->route('bo.recipes.index');
|
||||
return redirect()->route('bo.recipes.index')
|
||||
->with('warning', 'Le contenu à bien été supprimé');
|
||||
}
|
||||
|
||||
public function highlights()
|
||||
|
|
|
|||
16
package-lock.json
generated
16
package-lock.json
generated
|
|
@ -45,6 +45,7 @@
|
|||
"resolve-url-loader": "^3.1.4",
|
||||
"sass": "1.32.*",
|
||||
"sass-loader": "^8.0.2",
|
||||
"sweetalert2": "^11.1.5",
|
||||
"vue": "^2.6.14",
|
||||
"vue-loader": "^15.9.8",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
|
|
@ -9562,6 +9563,15 @@
|
|||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sweetalert2": {
|
||||
"version": "11.1.5",
|
||||
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.1.5.tgz",
|
||||
"integrity": "sha512-5cfqUK9lLbvxtjzsvORKWj+d3tcgYlzsL60FoJFXE/+mtMa5EJ3tDax9p9MBjVnZ60gQd+WGrqDIrxoNenhUjA==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://sweetalert2.github.io/#donations"
|
||||
}
|
||||
},
|
||||
"node_modules/tapable": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||
|
|
@ -17985,6 +17995,12 @@
|
|||
"stable": "^0.1.8"
|
||||
}
|
||||
},
|
||||
"sweetalert2": {
|
||||
"version": "11.1.5",
|
||||
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.1.5.tgz",
|
||||
"integrity": "sha512-5cfqUK9lLbvxtjzsvORKWj+d3tcgYlzsL60FoJFXE/+mtMa5EJ3tDax9p9MBjVnZ60gQd+WGrqDIrxoNenhUjA==",
|
||||
"dev": true
|
||||
},
|
||||
"tapable": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
"resolve-url-loader": "^3.1.4",
|
||||
"sass": "1.32.*",
|
||||
"sass-loader": "^8.0.2",
|
||||
"sweetalert2": "^11.1.5",
|
||||
"vue": "^2.6.14",
|
||||
"vue-loader": "^15.9.8",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
|
|
|
|||
34
resources/js/app.js
vendored
34
resources/js/app.js
vendored
|
|
@ -10,6 +10,40 @@ require('vue-select-image/dist/vue-select-image.css');
|
|||
window.Vue = require('vue/dist/vue.min.js');
|
||||
import CKEditor from '@ckeditor/ckeditor5-vue2';
|
||||
import VueSelectImage from 'vue-select-image';
|
||||
// ES6 Modules or TypeScript
|
||||
import Swal from 'sweetalert2';
|
||||
|
||||
// bootstrap styling
|
||||
window.Swal = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-lg btn-success ml-3 mr-3',
|
||||
cancelButton: 'btn btn-lg btn-danger ml-3 mr-3'
|
||||
},
|
||||
buttonsStyling: false
|
||||
})
|
||||
|
||||
// register modules
|
||||
let modules = require.context("./modules", true, /\.js$/i);
|
||||
window.confirmJS = modules('./confirm.js').default.methods.confirm
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.confirmDeleteJS').on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
confirmJS(
|
||||
'Confirmez',
|
||||
'Voulez-vous vraiment supprimer cet élément ?',
|
||||
this,
|
||||
function (response) {
|
||||
this.submit()
|
||||
},
|
||||
{
|
||||
'icon': 'error'
|
||||
}
|
||||
)
|
||||
return false
|
||||
})
|
||||
})
|
||||
|
||||
Vue.use( CKEditor );
|
||||
Vue.use( VueSelectImage )
|
||||
|
||||
|
|
|
|||
37
resources/js/modules/confirm.js
vendored
Normal file
37
resources/js/modules/confirm.js
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
export default {
|
||||
methods: {
|
||||
confirm(title, text = '', self, after, options = {}) {
|
||||
if (!self) {
|
||||
throw Error('self is needed to set "this" on callback');
|
||||
}
|
||||
if (!after) {
|
||||
throw Error('callback is needed when using confirm');
|
||||
}
|
||||
let icon = options.icon ?? 'warning'
|
||||
let confirm = options.confirm ?? 'Oui'
|
||||
let cancel = options.confirm ?? 'Annuler'
|
||||
Swal.fire({
|
||||
title: title,
|
||||
text: text,
|
||||
icon: icon,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: confirm,
|
||||
cancelButtonText: cancel,
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
if (after) {
|
||||
after.apply(self, [result])
|
||||
}
|
||||
} else if (
|
||||
/* Read more about handling dismissals below */
|
||||
result.dismiss === Swal.DismissReason.cancel
|
||||
) {
|
||||
Swal.fire('L\'opération n\'as pas été effectuée')
|
||||
}
|
||||
})
|
||||
return false;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -12,15 +12,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" placeholder="Titre *" value="{{ old('title') }}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Saga publicitaire
|
||||
<a href="{{route('bo.ads.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.ads.destroy', ['ad' => $a->id])}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.ads.destroy', ['ad' => $a->id])}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -19,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" placeholder="Titre *" value="{{$a->title}}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,20 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" placeholder="Titre *" value="{{ old('title') }}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<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', $article->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.articles.destroy', $article->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -19,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" placeholder="Titre *" value="{{old('title') ?? $article->title ?? ''}}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,15 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-4">Produit associé *</label>
|
||||
<select class="custom-select col-md-8" name="product_id">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'un menu
|
||||
<a href="{{route('bo.balanced-menus.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.balanced-menus.destroy', $m)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.balanced-menus.destroy', $m)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -18,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-4">Produit associé *</label>
|
||||
<select class="custom-select col-md-8" name="product_id">
|
||||
|
|
|
|||
|
|
@ -14,15 +14,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@include('bo.breederportraits.formInputs')
|
||||
<div class="form-group text-center">
|
||||
<input type="submit" class="btn btn-secondary" value="Ajouter">
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
<div class="card-header">
|
||||
{{__('Modification d\'un portait d\'éleveur') }}
|
||||
<a href="{{route('bo.breederportraits.index')}}" class="btn btn-sm btn-primary float-right ml-2">{{__('Retour') }}</a>
|
||||
<form action="{{route('bo.breederportraits.destroy', $breederportrait)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.breederportraits.destroy', $breederportrait)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -20,20 +20,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@include('bo.breederportraits.formInputs')
|
||||
<div class="form-group text-center">
|
||||
<input type="submit" class="btn btn-secondary" value="Modifier">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<div class="card-header">
|
||||
Moments Consommations
|
||||
<a href="{{route('bo.consumption-times.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.consumption-times.destroy', ['consumption_time' => $ct->id])}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.consumption-times.destroy', ['consumption_time' => $ct->id])}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -18,11 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="name" placeholder="Nom" value="{{$ct->name}}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,20 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session()->has('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session()->get('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@include('bo.engagements.form-inputs')
|
||||
<div class="form-group text-center">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('Modifier') }}</button>
|
||||
|
|
|
|||
|
|
@ -13,15 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="question" placeholder="Question *" value="{{ old('question') }}" required></textarea>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'une question
|
||||
<a href="{{route('bo.faq-questions.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.faq-questions.destroy', $q->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.faq-questions.destroy', $q->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -19,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="question" placeholder="Question *" required>{{$q->question}}</textarea>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,15 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="name" placeholder="Nom *" value="{{ old('name') }}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'un thème
|
||||
<a href="{{route('bo.faq-themes.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.faq-themes.destroy', $f->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.faq-themes.destroy', $f->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -19,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="name" placeholder="Nom *" value="{{$f->name}}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,15 +8,6 @@
|
|||
</div>
|
||||
<form action="{{route('bo.home-slider-pictures.store')}}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><em>Champs généraux</em></li>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'une slide pour l'accueil
|
||||
<a href="{{route('bo.home-slider-pictures.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.home-slider-pictures.destroy', $h->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.home-slider-pictures.destroy', $h->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -17,20 +16,6 @@
|
|||
<form action="{{route('bo.home-slider-pictures.update', $h->id)}}" method="POST" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><em>Champs généraux</em></li>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<div class="card-header">
|
||||
Types de viande
|
||||
<a href="{{route('bo.meat-types.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.meat-types.destroy', ['meat_type' => $mt->id])}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.meat-types.destroy', ['meat_type' => $mt->id])}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
53
resources/views/bo/modules/flashMessage.blade.php
Normal file
53
resources/views/bo/modules/flashMessage.blade.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ __('Fermer') }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ __('Fermer') }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($message = Session::get('warning'))
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ __('Fermer') }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($message = Session::get('info'))
|
||||
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ __('Fermer') }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
@if ($errors->any())
|
||||
<ul class="list-unstyled">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ __('Fermer') }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -29,15 +29,6 @@
|
|||
</div>
|
||||
<form action="{{route('bo.moments.store')}}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><em>Champs généraux</em></li>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -25,31 +25,16 @@
|
|||
<div class="card-header">
|
||||
Modification d'un moment
|
||||
<a href="{{route('bo.moments.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.moments.destroy', $m->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.moments.destroy', $m->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form action="{{route('bo.moments.update', $m->id)}}" method="POST" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><em>Champs généraux</em></li>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -8,15 +8,6 @@
|
|||
</div>
|
||||
<form action="{{route('bo.news-slider-pictures.store')}}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><em>Champs généraux</em></li>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -5,30 +5,15 @@
|
|||
<div class="card-header">
|
||||
Modification d'une slide pour les actualités
|
||||
<a href="{{route('bo.news-slider-pictures.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.news-slider-pictures.destroy', $n->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.news-slider-pictures.destroy', $n->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
<form action="{{route('bo.news-slider-pictures.update', $n->id)}}" method="POST" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><em>Champs généraux</em></li>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -13,15 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label>Visuel * de type JPEG/PNG - 2Mo max. - 1366 x 553px</label></br>
|
||||
<input type="file" name="picture" accept="image/png, image/jpeg" required>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'un contenu
|
||||
<a href="{{route('bo.ocb.content', $ocb->type)}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.ocb.destroy', $ocb)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.ocb.destroy', $ocb)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -19,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label>Visuel * de type JPEG/PNG - 2Mo max. - 1366 x 553px</label></br>
|
||||
<input type="file" name="picture" accept="image/png, image/jpeg">
|
||||
|
|
|
|||
|
|
@ -12,15 +12,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@include('bo.ocbbreeders.formInputs')
|
||||
<div class="form-group text-center">
|
||||
<input type="submit" class="btn btn-secondary" value="Ajouter">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<div class="card-header">
|
||||
{{__('Modification d\'un éleveur') }} - <b>{{ $type->label }}</b>
|
||||
<a href="{{route('bo.ocbbreeders.index', $type)}}" class="btn btn-sm btn-primary float-right ml-2">{{__('Retour') }}</a>
|
||||
<form action="{{route('bo.ocbbreeders.destroy', $breeder->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.ocbbreeders.destroy', $breeder->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -18,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@include('bo.ocbbreeders.formInputs')
|
||||
<div class="form-group text-center">
|
||||
<input type="submit" class="btn btn-secondary" value="Modifier">
|
||||
|
|
|
|||
|
|
@ -12,15 +12,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="name" placeholder="Nom" value="{{ old('name') }}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<div class="card-header">
|
||||
Pictogrammes produits
|
||||
<a href="{{route('bo.product-pictograms.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.product-pictograms.destroy', ['product_pictogram' => $pp->id])}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.product-pictograms.destroy', ['product_pictogram' => $pp->id])}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -18,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="name" placeholder="Nom" value="{{$pp->name}}" readonly required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,15 +12,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label>Visuel * de type JPEG/PNG - 2Mo max. - 1366 x 553px</label>
|
||||
<input type="file" name="picture" accept="image/png, image/jpeg" required>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'une slide pour les produits
|
||||
<a href="{{route('bo.product-slider-pictures.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.product-slider-pictures.destroy', $p->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.product-slider-pictures.destroy', $p->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -17,22 +16,8 @@
|
|||
<form action="{{route('bo.product-slider-pictures.update', $p->id)}}" method="POST" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label>Visuel * de type JPEG/PNG - 2Mo max. - 1366 x 553px</label>
|
||||
<input type="file" name="picture" accept="image/png, image/jpeg">
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
Modification d'un produit
|
||||
<a href="{{route('bo.products.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<a href="{{route('product.show', $p)}}" target="_blank" class="btn btn-sm btn-success float-right ml-2">Voir le produit</a>
|
||||
<form action="{{route('bo.products.destroy', $p->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.products.destroy', $p->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,15 +12,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="name" placeholder="Nom *" value="{{ old('name') }}" required>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
<div class="card-header">
|
||||
Gammes
|
||||
<a href="{{route('bo.ranges.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.ranges.destroy', ['range' => $r->id])}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.ranges.destroy', ['range' => $r->id])}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer"
|
||||
onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,15 +13,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<div class="card-header">
|
||||
Modification d'une recette
|
||||
<a href="{{route('bo.recipes.index')}}" class="btn btn-sm btn-primary float-right ml-2">Retour</a>
|
||||
<form action="{{route('bo.recipes.destroy', $r->id)}}" method="POST" class="d-inline">
|
||||
<form action="{{route('bo.recipes.destroy', $r->id)}}" method="POST" class="d-inline confirmDeleteJS">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
|
||||
<input type="submit" class="btn btn-sm btn-danger float-right" value="Supprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -18,20 +18,6 @@
|
|||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2">
|
||||
@if (session()->has('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session()->get('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@include('bo.recipes.form-inputs')
|
||||
<div class="form-group text-center">
|
||||
<input type="submit" class="btn btn-secondary" value="Modifier">
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
@include('bo.modules.flashMessage')
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue