55 lines
2.1 KiB
PHP
55 lines
2.1 KiB
PHP
@extends('layouts.main')
|
|
|
|
@section('content')
|
|
<h2>
|
|
<i class="fa fa-folder">
|
|
<i class="fas fa-ticket-alt"></i>
|
|
</i>
|
|
{{ __('Nouvelle campagne') }}
|
|
</h2>
|
|
<div class="form-wrapper">
|
|
@if ($errors->any())
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
<form action="{{ route('campagne.store') }}" method="POST">
|
|
@csrf
|
|
<div class="form-split">
|
|
<div class="form-field">
|
|
<label>{{ __('Nom') }}</label>
|
|
<input type="text" name="camp_name" value="{{ old('camp_name') }}" required>
|
|
</div>
|
|
<div class="form-field">
|
|
<label>{{ __('Type') }}</label>
|
|
<select name="camp_type" id="camp_type">
|
|
@foreach (CampaignTypes::toArray() as $type)
|
|
<option value="{{ $type->value }}" @if (old('camp_type') === $type->value) selected @endif>{{ $type->label }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-split">
|
|
<div class="form-field">
|
|
<label>{{ __('Publier') }}</label>
|
|
<select name="camp_published">
|
|
<option value="0" @if (old('camp_published') === 0) selected @endif>{{ __('Non') }}</option>
|
|
<option value="1" @if (old('camp_published') === 1) selected @endif>{{ __('Oui') }}</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-field limitPrinting">
|
|
<label for="camp_limitedPrinting">{{ __('Limiter les impressions à 1 BR à la fois') }}</label>
|
|
<input id="camp_limitedPrinting" name="camp_limitedPrinting" type="checkbox" value="1">
|
|
<label for="camp_limitedPrinting"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-field submit">
|
|
<input type="submit" value="{{ __('Enregistrer') }}">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@endsection
|