Browse Source

fermentations refactor mkV

master
jk 3 years ago
parent
commit
fcad65bb74
  1. 43
      resources/views/fermentation/edit.blade.php
  2. 10
      resources/views/fermentations/edit.blade.php

43
resources/views/fermentation/edit.blade.php

@ -1,43 +0,0 @@
@extends('fermentations')
@section('main') <div class="row">
<div class="col-sm-12 offset-sm-2">
<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 ID</label>
<input type="text" class="form-control" name="beer_id" value="{{$fermentation->beer_id}}" />
</div>
<div class="form-group">
<label for="yeast_id">Yeast ID</label>
<input type="text" class="form-control" name="yeast_id" value="{{$fermentation->yeast_id}}" />
</div>
<div class="form-group">
<label for="temperature">Temperature</label>
<input type="text" 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>
<input type="text" class="form-control" name="alternative" value="{{$fermentation->alternative}}" />
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
</div>
@endsection

10
resources/views/fermentations/edit.blade.php

@ -18,23 +18,23 @@
@csrf @csrf
<div class="form-group"> <div class="form-group">
<label for="beer_id">Beer ID</label> <label for="beer_id">Beer ID</label>
<input type="text" class="form-control" name="beer_id" value="{{@fermentation->beer_id}}" />
<input type="text" class="form-control" name="beer_id" value="{{$fermentation->beer_id}}" />
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="yeast_id">Yeast ID</label> <label for="yeast_id">Yeast ID</label>
<input type="text" class="form-control" name="yeast_id" value="{{@fermentation->yeast_id}}" />
<input type="text" class="form-control" name="yeast_id" value="{{$fermentation->yeast_id}}" />
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="temperature">Temperature</label> <label for="temperature">Temperature</label>
<input type="text" class="form-control" name="temperature" value="{{@fermentation->temperature}}" />
<input type="text" class="form-control" name="temperature" value="{{$fermentation->temperature}}" />
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="duration">Duration</label> <label for="duration">Duration</label>
<textarea type="text" class="form-control" name="duration">{{@fermentation->duration}}</textarea>
<textarea type="text" class="form-control" name="duration">{{$fermentation->duration}}</textarea>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="alternative">Alternative (ID)</label> <label for="alternative">Alternative (ID)</label>
<input type="text" class="form-control" name="alternative" value="{{@fermentation->alternative}}" />
<input type="text" class="form-control" name="alternative" value="{{$fermentation->alternative}}" />
</div> </div>
<button type="submit" class="btn btn-primary">Update</button> <button type="submit" class="btn btn-primary">Update</button>
</form> </form>

Loading…
Cancel
Save