@extends('beers.create.layout') @section('main_content') {!! Form::model($brewery, ['route' => 'beer.create.brewery_information.post', 'class' => 'margin-right', 'method' => 'post', 'files' => true]) !!}

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

@if ($errors->any())
{{ trans('beers.create.errors') }}
@endif
{{ Form::label('brewery_id', trans('breweries.select_brewery'), ['class' => 'control-label']) }} {{ Form::select('brewery_id', [], $errors->has('brewery_id') ? null : Session::get('breweryData.brewery_id'), ['id' => 'select-brewery', 'class' => 'form-control']) }} @if ($errors->has('brewery_id')) {{ $errors->first('brewery_id') }} @endif
{{ Form::checkbox('no_brewery', 1, Session::get('breweryData.no_brewery') ? true : null, ['id' => 'no_brewery']) }} {{ Form::label('no_brewery', trans('breweries.no_brewery')) }} @if ($errors->has('no_brewery')) {{ $errors->first('no_brewery') }} @endif
{{ Form::hidden('isNewBrewery', $errors->has('isNewBrewery') ? null : Session::get('breweryData.isNewBrewery', 0), ['id' => 'is-new-brewery']) }}
isEmpty() && !$errors->has('brewery_id')) ? '' : 'style="display: none;"' !!}>
{{ trans('breweries.general_information') }}
{{ Form::label('name', trans('breweries.name'), ['class' => 'control-label']) }} {{ Form::text('name', $errors->has('name') ? null : Session::get('breweryData.name'), ['class' => 'form-control']) }} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{{ Form::label('address', trans('breweries.address'), ['class' => 'control-label']) }} {{ Form::text('address', $errors->has('name') ? null : Session::get('breweryData.address'), ['class' => 'form-control']) }} Fill adress data based on geometry object from Google Place Autocomplete {{ Form::hidden('latitude', $errors->has('latitude') ? null : Session::get('breweryData.latitude'), ['id' => 'latitude']) }} {{ Form::hidden('longitude', $errors->has('longitude') ? null : Session::get('breweryData.longitude'), ['id' => 'longitude']) }} Fill adress data based on address_components object from Google Place Autocomplete {{ Form::hidden('street', $errors->has('street') ? null : Session::get('breweryData.street'), ['id' => 'route']) }} {{ Form::hidden('street_number', $errors->has('street_number') ? null : Session::get('breweryData.street_number'), ['id' => 'street_number']) }} {{ Form::hidden('postal_code', $errors->has('postal_code') ? null : Session::get('breweryData.postal_code'), ['id' => 'postal_code']) }} {{ Form::hidden('locality', $errors->has('locality') ? null : Session::get('breweryData.locality'), ['id' => 'locality']) }} {{ Form::hidden('region', $errors->has('region') ? null : Session::get('breweryData.region'), ['id' => 'administrative_area_level_1']) }} {{ Form::hidden('country', $errors->has('country') ? null : Session::get('breweryData.country'), ['id' => 'country']) }} @if ($errors->has('address')) {{ $errors->first('address') }} @endif
@if(Auth::user()->hasRole(['admin', 'admin_vox']))
{{ Form::label('email', trans('breweries.email'), ['class' => 'control-label']) }} {{ Form::text('email', $errors->has('email') ? null : Session::get('breweryData.email'), ['class' => 'form-control']) }} @if ($errors->has('email')) {{ $errors->first('email') }} @endif
{{ Form::label('phone', trans('breweries.phone'), ['class' => 'control-label']) }} {{ Form::text('phone', $errors->has('phone') ? null : Session::get('breweryData.phone'), ['class' => 'form-control']) }} @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif
@endif
{{ Form::label('avatar', trans('breweries.avatar'), ['class' => 'control-label']) }}
{{ Form::file('avatar', ['class'=>'form-control inputfile'] ) }}
@if ($errors->has('avatar')) {{ $errors->first('avatar') }} @endif
@if(Auth::user()->hasRole(['admin', 'admin_vox']))
{{ trans('breweries.schedule') }}
{{ Form::label('schedule', trans('breweries.schedule'), ['class' => 'control-label']) }} {{ Form::textarea('schedule', $errors->has('schedule') ? null : Session::get('breweryData.schedule'), ['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', $errors->has('creation_date') ? null : Session::get('breweryData.creation_date'), ['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', $errors->has('history') ? null : Session::get('breweryData.history'), ['class' => 'form-control']) }} @if ($errors->has('history')) {{ $errors->first('history') }} @endif
@endif
{{ trans('common.cancel') }}
{{ trans('common.previous') }} {{ Form::submit(trans('common.next'), ['class' => 'btn btn-success']) }}
{{ Form::close() }} @endsection @section('bottom_js') @parent @endsection