web/resources/views/update.blade.php

40 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2017-11-20 12:52:52 +01:00
@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">
2017-11-20 23:29:57 +01:00
{{ csrf_field() }}
2017-11-20 12:52:52 +01:00
<label for="subject">Sujet : </label>
2017-11-20 23:29:57 +01:00
<input type="text" id="subject" name="subject" value="{{ $deal->getSubject() }}" /><br>
2017-11-20 12:52:52 +01:00
<label for="body">Description : </label>
2017-11-20 23:29:57 +01:00
<textarea id="body" name="body">{{ $deal->getBody() }}</textarea><br>
2017-11-20 12:52:52 +01:00
<label for="price">Prix : </label>
2017-11-20 23:29:57 +01:00
<input type="text" id="price" name="price" value="{{ $deal->getPrice() }}" /><br>
2017-11-20 12:52:52 +01:00
<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>
2017-11-20 12:58:11 +01:00
@endforeach
2017-11-20 23:29:57 +01:00
</select><br>
2017-11-20 12:52:52 +01:00
<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