@extends('layouts/backendTemplate')

@section('content')

    <div class="row">
        <div class="col-xs-12">
            <div class="page-title-box">
                <h4 class="page-title m-b-20">Profile</h4>
                <ol class="breadcrumb p-0 m-0">
                    <li>@include('uc.backHome')</li>
                    <li>
                        <a href="{{ url('profile') }}">User</a>
                    </li>
                    <li class="active">
                        Profile
                    </li>
                </ol>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>

    <div class="row">

        <div class="col-md-12">

            <!-- Message -->
            <div class="form-group">
                <div class="form-group">
                    @if (Session::has('messageSuccess'))
                        @include('uc/messageSuccess')
                    @endif

                    @if (Session::has('messageFail'))
                        @include('uc/messageFail')
                    @endif

                </div>
            </div>


            <div class="panel">
                <div class="panel-heading">
                    <h3 class="panel-title">Profile</h3>
                </div>

                <div class="panel-body">

                    <form class="form-horizontal" action="{{ url('update-profile') }}" method="post"
                        enctype="multipart/form-data">

                        <input type="hidden" name="_method" value="POST">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">

                        <!-- First Name -->
                        <div class="form-group">
                            <label class="col-md-2 control-label">First Name</label>
                            <div class="col-md-10">
                                <input type="text" id="first_name" class="form-control" name="first_name"
                                    value="{{ $profileView->first_name }}">
                            </div>
                        </div>

                        <!-- Last Name -->
                        <div class="form-group">
                            <label class="col-md-2 control-label">Last Name</label>
                            <div class="col-md-10">
                                <input type="text" id="last_name" class="form-control" name="last_name"
                                    value="{{ $profileView->last_name }}">
                            </div>
                        </div>

                        <!-- Password -->
                        <div class="form-group">
                            <label class="col-md-2 control-label">Password</label>
                            <div class="col-md-10">
                                <input type="password" id="password" class="form-control" name="password" value="">
                            </div>
                        </div>

                        <!-- Email -->
                        <div class="form-group">
                            <label class="col-md-2 control-label">Email</label>
                            <div class="col-md-10">
                                <input readonly type="text" id="email" class="form-control" name="email"
                                    value="{{ $profileView->email }}">
                            </div>
                        </div>

                        <!-- Button -->
                        <div class="text-center">
                            <button type="submit" class="btn btn-success waves-effect waves-light">Save</button>
                            <button type="reset" class="btn btn-danger waves-effect waves-light">Cancel</button>
                        </div>

                    </form>


                </div>
            </div>
        </div>
    </div>



@stop

@section('script')

@endsection
