@extends('layouts.app') @section('template_title') {{ trans('profile.templateTitle') }} @endsection @section('content')
{{ trans('profile.editProfileTitle') }} {{ trans('profile.editAccountTitle') }}
@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], 'class' => 'form-horizontal', 'role' => 'form', 'enctype' => 'multipart/form-data' ]) !!} {{ csrf_field() }}
{!! Form::label('theme', trans('profile.label-theme') , array('class' => 'col-sm-4 control-label')); !!}
@if ($errors->has('theme')) {{ $errors->first('theme') }} @endif
{!! Form::label('location', trans('profile.label-location') , array('class' => 'col-sm-4 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-sm-4 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-sm-4 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-sm-4 control-label')); !!}
{!! Form::text('github_username', old('github_username'), array('id' => 'github_username', 'class' => 'form-control', 'placeholder' => trans('profile.ph-twitter_username'))) !!} @if ($errors->has('github_username')) {{ $errors->first('github_username') }} @endif
{!! Form::button( ' ' . trans('profile.submitButton'), array( 'class' => 'btn btn-success disableddd', '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', 'Username' , array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('name', old('name'), array('id' => 'name', 'class' => 'form-control', 'placeholder' => trans('forms.ph-username'))) !!}
{!! Form::label('email', 'E-mail' , array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('email', old('email'), array('id' => 'email', 'class' => 'form-control', 'placeholder' => trans('forms.ph-useremail'))) !!}
{!! Form::label('first_name', trans('forms.create_user_label_firstname'), array('class' => 'col-md-3 control-label')); !!}
{!! Form::text('first_name', NULL, 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', NULL, 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', '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') @include('scripts.gmaps-address-lookup-api3') @include('scripts.user-avatar-dz') @endsection