@extends('layouts.app') @section('template_title') {{ trans('profile.templateTitle') }} @endsection @section('content')
@if ($user->profile) @if (Auth::user()->id == $user->id)
{{ $user->name }}
{!! Form::open(array('route' => 'avatar.upload', 'method' => 'POST', 'name' => 'avatarDropzone','id' => 'avatarDropzone', 'class' => 'form single-dropzone dropzone single', 'files' => true)) !!} {{ $user->name }} {!! Form::close() !!}
{!! Form::model($user->profile, ['method' => 'PATCH', 'route' => ['profile.update', $user->name], 'id' => 'user_profile_form', 'class' => 'form-horizontal', 'role' => 'form', 'enctype' => 'multipart/form-data']) !!} {{ csrf_field() }}
{!! Form::label('theme_id', trans('profile.label-theme') , array('class' => 'col-12 control-label')); !!}
@if ($errors->has('theme')) {{ $errors->first('theme') }} @endif
{!! Form::label('location', trans('profile.label-location') , array('class' => 'col-12 control-label')); !!}
{!! Form::text('location', old('location'), array('id' => 'location', 'class' => 'form-control', 'placeholder' => trans('profile.ph-location'))) !!} @if ($errors->has('location')) {{ $errors->first('location') }} @endif
{!! Form::label('bio', trans('profile.label-bio') , array('class' => 'col-12 control-label')); !!}
{!! Form::textarea('bio', old('bio'), array('id' => 'bio', 'class' => 'form-control', 'placeholder' => trans('profile.ph-bio'))) !!} @if ($errors->has('bio')) {{ $errors->first('bio') }} @endif
{!! Form::label('twitter_username', trans('profile.label-twitter_username') , array('class' => 'col-12 control-label')); !!}
{!! Form::text('twitter_username', old('twitter_username'), array('id' => 'twitter_username', 'class' => 'form-control', 'placeholder' => trans('profile.ph-twitter_username'))) !!} @if ($errors->has('twitter_username')) {{ $errors->first('twitter_username') }} @endif
{!! Form::label('github_username', trans('profile.label-github_username') , array('class' => 'col-12 control-label')); !!}
{!! Form::text('github_username', old('github_username'), array('id' => 'github_username', 'class' => 'form-control', 'placeholder' => trans('profile.ph-github_username'))) !!} @if ($errors->has('github_username')) {{ $errors->first('github_username') }} @endif
{!! Form::button( ' ' . trans('profile.submitButton'), array( 'id' => 'confirmFormSave', 'class' => 'btn btn-success disabled', 'type' => 'button', 'data-target' => '#confirmForm', 'data-modalClass' => 'modal-success', 'data-toggle' => 'modal', 'data-title' => trans('modals.edit_user__modal_text_confirm_title'), 'data-message' => trans('modals.edit_user__modal_text_confirm_message') )) !!}
{!! Form::close() !!}
{!! Form::model($user, array('action' => array('ProfilesController@updateUserAccount', $user->id), 'method' => 'PUT', 'id' => 'user_basics_form')) !!} {!! csrf_field() !!}
{!! Form::label('name', trans('forms.create_user_label_username'), array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('name', $user->name, array('id' => 'name', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_username'))) !!}
@if($errors->has('name')) {{ $errors->first('name') }} @endif
{!! Form::label('email', trans('forms.create_user_label_email'), array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('email', $user->email, array('id' => 'email', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_email'))) !!}
@if ($errors->has('email')) {{ $errors->first('email') }} @endif
{!! Form::label('first_name', trans('forms.create_user_label_firstname'), array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('first_name', $user->first_name, array('id' => 'first_name', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_firstname'))) !!}
@if($errors->has('first_name')) {{ $errors->first('first_name') }} @endif
{!! Form::label('last_name', trans('forms.create_user_label_lastname'), array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('last_name', $user->last_name, array('id' => 'last_name', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_lastname'))) !!}
@if($errors->has('last_name')) {{ $errors->first('last_name') }} @endif
{!! Form::button( ' ' . trans('profile.submitProfileButton'), array( 'class' => 'btn btn-success disabled', 'id' => 'account_save_trigger', 'disabled' => true, 'type' => 'button', 'data-submit' => trans('profile.submitProfileButton'), 'data-target' => '#confirmForm', 'data-modalClass' => 'modal-success', 'data-toggle' => 'modal', 'data-title' => trans('modals.edit_user__modal_text_confirm_title'), 'data-message' => trans('modals.edit_user__modal_text_confirm_message') )) !!}
{!! Form::close() !!}
@else

{{ trans('profile.notYourProfile') }}

@endif @else

{{ trans('profile.noProfileYet') }}

@endif
@include('modals.modal-form') @endsection @section('footer_scripts') @include('scripts.form-modal-script') @if(config('settings.googleMapsAPIStatus')) @include('scripts.gmaps-address-lookup-api3') @endif @include('scripts.user-avatar-dz') @endsection