@extends('beers.edit.layout') @section('main_content')

{{ trans('beers.edit.title') }}

@include('flash::message') @if ($errors->any())
{{ trans('beers.edit.errors') }}
@endif {!! Form::model($beer, ['route' => ['beer.edit.beer_information.post', $beer->username], 'class' => 'margin-right', 'method' => 'post', 'files' => true]) !!}
{{ trans('beers.general_information') }}
{{ Form::label('name', trans('beers.name'), ['class' => 'control-label']) }} {{ Form::text('name', null, ['class' => 'form-control']) }} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{{ Form::label('alcohol_level', trans('beers.alcohol_level'), ['class' => 'control-label']) }} {{ Form::text('alcohol_level', null, ['class' => 'form-control']) }} @if ($errors->has('alcohol_level')) {{ $errors->first('alcohol_level') }} @endif
{{ Form::label('color', trans('beers.color'), ['class' => 'control-label']) }} {{ Form::select('color', [null => trans('beers.select_color')] + $colors, null, ['class' => 'form-control']) }} @if ($errors->has('color')) {{ $errors->first('color') }} @endif
{{ Form::label('fermentation', trans('beers.fermentation'), ['class' => 'control-label']) }} {{ Form::select('fermentation', [null => trans('beers.select_fermentation')] + $fermentations, null, ['class' => 'form-control']) }} @if ($errors->has('fermentation')) {{ $errors->first('fermentation') }} @endif
{{ Form::label('type', trans('beers.type'), ['class' => 'control-label']) }} {{ Form::select('type', [null => trans('beers.select_type')] + $types, null, ['class' => 'form-control']) }} @if ($errors->has('type')) {{ $errors->first('type') }} @endif
{{ Form::label('transparency', trans('beers.transparency'), ['class' => 'control-label']) }} {{ Form::select('transparency', [null => trans('beers.select_transparency')] + $transparencies, null, ['class' => 'form-control']) }} @if ($errors->has('transparency')) {{ $errors->first('transparency') }} @endif
{{ trans('beers.composition_taste') }}
{{ Form::label('tastes', trans('beers.tastes'), ['class' => 'control-label']) }} {{ Form::select('tastes[]', $tastes, null, ['multiple' => 'multiple', 'class' => 'form-control']) }} @if ($errors->has('tastes')) {{ $errors->first('tastes') }} @endif
{{ Form::label('ibu', trans('beers.ibu'), ['class' => 'control-label']) }} {{ Form::text('ibu', null, ['class' => 'form-control']) }} @if ($errors->has('ibu')) {{ $errors->first('ibu') }} @endif
{{ Form::label('hop_type', trans('beers.hop_type'), ['class' => 'control-label']) }} {{ Form::select('hop_type', [null => trans('beers.select_hop_type')] + $hopTypes, null, ['class' => 'form-control']) }} @if ($errors->has('hop_type')) {{ $errors->first('hop_type') }} @endif
{{ Form::label('malt_type', trans('beers.malt_type'), ['class' => 'control-label']) }} {{ Form::select('malt_type', [null => trans('beers.select_malt_type')] + $maltTypes, null, ['class' => 'form-control']) }} @if ($errors->has('malt_type')) {{ $errors->first('malt_type') }} @endif
{{ trans('beers.conditioning_methods') }}
{{ Form::select('conditioningMethods[]', $conditioningMethods, null, ['multiple' => 'multiple', 'class' => 'form-control']) }} @if ($errors->has('conditioningMethods')) {{ $errors->first('conditioningMethods') }} s @endif
{{ trans('beers.how_to_enjoy_it') }}
{{ Form::select('glass', [null => trans('beers.select_glass')] + $glasses, null, ['class' => 'form-control']) }} @if ($errors->has('glass')) {{ $errors->first('glass') }} @endif
{{ Form::label('temperature', trans('beers.temperature'), ['class' => 'control-label']) }} {{ Form::text('temperature', null, ['class' => 'form-control']) }} @if ($errors->has('temperature')) {{ $errors->first('temperature') }} @endif
{{ trans('beers.labels') }}
@foreach($labels as $label)
{{ Form::checkbox('labels[]', $label->id, null, ['id' => 'label_' . $label->id] ) }} {{ Form::label('label_' . $label->id, trans($label->label)) }}
@endforeach @if ($errors->has('labels')) {{ $errors->first('labels') }} @endif
{{ trans('beers.awards') }}
{{ Form::file('awards[]', ['multiple' => 'multiple', 'class'=>'form-control'] ) }}
@if ($errors->has('awards')) {{ $errors->first('awards') }} @endif
@if(!$beer->awards->isEmpty())
    @foreach($beer->awards as $award)
  • @endforeach
@else {{ trans('beers.no_awards') }} @endif
{{ Form::label('avatar', trans('breweries.avatar'), ['class' => 'control-label']) }} {{ Form::file('avatar', ['class'=>'form-control'] ) }} @if ($errors->has('avatar')) {{ $errors->first('avatar') }} @endif
{{ Form::label('avatar', trans('breweries.current_avatar'), ['class' => 'control-label']) }}
{{ Form::submit(trans('common.update'), ['class' => 'btn btn-success']) }}
{{ Form::close() }}
@endsection @section('bottom_js') @parent @endsection