@extends('layout.app')
@section('content')

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-6">

            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">{{__("Edit Profile")}}</h3>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                <form role="form" action="{{route('profile.update')}}" method="post" enctype="multipart/form-data">
                    @csrf
                    <div class="box-body">
                        <div class="form-group">
                            <label>{{__("Name")}}</label>
                            <input type="text" name="name" value="{{$user->name}}" class="form-control" required>
                        </div>
                        <!-- <div class="form-group">
                            <label>{{__("Organization Name")}}</label>
                            <input type="text" name="org_name" value="{{$user->org_name}}" class="form-control" required>
                        </div> -->
                        <div class="form-group">
                            <label>{{__("Email Id")}}</label>
                            <input type="email" name="email" value="{{$user->email}}" class="form-control" required>
                        </div>
                        <!-- <div class="form-group">
                            <label>{{__("Mobile No")}}.</label>
                            <input type="number" name="mobile" value="{{$user->mobile}}" class="form-control">
                        </div> -->
                        <!-- <div class="form-group">
                            <label>{{__("Organization Latitude")}}</label>
                            <input type="number" step="any" name="lat" value="{{$user->lat}}" class="form-control">
                        </div> -->
                        <!-- <div class="form-group">
                            <label>{{__("Organization Longitude")}}</label>
                            <input type="number" step="any" name="lng" value="{{$user->lng}}" class="form-control">
                        </div> -->
                        <!-- <div class="form-group">
                            <label>{{__("Organization Logo")}} (<small>width:512 & height:512</small>)</label>
                            <input type="file" name="org_logo" data-height="100" data-default-file="{{asset('storage/logo/'.$user->org_logo)}}" class="dropify">

                        </div> -->


                        <!-- <div class="form-group">
                            <label>{{__("Dashboard Logo")}} (<small>width:160 & height:50</small>)</label>
                            <input type="file" name="dashboard_logo" data-height="100" data-default-file="{{asset('storage/logo/'.$user->dashboard_logo)}}" class="dropify">

                        </div> -->

                        <!-- <div class="form-group">
                            <label>{{__("Login Screen Logo")}}(<small>width:230 & height:44</small>)</label>
                            <input type="file" name="login_logo" data-height="100" data-default-file="{{asset('storage/logo/'.$user->login_logo)}}" class="dropify">

                        </div> -->

                    </div>
                    <!-- /.box-body -->

                    <div class="box-footer">
                        <button type="submit" name="Update" class="btn btn-primary  ">{{__("Update")}}</button>
                        <!--    <a  href=" #modal2" data-toggle="modal" data-target="#modal2" class="btn btn-primary  ">Update</a> -->

                    </div>
                </form>
            </div>
            <!-- /.box -->


        </div>
        <!-- /.col -->

        @if(auth()->user()->user_role=='Admin')
        <div class="col-md-6">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">{{__("Change Admin Password")}}</h3>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                <form role="form" action="{{route('profile.update_admin_password')}}" method="post">
                    @csrf
                    <div class="box-body">
                        <div class="form-group">
                            <label>{{__("New Password")}}</label>
                            <input type="password" name="password" class="form-control" placeholder="{{__('Enter New Password')}}" required>
                        </div>
                        <div class="form-group">
                            <label>{{__("Confirm New Password")}}</label>
                            <input type="password" name="password_confirmation" class="form-control" placeholder="{{__('Confirm New Password')}}" required>
                        </div>
                    </div>
                    <!-- /.box-body -->

                    <div class="box-footer">
                        <button type="submit" name="Update" class="btn btn-primary  ">{{__("Update")}}</button>
                    </div>
                </form>
            </div>
            <!-- /.box -->
        </div>
        <!-- /.col -->
        @endif

    </div>
    <!-- /.row -->

    <!--End Model For Not Delete Record-->
</section>
<!-- <script type="text/javascript">
    function readURL3(input) {

        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function(e) {
                $('#blah3').attr('src', e.target.result);
            }
            reader.readAsDataURL(input.files[0]);
        }
    }
</script>

<script type="text/javascript">
    function readURL1(input) {

        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function(e) {
                $('#blah1').attr('src', e.target.result);
            }
            reader.readAsDataURL(input.files[0]);
        }
    }
</script>
<script type="text/javascript">
    function readURL12(input) {

        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function(e) {
                $('#blah12').attr('src', e.target.result);
            }
            reader.readAsDataURL(input.files[0]);
        }
    }
</script>
<script type="text/javascript">
    function readURL13(input) {

        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function(e) {
                $('#blah13').attr('src', e.target.result);
            }
            reader.readAsDataURL(input.files[0]);
        }
    }
</script> -->
@endsection