{{-- CityHub - Add / edit user --}} {{ Form::open(array('route' => $postRoute, 'role' => 'form', 'id' => 'new_user', 'class' => 'form-horizontal', 'autocomplete' => 'off', 'id' => 'user-form')) }}

{{$title}}


@if ($mode == 'edit') {{ Form::hidden('id', $user->id, array('id' => 'id')) }} @endif
{{ Form::text('email', isset($user->email) ? $user->email : null, array('id' => 'email', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('email') != '' || $errors->first('email') != null))

{{ $errors->first('email') }}

@endif
@if ($mode == 'add') {{ Form::password('password', array('id' => 'password', 'class' => 'form-control')) }} @else {{ Form::password('password', array('id' => 'password', 'class' => 'form-control')) }} @endif @if (isset($errors) && ($errors->first('password') != '' || $errors->first('password') != null))

{{ $errors->first('password') }}

@endif
{{ Form::text('first_name', isset($user->first_name) ? $user->first_name : null, array('id' => 'first_name', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('first_name') != '' || $errors->first('first_name') != null))

{{ $errors->first('first_name') }}

@endif
{{ Form::text('last_name', isset($user->last_name) ? $user->last_name : null, array('id' => 'last_name', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('last_name') != '' || $errors->first('last_name') != null))

{{ $errors->first('last_name') }}

@endif
@if ($mode == 'edit')

{{ Lang::get('user.label_facebook_id') }}: {{ Lang::get('core.not_connected') }}

{{ Lang::get('user.label_google_id') }}: {{ Lang::get('core.not_connected') }}


@endif
{{ Form::select('language', $languages, isset($user->language_id) ? $user->language_id : null, array('id' => 'language', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('language') != '' || $errors->first('language') != null))

{{ $errors->first('language') }}

@endif

{{ Form::button(' ' . Lang::get('core.cancel'), array('type' => 'button', 'class' => 'btn btn-danger', 'onclick'=>"cancelNewUser()")) }} {{ Form::button(' ' . Lang::get('core.save'), array('type' => 'button', 'class' => 'btn btn-success', 'onclick'=>"postNewUser()")) }}
{{ Form::close() }}