Edit paddock name and state.
TODO: keep track of paddock openings.
This commit is contained in:
40
resources/views/paddock/edit.blade.php
Normal file
40
resources/views/paddock/edit.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
@extends('paddock.layout')
|
||||
|
||||
@section('content')
|
||||
<h2>Édition d'un enclos</h2>
|
||||
<br>
|
||||
|
||||
<form action="{{ route('paddocks.update', $paddock->id) }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
@method('PATCH')
|
||||
|
||||
<strong>Nom</strong>
|
||||
<input type="text"
|
||||
name="name"
|
||||
value="{{ $paddock->name }}">
|
||||
<span class="text-danger">{{ $errors->first('name') }}</span>
|
||||
|
||||
<!-- Paddock status -->
|
||||
<fielset>
|
||||
<strong>Statut</strong>
|
||||
|
||||
<input type="radio"
|
||||
name="state"
|
||||
value="opened"
|
||||
id="paddock-state-opened"
|
||||
{{ $paddock->isClosed ? '' : 'checked' }}>
|
||||
<label for="paddock-state-opened">Ouvert</label>
|
||||
|
||||
<input type="radio"
|
||||
name="state"
|
||||
value="closed"
|
||||
id="paddock-state-closed"
|
||||
{{ $paddock->isClosed ? 'checked' : '' }}>
|
||||
<label for="paddock-state-closed">Fermé</label>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<button type="submit">Mettre à jour</button>
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user