You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.4 KiB
56 lines
2.4 KiB
@extends('fermentations')
|
|
@section('main') <div class="row">
|
|
<div class="col-sm-12">
|
|
<h1 class="display-3">Update Fermentation Step</h1>
|
|
|
|
@if ($errors->any())
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
<br />
|
|
@endif
|
|
<form method="post" action="{{ route('fermentations.update', $fermentation->id) }}">
|
|
@method('PATCH')
|
|
@csrf
|
|
<div class="form-group">
|
|
<label for="beer_id">Beer</label>
|
|
<select class="form-control" name="beer_id">
|
|
@foreach ($beers as $beer)
|
|
<option value="{{$beer->beer_id}}" {{ $selected_beer == $beer->beer_id ? 'selected="selected"' : '' }}>{{$beer->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="yeast_id">Yeast</label>
|
|
<select class="form-control" name="yeast_id">
|
|
@foreach ($yeasts as $yeast)
|
|
<option value="{{$yeast->id}}" {{ $selected_yeast == $yeast->id ? 'selected="selected"' : '' }}>{{$yeast->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="temperature">Temperature</label>
|
|
<input type="text" maxlength="20" class="form-control" name="temperature" value="{{$fermentation->temperature}}" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="duration">Duration</label>
|
|
<textarea type="text" class="form-control" name="duration">{{$fermentation->duration}}</textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="alternative">Alternative (ID)</label>
|
|
<select class="form-control" name="alternative">
|
|
<option value="">None suggested</option>
|
|
@foreach ($yeasts as $yeast)
|
|
<option value="{{$yeast->id}}" {{ !(is_null($fermentation->alternative)) & $selected_alt == $yeast->id ? 'selected="selected"' : '' }}>{{$yeast->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection
|