web/resources/views/update.blade.php
Clement Desmidt be5336fc13 🔧 Utilise l'id plutôt que le nom
Comme ça, s'il change, on est safe
2017-11-21 07:20:14 +01:00

40 lines
2.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Dashboard − <a href="<?php echo route('deals.list', ['type' => $type]); ?>">Revenir à la liste</a></div>
<div class="panel-body">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<form method="post">
{{ csrf_field() }}
<label for="subject">Sujet : </label>
<input type="text" id="subject" name="subject" value="{{ $deal->getSubject() }}" /><br>
<label for="body">Description : </label>
<textarea id="body" name="body">{{ $deal->getBody() }}</textarea><br>
<label for="price">Prix : </label>
<input type="text" id="price" name="price" value="{{ $deal->getPrice() }}" /><br>
<label for="category">Catégorie : </label>
<select id="category" name="category">
<option value="">−</option>
@foreach(\Shikiryu\LBCReposter\Categories::$categories as $id => $category)
<<option value="{{ $id }}" @if( $deal->getIdCategory() === $id ) selected="selected" @endif>{{ $category }}</option>
@endforeach
</select><br>
<input type="submit" value="Modifier" />
</form>
</div>
<div class="panel-footer"><a href="<?php echo route('deals.list', ['type' => $type]); ?>">Revenir à la liste</a></div>
</div>
</div>
</div>
</div>
@endsection