web/resources/views/update.blade.php

38 lines
1.9 KiB
PHP
Raw 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">
<label for="subject">Sujet : </label>
<input type="text" id="subject" name="subject" value="{{ $deal->getSubject() }}" />
<label for="body">Description : </label>
<textarea id="body" name="body">{{ $deal->getBody() }}</textarea>
<label for="price">Prix : </label>
<input type="text" id="price" name="price" value="{{ $deal->getPrice() }}" />
<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 }}"{{ $deal->getCategory() === $id ? ' selected="selected"': '' }}>{{ $category }}</option>
</select>
<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