Browse Source

trying to add dropdowns to edit blades - adjunctadditions mkVII

master
jk 3 years ago
parent
commit
0a44c8a356
  1. 4
      resources/views/adjunctadditions/edit.blade.php
  2. 4
      resources/views/fermentations/edit.blade.php

4
resources/views/adjunctadditions/edit.blade.php

@ -43,9 +43,9 @@
<div class="form-group">
<label for="alternative">Alternative</label>
<select class="form-control" name="alternative">
<option value="" @if (is_null($adjunct->alternative)) selected="selected" @endif>None suggested</option>
<option value="" @if (is_null($adjunctaddition->alternative)) selected="selected" @endif>None suggested</option>
@foreach ($adjuncts as $adjunct)
<option value="{{$adjunct->id}}" {{ !(is_null($adjunct->alternative)) & $selected_alt == $adjunct->alternative ? 'selected="selected"' : '' }}>{{$adjunct->name}}</option>
<option value="{{$adjunct->id}}" {{ !(is_null($adjunctaddition->alternative)) & $selected_alt == $adjunct->alternative ? 'selected="selected"' : '' }}>{{$adjunct->name}}</option>
@endforeach
</select>
</div>

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

@ -43,9 +43,9 @@
<div class="form-group">
<label for="alternative">Alternative (ID)</label>
<select class="form-control" name="alternative">
<option value="">None suggested</option>
<option value="" @if (is_null($fermentation->alternative)) selected="selected" @endif>None suggested</option>
@foreach ($yeasts as $yeast)
<option value="{{$yeast->id}}" {{ $selected_alt == $yeast->id ? 'selected="selected"' : '' }}>{{$yeast->name}}</option>
<option value="{{$yeast->id}}" {{ !(is_null($fermentation->alternative)) & $selected_alt == $yeast->id ? 'selected="selected"' : '' }}>{{$yeast->name}}</option>
@endforeach
</select>
</div>

Loading…
Cancel
Save