@extends('layouts.default')
@push('title', get_phrase('My profile'))
@push('meta')@endpush
@push('css')@endpush
@section('content')
    <!------------ My profile area start  ------------>
    <section class="course-content">
        <div class="profile-banner-area"></div>
        <div class="container profile-banner-area-container">
            <div class="row">
                @include('frontend.default.student.left_sidebar')
                <div class="col-lg-9">
                    @if($user_details->role === 'instructor')
                        <div class="my-panel message-panel edit_profile mb-4">
                            <h4 class="g-title mb-5">{{ get_phrase('PDDikti Information') }}</h4>
                            <div class="row">
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="nidn" class="form-label">{{ get_phrase('NIDN') }}</label>
                                        <input type="text" class="form-control" name="nidn" value="{{ $user_details->nidn }}" id="nidn" disabled readonly>
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="id_sdm" class="form-label">{{ get_phrase('ID PDDikti') }}</label>
                                        <input type="text" class="form-control" name="id_sdm" value="{{ $user_details->id_sdm }}" id="id_sdm" disabled readonly>
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="id_sms" class="form-label">{{ get_phrase('Study Program') }}</label>
                                        <input type="text" class="form-control" name="id_sms" value="{{ $user_details->id_sms }}" id="id_sms" disabled readonly>
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="id_pt" class="form-label">{{ get_phrase('University') }}</label>
                                        <input type="text" class="form-control" name="id_pt" value="{{ $user_details->id_pt }}" id="id_pt" disabled readonly>
                                    </div>
                                </div>
                            </div>
                        </div>
                    @endif

                    <div class="my-panel message-panel edit_profile mb-4">
                        <h4 class="g-title mb-5">{{ get_phrase('Personal Information') }}</h4>
                        <form action="{{ route('update.profile', $user_details->id) }}" method="POST">@csrf
                            <div class="row">
                                <div class="col-lg-12 mb-20">
                                    <div class="form-group">
                                        <label for="name" class="form-label">{{ get_phrase('Full Name') }}</label>
                                        <input type="text" class="form-control" name="name" value="{{ $user_details->name }}" id="name">
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="email" class="form-label">{{ get_phrase('Email Address') }}</label>
                                        <input type="email" class="form-control" name="email" value="{{ $user_details->email }}" id="email" disabled readonly>
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="phone" class="form-label">{{ get_phrase('Phone Number') }}</label>
                                        <input type="tel" class="form-control" name="phone" value="{{ $user_details->phone }}" id="phone">
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="website" class="form-label">{{ get_phrase('Website') }}</label>
                                        <input type="text" class="form-control" name="website" value="{{ $user_details->website }}" id="website">
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="facebook" class="form-label">{{ get_phrase('Facebook') }}</label>
                                        <input type="text" class="form-control" name="facebook" value="{{ $user_details->facebook }}" id="facebook">
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="twitter" class="form-label">{{ get_phrase('Twitter') }}</label>
                                        <input type="text" class="form-control" name="twitter" value="{{ $user_details->twitter }}" id="twitter">
                                    </div>
                                </div>
                                <div class="col-lg-6 mb-20">
                                    <div class="form-group">
                                        <label for="linkedin" class="form-label">{{ get_phrase('Linkedin') }}</label>
                                        <input type="text" class="form-control" name="linkedin" value="{{ $user_details->linkedin }}" id="linkedin">
                                    </div>
                                </div>
                                <div class="col-lg-12 mb-20">
                                    <div class="form-group">
                                        <label for="skills" class="form-label">{{ get_phrase('Skills') }}</label>
                                        <input type="text" class="form-control tagify" name="skills" data-role="tagsinput" value="{{ $user_details->skills }}" id="skills">
                                    </div>
                                </div>
                                <div class="col-lg-12 mb-20">
                                    <div class="form-group">
                                        <label for="biography" class="form-label">{{ get_phrase('Biography') }}</label>
                                        <textarea name="biography" class="form-control" id="biography" cols="30" rows="5">{{ $user_details->biography }}</textarea>
                                    </div>
                                </div>
                            </div>
                            <button class="eBtn btn gradient mt-10">{{ get_phrase('Save Changes') }}</button>
                        </form>
                    </div>
                    <div class="my-panel message-panel edit_profile">
                            <h4 class="g-title mb-5">
                                @if(is_null($user_details->password))
                                    {{ get_phrase('Set Password') }}
                                @else
                                    {{ get_phrase('Change Password') }}
                                @endif
                            </h4>
                            <form action="{{ route('password.change') }}" method="POST">@csrf
                            <div class="row">
                                @if(!is_null($user_details->password))
                                    <div class="col-lg-12 mb-20">
                                        <div class="form-group">
                                            <label class="form-label">{{ get_phrase('Current password') }}</label>
                                            <input type="password" class="form-control" name="current_password" required>
                                        </div>
                                    </div>
                                @endif
                                <div class="col-lg-12 mb-20">
                                    <div class="form-group">
                                        <label class="form-label">{{ get_phrase('New password') }}</label>
                                        <input type="password" class="form-control" name="new_password" required>
                                    </div>
                                </div>
                                <div class="col-lg-12 mb-20">
                                    <div class="form-group">
                                        <label class="form-label">{{ get_phrase('Confirm password') }}</label>
                                        <input type="password" class="form-control" name="confirm_password" required>
                                    </div>
                                </div>
                            </div>
                            <button class="eBtn btn gradient mt-10">
                                @if(is_null($user_details->password))
                                    {{ get_phrase('Set Password') }}
                                @else
                                    {{ get_phrase('Update password') }}
                                @endif
                            </button>
                        </form>
                    </div>
                </div>

            </div>
        </div>
    </section>
    <!------------ My profile area end  ------------>
@endsection
@push('js')

@endpush
