448 lines
9.3 KiB
PHP
448 lines
9.3 KiB
PHP
|
|
@extends('Admin.layouts.master')
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
{{-- content start --}}
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
|
||
|
|
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
||
|
|
|
||
|
|
<!--begin::Content wrapper-->
|
||
|
|
|
||
|
|
<div class="d-flex flex-column flex-column-fluid">
|
||
|
|
|
||
|
|
<div id="kt_app_content_container" class="app-container container-xxl">
|
||
|
|
|
||
|
|
<div class="row max-w-100 mt-10 index_table">
|
||
|
|
|
||
|
|
<div class="top_header d-flex justify-content-between">
|
||
|
|
|
||
|
|
<p class='fs-2 fw-bold'>Update Profile</p>
|
||
|
|
|
||
|
|
<div class="table_right_options d-flex">
|
||
|
|
|
||
|
|
<a class="btn btn-primary me-3" href="{{route('dashboard')}}">Back</a>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dataTable_area my-5 mb-0">
|
||
|
|
|
||
|
|
<!--begin::Card-->
|
||
|
|
|
||
|
|
<div class="card">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="modal-body scroll-y px-10 px-lg-15 pt-0 pb-2">
|
||
|
|
|
||
|
|
<!--begin:Form-->
|
||
|
|
|
||
|
|
<form id="update_profile" class="form py-5 pb-0">
|
||
|
|
|
||
|
|
@csrf
|
||
|
|
|
||
|
|
@method('post')
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-2">
|
||
|
|
|
||
|
|
<label class="required fs-6 fw-semibold mb-2">Name</label>
|
||
|
|
|
||
|
|
<input type="hidden" name="update_id" value="{{$data->id}}">
|
||
|
|
|
||
|
|
<input type="text" class="form-control form-control-solid" placeholder="" name="name" value="{{$data->name}}" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-2">
|
||
|
|
|
||
|
|
<label class="required fs-6 fw-semibold mb-2">email</label>
|
||
|
|
|
||
|
|
<input type="email" class="form-control form-control-solid" placeholder="" name="email" value="{{$data->email}}" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-4">
|
||
|
|
|
||
|
|
<label class="required fs-6 fw-semibold mb-2">Contact Number</label>
|
||
|
|
|
||
|
|
<input type="number" class="form-control form-control-solid" placeholder="" name="mobile_number" value="{{$data->contact_number}}" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-4">
|
||
|
|
|
||
|
|
<label class="required fs-6 fw-semibold mb-2">Profile Image</label>
|
||
|
|
|
||
|
|
<input type="file" class="form-control form-control-solid" placeholder="" name="profile_image" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="d-flex justify-content-center my-6">
|
||
|
|
|
||
|
|
<button type="submit" class="btn btn-dark smt-btns">Update</button>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<!-- </form> -->
|
||
|
|
|
||
|
|
<!--end:Form-->
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!--end::Card-->
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!--end::Content wrapper-->
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!--end:::Main-->
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
{{-- update password --}}
|
||
|
|
|
||
|
|
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
||
|
|
|
||
|
|
<!--begin::Content wrapper-->
|
||
|
|
|
||
|
|
<div class="d-flex flex-column flex-column-fluid">
|
||
|
|
|
||
|
|
<div id="kt_app_content_container" class="app-container container-xxl">
|
||
|
|
|
||
|
|
<div class="row max-w-100 index_table mt-10">
|
||
|
|
|
||
|
|
<div class="add_new_investors my-5 mb-0">
|
||
|
|
|
||
|
|
<div class="top_header d-flex justify-content-between">
|
||
|
|
|
||
|
|
<p class='fs-2 fw-bold'>Update Password</p>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<form id="update_password" autocomplete="off">
|
||
|
|
|
||
|
|
@csrf
|
||
|
|
|
||
|
|
@method('post')
|
||
|
|
|
||
|
|
<!--begin::Card-->
|
||
|
|
|
||
|
|
<div class="card mb-8">
|
||
|
|
|
||
|
|
<!--begin::Card body-->
|
||
|
|
|
||
|
|
<div class="card-body py-4">
|
||
|
|
|
||
|
|
<div class="row add_category_area">
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-2">
|
||
|
|
|
||
|
|
<label class="fs-6 fw-semibold mb-2">Current Password</label>
|
||
|
|
|
||
|
|
<input type="hidden" name="updateId" value="{{$data->id}}">
|
||
|
|
|
||
|
|
<input type="text" class="form-control form-control-solid" placeholder="" name="current_password" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-2">
|
||
|
|
|
||
|
|
<label class="fs-6 fw-semibold mb-2">New Password</label>
|
||
|
|
|
||
|
|
<input type="text" class="form-control form-control-solid" placeholder="" name="new_password" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-md-6 fv-row mt-2">
|
||
|
|
|
||
|
|
<label class="fs-6 fw-semibold mb-2">Confirm Password</label>
|
||
|
|
|
||
|
|
<input type="text" class="form-control form-control-solid" placeholder="" name="confirm_password" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="submit_btn d-flex justify-content-center my-6">
|
||
|
|
|
||
|
|
<button id="save_btn" type="submit" class="btn btn-dark smt-btns">Update</button>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!--end::Card body-->
|
||
|
|
|
||
|
|
</form>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!--end::Card-->
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@endsection
|
||
|
|
|
||
|
|
{{-- content ends --}}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
{{-- scripts start --}}
|
||
|
|
|
||
|
|
@section('scripts')
|
||
|
|
|
||
|
|
<script>
|
||
|
|
// update profile jquery and ajax
|
||
|
|
|
||
|
|
$('#update_profile').validate({
|
||
|
|
|
||
|
|
ignore: [],
|
||
|
|
|
||
|
|
debug: false,
|
||
|
|
|
||
|
|
rules: {
|
||
|
|
|
||
|
|
name: {
|
||
|
|
|
||
|
|
required: true,
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
email: {
|
||
|
|
|
||
|
|
required: true,
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
mobile_number: {
|
||
|
|
|
||
|
|
required: true,
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
message: {
|
||
|
|
|
||
|
|
name: {
|
||
|
|
|
||
|
|
required: "Enter your name",
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
email: {
|
||
|
|
|
||
|
|
required: "Enter your email",
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
mobile_number: {
|
||
|
|
|
||
|
|
required: "Enter your mobile number",
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
submitHandler: function(form)
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
var formData = new FormData(form);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
|
||
|
|
url: "{{route('update-profile')}}",
|
||
|
|
|
||
|
|
type: 'POST',
|
||
|
|
|
||
|
|
data: formData,
|
||
|
|
|
||
|
|
dataType: 'json',
|
||
|
|
|
||
|
|
contentType: false,
|
||
|
|
|
||
|
|
processData: false,
|
||
|
|
|
||
|
|
success: function(result)
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
if (result.status == 200)
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
toastr.success(result.message);
|
||
|
|
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
window.location.reload()
|
||
|
|
}
|
||
|
|
|
||
|
|
, 2000);
|
||
|
|
|
||
|
|
} else
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
toastr.warning(result.message);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// update password jquery and ajax
|
||
|
|
|
||
|
|
$('#update_password').validate({
|
||
|
|
|
||
|
|
ignore: [],
|
||
|
|
|
||
|
|
debug: false,
|
||
|
|
|
||
|
|
rules: {
|
||
|
|
|
||
|
|
current_password: {
|
||
|
|
|
||
|
|
required: true,
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
new_password: {
|
||
|
|
|
||
|
|
required: true,
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
confirm_password: {
|
||
|
|
|
||
|
|
required: true,
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
message: {
|
||
|
|
|
||
|
|
current_password: {
|
||
|
|
|
||
|
|
required: "This :attribute field is required",
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
new_password: {
|
||
|
|
|
||
|
|
required: "This :attribute field is required",
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
confirm_password: {
|
||
|
|
|
||
|
|
required: "This :attribute field is required",
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
submitHandler: function(form)
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
var formData = new FormData(form);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
|
||
|
|
url: "{{route('update-password')}}",
|
||
|
|
|
||
|
|
type: 'POST',
|
||
|
|
|
||
|
|
data: formData,
|
||
|
|
|
||
|
|
contentType: false,
|
||
|
|
|
||
|
|
processData: false,
|
||
|
|
|
||
|
|
dataType: 'json',
|
||
|
|
|
||
|
|
success: function(result)
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
if (result.status == 200)
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
toastr.success(result.message);
|
||
|
|
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
window.location.reload();
|
||
|
|
|
||
|
|
}, 2000);
|
||
|
|
|
||
|
|
} else
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
toastr.warning(result.message);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
@endsection
|
||
|
|
|
||
|
|
{{-- end scripts --}}
|