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.

71 lines
3.4 KiB

  1. @extends('hops')
  2. @section('main') <div class="row">
  3. <div class="col-sm-12 offset-sm-2">
  4. <h1 class="display-3">Update Grain</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('hops.update', $hop->id) }}">
  16. @method('PATCH')
  17. @csrf
  18. <div class="form-group">
  19. <label for="">Name</label>
  20. <input type="text" class="form-control" name="name" value="{{$hop->name}}" />
  21. </div>
  22. <div class="form-group">
  23. <label for="bitter">Bittering?</label>
  24. <input type="checkbox" class="form-control" name="bitter" @if($hop->bitter == 1) checked @endif />
  25. </div>
  26. <div class="form-group">
  27. <label for="aroma">Aroma?</label>
  28. <input type="checkbox" class="form-control" name="aroma" @if($hop->aroma == 1) checked @endif />
  29. </div>
  30. <div class="form-group">
  31. <label for="profile">Profile</label>
  32. <textarea type="text" class="form-control" name="profile" >{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$hop->profile)))))}}</textarea>
  33. </div>
  34. <div class="form-group">
  35. <label for="alpha_acid">Alpha-Acid %</label>
  36. <input type="text" maxlength="9" class="form-control" name="alpha_acid" value="{{$hop->alpha_acid}}" />
  37. </div>
  38. <div class="form-group">
  39. <label for="beta_acid">Beta-Acid %</label>
  40. <input type="text" maxlength="9" class="form-control" name="beta_acid" value="{{$hop->beta_acid}}" />
  41. </div>
  42. <div class="form-group">
  43. <label for="total_oil">Total Oil %</label>
  44. <input type="text" maxlength="9" class="form-control" name="total_oil" value="{{$hop->total_oil}}" />
  45. </div>
  46. <div class="form-group">
  47. <label for="cohumulone">Cohumulone %</label>
  48. <input type="text" maxlength="9" class="form-control" name="cohumulone" value="{{$hop->cohumulone}}" />
  49. </div>
  50. <div class="form-group">
  51. <label for="myrcene">Myrcene %</label>
  52. <input type="text" maxlength="9" class="form-control" name="myrcene" value="{{$hop->myrcene}}" />
  53. </div>
  54. <div class="form-group">
  55. <label for="humulene">Humulene %</label>
  56. <input type="text" maxlength="9" class="form-control" name="humulene" value="{{$hop->humulene}}" />
  57. </div>
  58. <div class="form-group">
  59. <label for="farnesene">Farnesene %</label>
  60. <input type="text" maxlength="9" class="form-control" name="farnesene" value="{{$hop->farnesene}}" />
  61. </div>
  62. <div class="form-group">
  63. <label for="caryophyllene">Caryophyllene</label>
  64. <input type="text" maxlength="9" class="form-control" name="caryophyllene" value="{{$hop->caryophyllene}}" />
  65. </div>
  66. <button type="submit" class="btn btn-primary">Update</button>
  67. </form>
  68. </div>
  69. </div>
  70. @endsection