My beer compendium
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.

60 lines
2.7 KiB

  1. @extends('adjunctadditions')
  2. @section('main') <div class="row">
  3. <div class="col-sm-12">
  4. <h1 class="display-3">Update Adjunct Addition</h1>
  5. @if ($errors->any())
  6. <div class="alert alert-danger">
  7. <ul>
  8. @foreach ($errors->all() as $error)
  9. <li>{{ $error }}</li>
  10. @endforeach
  11. </ul>
  12. </div>
  13. <br />
  14. @endif
  15. <form method="post" action="{{ route('adjunctadditions.update', $adjunctaddition->id) }}">
  16. @method('PATCH')
  17. @csrf
  18. <div class="form-group">
  19. <label for="beer_id">Beer</label>
  20. <select class="form-control" name="beer_id">
  21. @foreach ($beers as $beer)
  22. <option value="{{$beer->beer_id}}" {{ $selected_beer == $beer->beer_id ? 'selected="selected"' : '' }}>{{$beer->name}}</option>
  23. @endforeach
  24. </select>
  25. </div>
  26. <div class="form-group">
  27. <label for="adjunct_id">Adjunct</label>
  28. <select class="form-control" name="adjunct_id">
  29. @foreach ($adjuncts as $adjunct)
  30. <option value="{{$adjunct->id}}" {{ $selected_adjunct == $adjunct->id ? 'selected="selected"' : '' }}>{{$adjunct->name}}</option>
  31. @endforeach
  32. </select>
  33. </div>
  34. <div class="form-group">
  35. <label for="amount">Amount</label>
  36. <input type="text" maxlength="10" class="form-control" name="amount" value="{{$adjunctaddition->amount}}" />
  37. </div>
  38. <div class="form-group">
  39. <label for="timing">Timing</label>
  40. <input type="text" maxlength="10" class="form-control" name="timing" value="{{$adjunctaddition->timing}}" />
  41. </div>
  42. <div class="form-group">
  43. <label for="alternative">Alternative</label>
  44. <select class="form-control" name="alternative">
  45. <option value="">None suggested</option>
  46. @foreach ($adjuncts as $adjunct)
  47. <option value="{{$adjunct->id}}" {{ !(is_null($adjunctaddition->alternative)) & $selected_alt == $adjunct->id ? 'selected="selected"' : '' }}>{{$adjunct->name}}</option>
  48. @endforeach
  49. </select>
  50. </div>
  51. <div class="form-group">
  52. <label for="notes">Notes</label>
  53. <textarea type="text" class="form-control" name="notes">{{$adjunctaddition->notes}}</textarea>
  54. </div>
  55. <button type="submit" class="btn btn-primary">Update</button>
  56. </form>
  57. </div>
  58. </div>
  59. @endsection