@extends('layouts.site-app')
@section('sitecontent')
<section class="headerbg headerbg-inner">
    <div class="header header-padding">
        @include('partials.site.header-menu')
    </div>
    <div class="inner-heading">{{__('lang.navigation_your_account')}}</div>
</section>
<section class="youracc-bg">
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-4">
                @include('partials.site.user-links')
            </div>
            <div class="col-lg-9 col-md-8 white-bg">
                <form id="update-profile" method="post" enctype="multipart/form-data" action="{{url('/update-profile')}}">
                    {{ csrf_field() }}
                    <div class="yourinfo-bg white-bg">
                        <h1>{{__('lang.your_account_information')}}</h1>
                        <input type="hidden" name="id" value="{{$user->id}}"> 
                        <div class="yourinfo" id="no_edit_name">
                            <h4>{{__('lang.your_full_name')}}</h4>
                            <p>{{($user->name)?$user->name:'--'}}</p>
                            <a href="javascript:;" onclick="makeNameEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="edit_name" style="display: none">
                            <h4>{{__('lang.your_full_name')}}</h4>
                            <div class="form-group col-md-10" style="padding-left: 0;margin-top: 11px;">
                                <input type="text" class="form-control" placeholder="{{__('lang.your_full_name')}}" value="{{($user->name)?$user->name:'--'}}" name="name" id="username" style="background-color: #f0f4f8;">
                            </div>
                            <a href="javascript:;" onclick="noNameEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="no_edit_email" >
                            <h4>{{__('lang.email')}}</h4>
                            <p>{{($user->email)?$user->email:'--'}}</p>
                            <a href="javascript:;" onclick="makeEmailEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="edit_email" style="display: none">
                            <h4>{{__('lang.email')}}</h4>
                            <div class="form-group col-md-10" style="padding-left: 0;margin-top: 11px;">
                                <input type="email" class="form-control" placeholder="{{__('lang.email')}}" value="{{($user->email)?$user->email:'--'}}" name="email" id="useremail" style="background-color: #f0f4f8;">
                            </div>
                            <a href="javascript:;" onclick="noEmailEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="no_edit_phone">
                            <h4>{{__('lang.phone')}}</h4>
                            <p>{{$user->phone}}</p>
                            <a href="javascript:;" onclick="makePhoneEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="edit_phone" style="display: none">
                            <h4>{{__('lang.phone')}}</h4>
                            <div class="form-group col-md-10" style="padding-left: 0;margin-top: 11px;">
                                <input type="text" class="form-control" placeholder="{{__('lang.phone')}}" value="{{($user->phone)?$user->phone:'--'}}" name="phone" id="userphone" style="background-color: #f0f4f8;">
                            </div>
                            <a href="javascript:;" onclick="noPhoneEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="no_edit_password">
                            <h4>{{__('lang.password')}}</h4>
                            <p>&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;</p>
                            <a href="javascript:;" onclick="makePasswordEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                        <div class="yourinfo" id="edit_password" style="display: none">
                            <h4>{{__('lang.password')}}</h4>
                            <div class="form-group col-md-10" style="padding-left: 0;margin-top: 11px;">
                                <input type="text" class="form-control" placeholder="{{__('lang.password')}}" value="" name="password" id="userpassword" style="background-color: #f0f4f8;">
                            </div>
                            <a href="javascript:;" onclick="noPasswordEditable();"><img src="{{asset('site-assets/images/icon-edit.svg')}}" /></a>
                        </div>
                    </div>
                    <div class="savebtn">
                        <a href="javascript:;" onclick="event.preventDefault(); document.getElementById('update-profile').submit();">{{__('lang.save_button')}}&nbsp;&nbsp;<img src="{{asset('site-assets/images/arrowright.png')}}"  class="mt-n-1" /></a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
<footer class="footer">
    @include('partials.site.footer')
</footer>
@endsection