@include('admin.partials.errors')
@if(isset($redirection))
{{ Form::model($redirection, ['route' => ['redirections.update', $redirection], 'method' => 'PATCH']) }}
@else
{{ Form::open(['route' => ['redirections.store']]) }}
@endif
{{ FormField::checkbox(['name' => 'is_active', 'label' => 'Active', 'value' => '1', 'errors' => $errors]) }}
{{ FormField::text(['name' => 'origin_url', 'label' => 'Origine *', 'errors' => $errors]) }}
{{ FormField::text(['name' => 'redirection_url', 'label' => 'Destination *', 'errors' => $errors]) }}
{{ FormField::select(['name' => 'page_id', 'options' => \App\Models\Page::selectList(), 'label' => 'Page *', 'errors' => $errors]) }}
{{ FormField::select(['name' => 'type', 'options' => \App\Models\Redirection::getSelectTypes(), 'label' => 'Type *', 'errors' => $errors]) }}
{{ FormField::buttons(['index' => route('redirections.index') , 'label' => isset($redirection) ? 'Mettre à jour' : 'Enregistrer']) }}
{{ Form::close() }}