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

{{ trans('beers.edit.menu.brewery_information') }}

@include('flash::message') @if ($errors->any())
{{ trans('beers.edit.errors') }}
@endif {!! Form::model($brewery, ['route' => ['beer.edit.brewery_information.post', $beer->username], 'id' => 'brewery-form', 'class' => 'margin-right', 'method' => 'post', 'files' => true]) !!}
{{ Form::label('id', trans('breweries.select_brewery'), ['class' => 'control-label']) }} {{ Form::select('id', $brewery ? [$brewery->id=> $brewery->name] : [], $brewery ? null : $beer->brewery->id, ['id' => 'select-brewery', 'class' => 'form-control']) }} @if ($errors->has('id')) {{ $errors->first('id') }} @endif
{{ Form::hidden('isNewBrewery', 0, ['id' => 'is-new-brewery']) }} {{ Form::hidden('isEditBrewery', $brewery ? 1 : 0, ['id' => 'is-edit-brewery']) }} {{--
--}} {{--
--}} {{--{{ trans('breweries.general_information') }}--}} {{--
--}} {{--{{ Form::label('name', trans('breweries.name'), ['class' => 'control-label']) }}--}} {{--{{ Form::text('name', null, ['class' => 'form-control']) }}--}} {{--@if ($errors->has('name'))--}} {{----}} {{--{{ $errors->first('name') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--{{ Form::label('address', trans('breweries.address'), ['class' => 'control-label']) }}--}} {{--{{ Form::text('address', null, ['class' => 'form-control']) }}--}} {{-- Fill adress data based on geometry object from Google Place Autocomplete --}} {{--{{ Form::hidden('latitude', null, ['id' => 'latitude']) }}--}} {{--{{ Form::hidden('longitude', null, ['id' => 'longitude']) }}--}} {{-- Fill adress data based on address_components object from Google Place Autocomplete --}} {{--{{ Form::hidden('street', null, ['id' => 'route']) }}--}} {{--{{ Form::hidden('street_number', null, ['id' => 'street_number']) }}--}} {{--{{ Form::hidden('postal_code', null, ['id' => 'postal_code']) }}--}} {{--{{ Form::hidden('locality', null, ['id' => 'locality']) }}--}} {{--{{ Form::hidden('region', null, ['id' => 'administrative_area_level_1']) }}--}} {{--{{ Form::hidden('country', null, ['id' => 'country']) }}--}} {{--@if ($errors->has('address'))--}} {{----}} {{--{{ $errors->first('address') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--{{ Form::label('email', trans('breweries.email'), ['class' => 'control-label']) }}--}} {{--{{ Form::text('email', null, ['class' => 'form-control']) }}--}} {{--@if ($errors->has('email'))--}} {{----}} {{--{{ $errors->first('email') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--{{ Form::label('phone', trans('breweries.phone'), ['class' => 'control-label']) }}--}} {{--{{ Form::text('phone', null, ['class' => 'form-control']) }}--}} {{--@if ($errors->has('phone'))--}} {{----}} {{--{{ $errors->first('phone') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--{{ Form::label('avatar', trans('breweries.avatar'), ['class' => 'control-label']) }}--}} {{--{{ Form::file('avatar', ['class'=>'form-control'] ) }}--}} {{--@if ($errors->has('avatar'))--}} {{----}} {{--{{ $errors->first('avatar') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--{{ trans('breweries.current_avatar') }}--}} {{--{{ $brewery ? $brewery->name : '' }}--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--{{ trans('breweries.schedule') }}--}} {{--
--}} {{--{{ Form::label('schedule', trans('breweries.schedule'), ['class' => 'control-label']) }}--}} {{--{{ Form::textarea('schedule', null, ['class' => 'form-control']) }}--}} {{--@if ($errors->has('schedule'))--}} {{----}} {{--{{ $errors->first('schedule') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--
--}} {{--{{ trans('breweries.creation_date') }}--}} {{--
--}} {{--{{ Form::label('creation_date', trans('breweries.creation_date'), ['class' => 'control-label']) }}--}} {{--{{ Form::text('creation_date', $brewery && $brewery->creation_date ? $brewery->creation_date->format('d/m/Y') : null, ['class' => 'form-control']) }}--}} {{--@if ($errors->has('creation_date'))--}} {{----}} {{--{{ $errors->first('creation_date') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--{{ Form::label('history', trans('breweries.history'), ['class' => 'control-label']) }}--}} {{--{{ Form::textarea('history', null, ['class' => 'form-control']) }}--}} {{--@if ($errors->has('history'))--}} {{----}} {{--{{ $errors->first('history') }}--}} {{----}} {{--@endif--}} {{--
--}} {{--
--}} {{--
--}}
{{ Form::submit(trans('common.update'), ['class' => 'btn btn-success']) }}
{{ Form::close() }}
@endsection @section('bottom_js') @parent @endsection