Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 172.71.203.60
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
realestate /
source /
resources /
views /
[ HOME SHELL ]
Name
Size
Permission
Action
admin
[ DIR ]
drwxr-xr-x
front
[ DIR ]
drwxr-xr-x
welcome.blade.php
147.69
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : welcome.blade.php
@extends('front.layout.app') @section('content') <style> .is-invalid { border-color: red !important; background-color: #f8d7da; /* Optional: background color to highlight */ } .is-invalid:focus { border-color: #dc3545; /* Focus state */ box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); /* Optional: add a shadow for focus */ } </style> <style> .upload-container { max-width: 500px; margin: 50px auto; background: white; padding: 20px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } .drop-zone { border: 2px dashed #007bff; border-radius: 10px; padding: 30px; text-align: center; cursor: pointer; color: #007bff; background: #f8f9fa; transition: 0.3s; } .drop-zone:hover, .drop-zone.dragover { background: #e3f2fd; } .file-list { margin-top: 10px; } .form-control { border-radius: 8px; } .form-label { font-weight: bold; } .file-preview { display: flex; flex-wrap: wrap; margin-top: 10px; } .file-preview img { width: 60px; height: 60px; margin: 5px; border-radius: 5px; object-fit: cover; } </style> <div class="row"> <div class="col-12"> <div class="page-title-box d-sm-flex align-items-center justify-content-between bg-galaxy-transparent"> <h4 class="mb-sm-0">Applicants</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);">Applicants</a></li> <li class="breadcrumb-item active">List</li> </ol> </div> </div> </div> </div> <div class="offcanvas-body p-0 overflow-hidden"> <div data-simplebar="init" style="height: calc(100vh - 112px);" class="simplebar-scrollable-y"> <div class="simplebar-wrapper" style="margin: 0px;"> <div class="simplebar-height-auto-observer-wrapper"> <div class="simplebar-height-auto-observer"></div> </div> <div class="simplebar-mask"> <div class="simplebar-offset" style="right: 0px; bottom: 0px;"> <div class="simplebar-content-wrapper" tabindex="0" role="region" aria-label="scrollable content" style="height: 100%; overflow: hidden scroll;"> <div class="simplebar-content" style="padding: 0px;"> <div class="card"> <div class="card-body"> <form action="{{ route('applicant.update',$applicant->id) }}" method="POST" class="form-steps was-validated" autocomplete="off" enctype="multipart/form-data"> @csrf <!-- Required to prevent CSRF token mismatch errors --> @method('put');{{ route('applicant.update',$applicant->id) }}" <div id="custom-progress-bar" class="progress-nav mb-4"> <div class="progress" style="height: 1px;"> <div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> </div> <ul class="nav nav-pills progress-bar-tab custom-nav" role="tablist"> <li class="nav-item" role="presentation"> <button class="nav-link rounded-pill active" data-progressbar="custom-progress-bar" id="pills-gen-info-tab" data-bs-toggle="pill" data-bs-target="#pills-gen-info" type="button" role="tab" aria-controls="pills-gen-info" aria-selected="true" data-position="0">1</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link rounded-pill" data-progressbar="custom-progress-bar" id="pills-info-desc-tab" data-bs-toggle="pill" data-bs-target="#pills-info-desc" type="button" role="tab" aria-controls="pills-info-desc" aria-selected="false" data-position="1" tabindex="-1">2</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link rounded-pill" data-progressbar="custom-progress-bar" id="pills-success-tab" data-bs-toggle="pill" data-bs-target="#pills-success" type="button" role="tab" aria-controls="pills-success" aria-selected="false" data-position="2" tabindex="-1">3</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link rounded-pill" data-progressbar="custom-progress-bar-user" id="pills-success-tab-user" data-bs-toggle="pill" data-bs-target="#pills-success-user" type="button" role="tab" aria-controls="pills-success-user" aria-selected="false" data-position="2" tabindex="-1">4</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link rounded-pill" data-progressbar="custom-progress-bar-file" id="pills-success-tab-file" data-bs-toggle="pill" data-bs-target="#pills-success-file" type="button" role="tab" aria-controls="pills-success-file" aria-selected="false" data-position="2" tabindex="-1">5</button> </li> </ul> </div> <div class="tab-content"> <div class="tab-pane fade active show" id="pills-gen-info" role="tabpanel" aria-labelledby="pills-gen-info-tab"> <div> <div class="mb-4"> <div> <h5 class="mb-1">Personal Information</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="title">Title <span>*</span></label> <select class="form-select title" name="title[]" required id="title"> <option value="">Please Select</option> <option value="1" {{ $applicant->applicantUserDetails->contains('title', 1) ? 'selected' : '' }}>Mr</option> <option value="2" {{ $applicant->applicantUserDetails->contains('title', 2) ? 'selected' : '' }}>Mrs</option> <option value="3" {{ $applicant->applicantUserDetails->contains('title', 3) ? 'selected' : '' }}>Mr & Mrs</option> <option value="4" {{ $applicant->applicantUserDetails->contains('title', 4) ? 'selected' : '' }}>Miss</option> <option value="5" {{ $applicant->applicantUserDetails->contains('title', 5) ? 'selected' : '' }}>Ms</option> <option value="6" {{ $applicant->applicantUserDetails->contains('title', 6) ? 'selected' : '' }}>Dr</option> <option value="7" {{ $applicant->applicantUserDetails->contains('title', 7) ? 'selected' : '' }}>Sir</option> <option value="8" {{ $applicant->applicantUserDetails->contains('title', 8) ? 'selected' : '' }}>Other</option> </select> <div class="invalid-feedback">Please select title</div> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="gen-info-username-input">First Name</label> <input type="text" class="form-control" name="first_name[]" id="first-name" value="{{ optional($applicant->applicantUserDetails->first())->first_name }}" placeholder="Enter first name" required=""> <div class="invalid-feedback">Please enter a first name</div> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="gen-info-username-input">Last Name</label> <input type="text" class="form-control" name="last_name[]"id="last-name" value="{{ optional($applicant->applicantUserDetails->first())->last_name }}" placeholder="Enter last name" required=""> <div class="invalid-feedback">Please enter a last name</div> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="gen-info-username-input">Company</label> <input type="text" class="form-control" name="company" id="company" value="{{ optional($applicant->applicantUserDetails->first())->company }}" placeholder="Enter company" > </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="title">Salutation</label> <select class="form-select title" name="salutation" id="salutation"> <option value="1" {{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>First Name</option> <option value="2"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Last Name</option> <option value="3"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Full Name</option> <option value="4"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Title + First Name</option> <option value="5"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Title + Last Name</option> <option value="6"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Title + Full Name</option> <option value="7"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Company</option> <option value="8"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Company + Title + Full Name</option> <option value="8"{{ $applicant->applicantUserDetails->contains('salutation', 1) ? 'selected' : '' }}>Title + Full Name + Company</option> </select> </div> </div> <div class="col-md-6"> <div class="mb-3"> <label class="form-label" for="gen-info-username-input"> </label> <div id="output" class="form-control"></div> </div> </div> </div> <div class="mb-4"> <div> <h5 class="mb-1">Address</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> <div class="row"> <div class="col-md-6"> <label class="form-label">Postcode</label> <input type="text" class="form-control" name="postcode[]" value="{{ optional($applicant->applicantUserDetails->first())->postcode }}" placeholder="Postcode"> </div> <div class="col-md-6"> <label class="form-label">Address Line 1</label> <input type="text" class="form-control" name="addresslineone[]" value="{{ optional($applicant->applicantUserDetails->first())->addresslineone }}" placeholder="Address Line One"> </div> <div class="col-md-6"> <label class="form-label">Address Line 2</label> <input type="text" class="form-control" name="addresslinetwo[]" value="{{ optional($applicant->applicantUserDetails->first())->addresslinetwo }}" placeholder="Address Line Two"> </div> <div class="col-md-6"> <label class="form-label">Town</label> <input type="text" class="form-control" name="town[]" value="{{ optional($applicant->applicantUserDetails->first())->town }}" placeholder="Town"> </div> <div class="col-md-6"> <label class="form-label">County</label> <input type="text" class="form-control" name="county[]" value="{{ optional($applicant->applicantUserDetails->first())->county }}" placeholder="County"> </div> <div class="col-md-6"> <label class="form-label">Country</label> <select name="country[]" class=" form-select"> @foreach($country as $c) <option value="{{$c->id}}" {{ $applicant->applicantUserDetails->contains('country', $c->id) ? 'selected' : '' }}>{{$c->country_name}}</option> @endforeach </select> </div> </div> </div> <div class="mb-4"> <div> <h5 class="mb-1">Contact Info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> <div class="row"> <div class="col-md-6"> <label class="form-label">Phone home</label> <input type="text" class="form-control" name="phonehome[]" value="{{ optional($applicant->applicantUserDetails->first())->phonehome }}" placeholder="Phone Home"> </div> <div class="col-md-6"> <label class="form-label">Phone work</label> <input type="text" class="form-control" name="phonework[]" value="{{ optional($applicant->applicantUserDetails->first())->phonework }}" placeholder="Phone Work"> </div> <div class="col-md-6"> <label class="form-label">Phone Mobile</label> <input type="text" class="form-control" name="phonemobile[]" value="{{ optional($applicant->applicantUserDetails->first())->phonemobile }}" placeholder="Phone Mobile"> </div> <div class="col-md-6"> <label class="form-label">Fax </label> <input type="text" class="form-control" name="fax[]" value="{{ optional($applicant->applicantUserDetails->first())->fax }}" placeholder="Fax"> </div> <div class="col-md-6"> <label class="form-label">Email </label> <input type="email" class="form-control" name="email[]" value="{{ optional($applicant->applicantUserDetails->first())->email }}" placeholder="Email"> </div> </div> </div> <div class="mb-4"> <div> <h5 class="mb-1">Guarantor Info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> <div class="row"> <div class="col-md-6"> <label class="form-label">Guarantor name</label> <input type="text" class="form-control" name="guarantor_name" value="{{$applicant->guarantor_name}}" placeholder="Guarantor Name"> </div> <div class="col-md-6"> <label class="form-label">Guarantor Contact</label> <input type="text" class="form-control" name="guarantor_contact" value="{{$applicant->guarantor_contact}}" placeholder="Guarantor Phone"> </div> <div class="col-md-6"> <label class="form-label">Guarantor email</label> <input type="email" class="form-control" name="guarantor_email" value="{{$applicant->guarantor_email}}" placeholder="Guarantor Email"> </div> <div class="col-md-6"> <label class="form-label">Fax </label> <input type="text" class="form-control" name="guarantor_fax" value="{{$applicant->guarantor_fax}}" placeholder="Fax"> </div> </div> </div> @if( empty( $applicant->guarantor_gender|| $applicant->guarantor_passport_no || $applicant->guarantor_nationality|| $applicant->birth_place|| $applicant->website|| $applicant->guarantor_dob)) <button type="button" id="showButton" class="btn btn-primary btn-sm btn-label rounded-pill"><i class="ri-add-circle-line label-icon align-middle rounded-pill fs-16 me-2"></i> More Info</button> @endif <!-- Content Div --> <div id="contentDiv" @if( empty( $applicant->guarantor_gender|| $applicant->guarantor_passport_no || $applicant->guarantor_nationality|| $applicant->birth_place|| $applicant->website|| $applicant->guarantor_dob))style="display: none;"@endif> <div class="mb-4"> <div> <h5 class="mb-1">More Info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> <div class="row"> <div class="col-md-6"> <label class="form-label">Date of birth</label> <input type="date" class="form-control" name="guarantor_dob" value="{{$applicant->guarantor_dob}}" placeholder="Guarantor Name"> </div> <div class="col-md-6"> <label class="form-label">Website</label> <input type="text" class="form-control" name="website" value="{{$applicant->website}}" placeholder="Guarantor Website"> </div> <div class="col-md-6"> <label class="form-label">Pager</label> <input type="text" class="form-control" name="guarantor_pager" value="{{$applicant->guarantor_pager}}" placeholder="Guarantor Pager"> </div> <div class="col-md-6"> <label class="form-label">Birth Place </label> <input type="text" class="form-control" name="guarantor_birth_place" value="{{$applicant->birth_place}}" placeholder="Birth Place"> </div> <div class="col-md-6"> <label class="form-label">Nationality </label> <input type="text" class="form-control" name="guarantor_nationality" value="{{$applicant->guarantor_nationality}}"placeholder="Guarantor Nationality"> </div> <div class="col-md-6"> <label class="form-label">Passport no </label> <input type="text" class="form-control" name="guarantor_passport_no" value="{{$applicant->guarantor_passport_no}}" placeholder="Guarantor Passport Number"> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="title">Gender</label> <select class="form-select title" name="guarantor_gender" id="title"> <option value="1" {{ $applicant->guarantor_gender=='1' ? 'selected' : '' }}>Male</option> <option value="2" {{ $applicant->guarantor_gender=='2' ? 'selected' : '' }}>Female</option> <option value="3" {{ $applicant->guarantor_gender=='3' ? 'selected' : '' }}>Unspecified</option> </select> </div> </div> </div> </div> <button type="button" id="hideButton " @if(!empty( $applicant->guarantor_gender|| $applicant->guarantor_passport_no || $applicant->guarantor_nationality|| $applicant->birth_place|| $applicant->website|| $applicant->guarantor_dob))style="display: none;" @endif class="btn btn-danger btn-sm btn-label rounded-pill"><i class=" ri-close-circle-fill label-icon align-middle rounded-pill fs-16 me-2"></i> More Info</button> <!-- Hide Button --> </div> <div id="container"> <!-- Original Div --> <!-- Hidden Original Div --> <div class="contentDivs" @if(empty(optional($applicant->applicantUserDetails->skip(1)->first())->first_name) || empty(optional($applicant->applicantUserDetails->skip(1)->first())->last_name)) style="display: none;" @endif > <div class="mb-4"> <div> <h5 class="mb-1">Applicant</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> <div class="row"> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="title">Title <span >*</span></label> <select class="form-select title" name="title[]" id="title"> <option value="">Please Select</option> <option value="1" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 1) ? 'selected' : '' }}>Mr</option> <option value="2" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 2) ? 'selected' : '' }}>Mrs</option> <option value="3" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 3) ? 'selected' : '' }}>Mr & Mrs</option> <option value="4" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 4) ? 'selected' : '' }}>Miss</option> <option value="5" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 5) ? 'selected' : '' }}>Ms</option> <option value="6" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 6) ? 'selected' : '' }}>Dr</option> <option value="7" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 7) ? 'selected' : '' }}>Sir</option> <option value="8" {{ $applicant->applicantUserDetails->skip(1)->contains('title', 8) ? 'selected' : '' }}>Other</option> </select> <div class="invalid-feedback">Please select title</div> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="gen-info-username-input">First Name</label> <input type="text" class="form-control" name="first_name[]" id="gen-info-username-input" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->first_name }}" placeholder="Enter first name" > <div class="invalid-feedback">Please enter a first name</div> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label class="form-label" for="gen-info-username-input">Last Name</label> <input type="text" class="form-control" name="last_name[]" id="gen-info-username-input" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->last_name }}" placeholder="Enter last name" > <div class="invalid-feedback">Please enter a last name</div> </div> </div> </div> </div> <div class="mb-4"> <div> <h5 class="mb-1">Applicant contact info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> <div class="row"> <div class="col-md-6"> <label class="form-label">Phone home</label> <input type="text" class="form-control" name="phonehome[]" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->phonehome }}" placeholder="Phone Home"> </div> <div class="col-md-6"> <label class="form-label">Phone work</label> <input type="text" class="form-control" name="phonework[]" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->phonework }}" placeholder="Phone Work"> </div> <div class="col-md-6"> <label class="form-label">Phone Mobile</label> <input type="text" class="form-control" name="phonemobile[]" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->phonemobile }}"placeholder="Phone Mobile"> </div> <div class="col-md-6"> <label class="form-label">Fax </label> <input type="text" class="form-control" name="fax[]" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->fax }}" placeholder="Fax"> </div> <div class="col-md-6"> <label class="form-label">Email </label> <input type="email" class="form-control" name="email[]" value="{{ optional($applicant->applicantUserDetails->skip(1)->first())->email }}"placeholder="Email"> </div> </div> </div> <button type="button" class="removeButton btn btn-danger btn-sm btn-label rounded-pill"><i class=" ri-close-circle-fill label-icon align-middle rounded-pill fs-16 me-2"></i> Remove applicant contact</button> </div> </div> <!-- Button to add a new div --> @if(empty(optional($applicant->applicantUserDetails->skip(1)->first())->first_name) || empty(optional($applicant->applicantUserDetails->skip(1)->first())->last_name)) <button type="button" id="addNewDiv"class=" mt-1 btn btn-primary btn-sm btn-label rounded-pill"><i class=" ri-add-circle-fill label-icon align-middle rounded-pill fs-16 me-2"></i> Add another applicant contact</button> @endif </div> <div class="d-flex align-items-start gap-3 mt-4"> <button type="button" class="btn btn-success btn-label right ms-auto nexttab nexttab" data-nexttab="pills-info-desc-tab"><i class="ri-arrow-right-line label-icon align-middle fs-16 ms-2"></i>Go to more info</button> </div> </div> <!-- end tab pane --> <div class="tab-pane fade" id="pills-info-desc" role="tabpanel" aria-labelledby="pills-info-desc-tab"> <div> <div class="mb-4"> <div> <h5 class="mb-1">Requirements and search criteria</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">LettingsPW*</label> <div class="col-sm-10"> <div class="row"> <div class="col-md-1"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="lettingswpCheck" name="lettingswp" @if($applicant->lettingswp) checked @endif> </div> </div> <div class="col-md-3"> <select class="form-select" name="lettingpw_minimum"> <option> </option> @foreach($lettingpw as $lp) <option value="{{$lp->id}}" {{ $lp->id ==$applicant->lettingpw_minimum ? 'selected' : '' }}>{{$lp->amount}}</option> @endforeach </select> </div> <div class="col-md-3"> <select class="form-select" name="lettingpw_maximum"> <option> </option> @foreach($lettingpw as $lp) <option value="{{$lp->id}}" {{$lp->id == $applicant->lettingpw_maximum? 'selected' : '' }}>{{$lp->amount}}</option> @endforeach </select> </div> <div class="col-md-3"> <select class="form-select" name="lettingpw_threshold"> <option> </option> @foreach($lettingpw as $lp) <option value="{{$lp->id}}" {{ $applicant->lettingpw_threshold= $lp->id ? 'selected' : '' }}>{{$lp->threshold}}</option> @endforeach </select> </div> </div> </div> <div id="lettingswpDiv" @if(empty($applicant->lettingswp))style="display: none;"@endif> <!-- Your content here --> <div class="mb-4"> <div> <h5 class="mb-1">Tenant specific info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <div class="col-md-3"> <label class="form-label">Furniture</label> <select name="furniture" class="form-select"> <option value="1" {{ $applicant->furniture== 1 ? 'selected' : '' }}>Any</option> <option value="2" {{ $applicant->furniture==2? 'selected' : '' }}>Fully furnished</option> <option value="3" {{ $applicant->furniture==3 ? 'selected' : '' }}>Semi-furnished</option> <option value="4" {{ $applicant->furniture==4 ? 'selected' : '' }}>Unfurnished</option> </select> </div> <div class="col-md-3"> <label class="form-label">LHA/DWP</label> <select name="lha_dwp" class="form-select"> <option value="2" {{ $applicant->lha_dwp==2 ? 'selected' : '' }}>No</option> <option value="1" {{ $applicant->lha_dwp==1 ? 'selected' : '' }}>Yes</option> </select> </div> <div class="col-md-3"> <label class="form-label">LHA/DWP</label> <select name="tenancy_period" class="form-select" id="tenancy_period"> <option value="" selected="selected">None</option> <option value="6" {{ $applicant->tenancy_period==6 ? 'selected' : '' }}>6 months</option> <option value="12" {{ $applicant->tenancy_period== 12 ? 'selected' : '' }}>1 Year</option> <option value="18" {{ $applicant->tenancy_period== 18 ? 'selected' : '' }}>18 months</option> <option value="24" {{ $applicant->tenancy_period== 24 ? 'selected' : '' }}>2 Years</option> <option value="36" {{ $applicant->tenancy_period== 36 ? 'selected' : '' }}>3 Years</option> <option value="48" {{ $applicant->tenancy_period== 48 ? 'selected' : '' }}>4 Years</option> <option value="60" {{ $applicant->tenancy_period== 60 ? 'selected' : '' }}>5 Years</option> </select> </div> <div class="col-md-3"> <div class="field-wrap field-wrap-backgroud-colour-2"> <label for="label">Employment status</label> <select name="employment_status" class="form-select" id="emp_status"> <option value="1" {{ $applicant->employment_status== 1 ? 'selected' : '' }}>Fulltime</option> <option value="2" {{ $applicant->employment_status== 2 ? 'selected' : '' }}>Part-time</option> <option value="3" {{ $applicant->employment_status== 3 ? 'selected' : '' }}>Self-employed</option> <option value="4" {{ $applicant->employment_status== 4 ? 'selected' : '' }}>Contract</option> <option value="5" {{ $applicant->employment_status== 5 ? 'selected' : '' }}>Casual</option> <option value="6" {{ $applicant->employment_status== 6 ? 'selected' : '' }}>Unemployed</option> <option value="7" {{ $applicant->employment_status== 7 ? 'selected' : '' }}>Retired</option> <option value="8" {{ $applicant->employment_status== 8 ? 'selected' : '' }}>Student</option> </select> </div> </div> <div class="col-md-3"> <div class="field-wrap field-wrap-backgroud-colour-2"> <label for="label">Type of employment</label> <select name="employment_type" class="form-select" id="emp_type"> <option value="" selected="selected"></option> <option value="1" {{ $applicant->employment_type== 1 ? 'selected' : '' }}>Professional</option> <option value="2" {{ $applicant->employment_type==2 ? 'selected' : '' }}>Services</option> <option value="3" {{ $applicant->employment_type== 3 ? 'selected' : '' }}>Education</option> <option value="4" {{ $applicant->employment_type==4 ? 'selected' : '' }}>Civil services</option> <option value="5" {{ $applicant->employment_type== 5 ? 'selected' : '' }}>Government</option> <option value="6" {{ $applicant->employment_type==6 ? 'selected' : '' }}>Armed forces</option> </select> </div> </div> <div class="col-md-3"> <label for="label">Type of employment</label> <input type="text" name="income" placeholder="Income" class="form-control" value="{{$applicant->income}}" > </div> <div class="col-md-3"> <div class="field-wrap field-wrap-backgroud-colour-2"> <label for="label">Income frequency</label> <select name="income_frequency" class="form-select" class="form-add-dropdown-99-percent" id="income_frequency"> <option value="" selected="selected"></option> <option value="1" {{ $applicant->income_frequency==1 ? 'selected' : '' }}>Daily</option> <option value="2" {{ $applicant->income_frequency==2 ? 'selected' : '' }}>Weekly</option> <option value="3" {{ $applicant->income_frequency==3 ? 'selected' : '' }}>Monthly</option> <option value="4" {{ $applicant->income_frequency==4 ? 'selected' : '' }}>Yearly</option> </select> </div> </div> <div class="col-md-3"> <div class="row mt-4"> <div class="col-sm-4"> <label for="colFormLabelSm" class=" col-form-label col-form-label-sm">Smoking/pets</label> </div> <div class="col-sm-8"> <div class="mt-4 mt-lg-0"> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="inlineCheckbox6" name="smoking" value="1" {{ !empty($applicant->smoking) ? 'checked' : '' }}> <label class="form-check-label" for="inlineCheckbox6">Smoking</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="inlineCheckbox7" name="pets" value="1" {{ !empty($applicant->pets) ? 'checked' : '' }}> <label class="form-check-label" for="inlineCheckbox7">Pets</label> </div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <label for="label">Occupier Type</label> <select id="my-multiselect" name="occupiertype[]" class="chosen-select" multiple data-placeholder="Choose options..."> @foreach($occupiertype as $ot) <option value="{{ $ot->id }}" @if(in_array($ot->id, explode(',', $applicant->occupiertype))) selected @endif> {{ $ot->type }} </option> @endforeach </select> </div> </div> </div> </div> <div class="row mt-2"> <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Sales*</label> <div class="col-sm-10"> <div class="row"> <div class="col-md-1"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="salesCheck" name="sales_check" value="1" {{ !empty($applicant->sales_check) ? 'checked' : '' }}> </div> </div> <div class="col-md-3"> <select class="form-select" name="sales_minimum"> <option> </option> @foreach($salespw as $lp) <option value="{{$lp->id}}" {{ $applicant->sales_minimum==$lp->id ? 'selected' : '' }}>{{$lp->amount}}</option> @endforeach </select> </div> <div class="col-md-3"> <select class="form-select" name="sales_maximum"> <option> </option> @foreach($salespw as $lp) <option value="{{$lp->id}}" {{ $applicant->sales_maximum==$lp->id ? 'selected' : '' }}>{{$lp->amount}}</option> @endforeach </select> </div> <div class="col-md-3"> <select class="form-select" name="sales_threshold"> <option> </option> @foreach($salespw as $lp) <option value="{{$lp->id}}" {{ $applicant->sales_threshold==$lp->id ? 'selected' : '' }}> {{$lp->threshold}}</option> @endforeach </select> </div> </div> </div> <div id="saleswpDivwpDiv" @if(empty($applicant->sales_check))style="display: none;"@endif> <div class="mb-4"> <div> <h5 class="mb-1">Buyer specific info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <div class="col-md-3"> <div class="row mt-4"> <div class="col-sm-6"> <label for="colFormLabelSm" class=" col-form-label col-form-label-sm">Mortgage required</label> </div> <div class="col-sm-6"> <div class="mt-4 mt-lg-0"> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name='mortgage' id="mortgage" value="1" {{ !empty($applicant->mortgage) ? 'checked' : '' }}> </div> </div> </div> </div> </div> <div id="mortgageDiv" class="mt-2" @if(empty($applicant->mortgage))style="display: none;"@endif> <div class="row"> <div class="col-md-3"> <div class="field-wrap field-wrap-backgroud-colour-2"> <label for="label">Status</label> <select name="mortgage_status" class="form-select" id="mortgage_status"> <option value="1" {{ $applicant->mortgage_status==1 ? 'selected' : '' }}>Mortgage required</option> <option value="2" {{ $applicant->mortgage_status==2 ? 'selected' : '' }}>Mortgage agreed in principal</option> <option value="3" {{ $applicant->mortgage_status==3 ? 'selected' : '' }}>Mortgage agreed</option> </select> </div> </div> <div class="col-md-3"> <label for="label">Lander</label> <div class="input-group"> <input type="text" class="form-control" name="lander" value="{{$applicant->lander}}" id="searchQueryLander" placeholder="Search by ID or Name" > </div> </div> <div class="col-md-3"> <div class="field-wrap field-wrap-backgroud-colour-2"> <label for="label">Deposit amount</label> <input type="text" name="deposit_amount" value="{{$applicant->deposit_amount}}"class="form-control" placeholder="Deposit Amount" > </div> </div> </div> </div> <div class="row"> <div class="col-md-3"> <div class="field-wrap field-wrap-backgroud-colour-2"> <label for="label"> Able/dependant on sale</label> <select name="able_dependant_on_sale" class="form-control" id="able_dependant_on_sale"> <option value="">--Select--</option> <option value="1" {{ $applicant->able_dependant_on_sale==1 ? 'selected' : '' }}>Able to proceed</option> <option value="2" {{ $applicant->able_dependant_on_sale==2 ? 'selected' : '' }}>Dependant on sale</option> </select> </div> </div> </div> <div id="div1" class="mt-3" @if(empty($applicant->able_dependant_on_sale==1))style="display: none"@endif > <div class="row"> <div class="col-md-2"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="Firsttimebuyer" value="1" name="first_time_buyer" @if(!empty($applicant->mortgage)) checked @endif> <label class="form-check-label" for="Firsttimebuyer"> First time buyer </label> </div> <div id="fileInputDiv" @if(empty($applicant->mortgage))style="display: none; margin-top: 10px;" @endif> <label for="purchaseDate"> If renting, lease expiry date:</label> <input type="date" id="purchaseDate" name="lease_expiry_date" value="{{$applicant->lease_expiry_date}}" class="form-control"> </div> </div> <div class="col-md-2"> <div class="form-check"> <input class="form-check-input" type="checkbox" value="1" name="nothing_to_sell" id="Nothingtosell" @if(!empty($applicant->nothing_to_sell)) checked @endif > <label class="form-check-label" for="Nothingtosell"> Nothing to sell </label> </div> </div> <div class="col-md-2"> <div class="form-check"> <input class="form-check-input" name="investor" value="1" type="checkbox" id="Investor" @if(!empty($applicant->nothing_to_sell)) checked @endif > <label class="form-check-label" for="Investor"> Investor </label> </div> <div id="extraCheckboxDiv" @if(empty($applicant->nothing_to_sell)) style="display: none; margin-top: 10px;" @endif > <div class="form-check"> <input class="form-check-input" type="checkbox" name="additional_investment" value="1" @if(!empty($applicant->additional_investment)) checked @endif id="extraCheckbox"> <label class="form-check-label" for="extraCheckbox"> Additional Investment Option </label> </div> </div> </div> <div class="col-md-2"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="underoffer" value="1" id="Underoffer" @if(!empty($applicant->underoffer)) checked @endif > <label class="form-check-label" for="Underoffer"> Under offer </label> </div> <div id="inputFieldDiv" @if(empty($applicant->underoffer)) style="display: none; margin-top: 10px;" @endif> <label for="offerDetails">Price</label> <input type="text" id="offerDetails" name="under_offer_price" value="{{$applicant->under_offer_price}}" class="form-control" placeholder="Enter details"> </div> </div> <div class="col-md-2"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="chain" value="1" @if(!empty($applicant->chain)) checked @endif id="Chain"> <label class="form-check-label" for="Chain"> Chain </label> </div> <!-- Hidden Textarea (Initially Hidden) --> <div id="textareaDiv" style="display: none; margin-top: 10px;"> <label for="chainDetails">Enter Chain Details</label> <textarea id="chainDetails" class="form-control" rows="3" name="chain_note" placeholder="Enter details...">{{$applicant->chain_note}}</textarea> </div> </div> </div> </div> <div id="div2" @if(empty($applicant->able_dependant_on_sale==2))style="display: none"@endif > <div class="row mt-3"> <div class="col-md-4"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="property_to_sell" value="1" id="property_to_sell" @if(!empty($applicant->property_to_sell)) checked @endif> <label class="form-check-label" for="property_to_sell"> Property to sell </label> </div> <!-- Hidden Div with Three Input Fields --> <div id="extraInputFields" @if(empty($applicant->property_to_sell)) style="display: none; margin-top: 10px;" @endif> <label for="propertyLocation">Property type </label> <input type="text" id="propertyLocation" class="form-control" value="{{$applicant->property_type}}" name="property_type" placeholder="Enter location"> <label for="propertyValue">Anticipated sale price</label> <input type="number" id="propertyValue" class="form-control" value="{{$applicant->anticipated_sale_price}}" name="anticipated_sale_price" placeholder="Anticipated sale price "> <label for="propertySize">Any advice </label> <input type="text" id="propertySize" name="any_advice" class="form-control" value="{{$applicant->any_advice}}" placeholder="Any advice "> </div> </div> <div class="col-md-4"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="property_to_market" value="1" id="property_to_market" @if(!empty($applicant->property_to_market)) checked @endif> <label class="form-check-label" for="property_to_market"> Property on market </label> </div> <div id="propertyMarketFields" @if(empty($applicant->property_to_market))style="display: none; margin-top: 10px;" @endif> <!-- First Input Field --> <label for="propertyName">Property type</label> <input type="text" id="propertyName" class="form-control" name="property_markeat_type" value="{{$applicant->property_markeat_type}}" placeholder="Enter property type"> <!-- First Select Box --> <label for="propertyType">How long </label> <select id="propertyType" name="how_long" class="form-control"> <option value="1" {{ $applicant->how_long==1 ? 'selected' : '' }}>Less than 3 months</option> <option value="2" {{ $applicant->how_long==2 ? 'selected' : '' }}>Less than 6 months</option> <option value="3" {{ $applicant->how_long==3 ? 'selected' : '' }}>6 months - 1 year</option> <option value="4" {{ $applicant->how_long==4 ? 'selected' : '' }}>1 - 2 years</option> <option value="5" {{ $applicant->how_long==5 ? 'selected' : '' }}>2 - 3 years</option> <option value="6" {{ $applicant->how_long==6 ? 'selected' : '' }}>Above 3 years</option> </select> <!-- Four Input Fields --> <label for="propertyPrice">Price</label> <input type="number" id="propertyPrice" name="price_on_market" value="{{$applicant->price_on_market}}" class="form-control" placeholder="Enter price"> <label for="propertySize">Interest</label> <input type="text" id="propertySize" name="interest" value="{{$applicant->interest}}" class="form-control" placeholder="Enter size"> <label for="propertyLocation">Agent</label> <input type="text" id="propertyLocation" name="agent" value="{{$applicant->agent}}" class="form-control" placeholder="Enter location"> <label for="propertyOwner">Contract term</label> <input type="text" id="propertyOwner" name="contract_term"class="form-control" value="{{$applicant->contract_term}}" placeholder="Enter owner name"> <!-- Final Select Box --> <label for="propertyStatus">What made you choose them? </label> <select id="propertyStatus" name="why_choose" class="form-control"> <option value=""></option> </select> </div> </div> </div> </div> </div> <div class="row mt-3"> @foreach($buyertype as $k => $b) <div class="col-md-3"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="formCheck{{$k}}" name="buyertype[]" value="{{ $b->id }}" {{ in_array($b->id, explode(',', $applicant->buyertype)) ? 'checked' : '' }}> <label class="form-check-label" for="formCheck{{$k}}"> {{ $b->type }} </label> </div> </div> @endforeach </div> </div> <div class="row mt-3"> <div class="col-md-3"> <h6>Categories</h6> </div> <!-- Select All Checkbox --> <div class="col-md-3"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="category_ids[]" value="999999999" id="selectAllCategories"> <label class="form-check-label " for="selectAllCategories"> Select All Categories </label> </div> </div> <!-- Individual Category Checkboxes --> @foreach($categories as $k => $cate) <div class="col-md-3"> <div class="form-check"> <input class="form-check-input category-checkbox" type="checkbox" id="formCheck{{ $k }}" name="category_ids[]" value="{{ $cate->id }}" {{ in_array($cate->id, explode(',', $applicant->category_ids)) ? 'checked' : '' }}> <label class="form-check-label" for="formCheck{{ $k }}"> {{ $cate->name }} </label> </div> </div> @endforeach </div> <!-- New div to show property types --> <div id="propertyTypesContainer" class="mt-3"></div> </div> <div class="row mt-3"> <div class="col-xxl-4"> <div class="row"> <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Year of build</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-sm" name="build_year_start" value="{{$applicant->build_year_start}}" id="colFormLabelSm" placeholder="e.g 1990"> </div> </div> </div> <div class="col-xxl-4"> <div class="row"> <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">to</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-sm" name="build_year_end" value="{{$applicant->build_year_end}}" id="colFormLabelSm" placeholder="e.g 1990"> </div> </div> </div> </div> <div class="row mt-3"> <div class="col-md-12"> <label>Special Features</label> </div> </div> <div class="row mt-3"> <div class="row"> @php // Convert the selected special_feature values into an array $selectedSpecialFeatures = explode(',', $applicant->special_feature ?? ''); @endphp @foreach($specialf as $k => $sf) <div class="col-md-3"> <div class="form-check"> <input class="form-check-input category-checkbox" type="checkbox" id="formCheckss{{ $k }}" name="special_feature[]" value="{{ $sf->id }}" {{ in_array($sf->id, $selectedSpecialFeatures) ? 'checked' : '' }}> <label class="form-check-label" for="formCheckss{{ $k }}"> {{ $sf->name }} </label> </div> </div> @endforeach </div> </div> <div class="row mt-3"> <div class="col-xxl-12"> <div class="row"> <label for="colFormLabelSm" class="col-sm-4 col-form-label col-form-label-sm">Property required by</label> <div class="col-sm-8"> <input type="date" value="{{$applicant->property_required_by}}" class="form-control form-control-sm" name="property_required_by" id="colFormLabelSm" placeholder="e.g 1990"> </div> </div> </div> </div> <div class="row mt-3"> <label>Areas </label> <p> Enter the areas applicant is interested in, you can enter multiple areas separated by commas. Leave blank for all areas. </p> <textarea name="area" cols="50" rows="6" class="form-control" >{{$applicant->area}}</textarea> </div> </div> </div> <div class="mb-4 mt-3"> <div class="row"> <div class="col-md-10"> <h5 class="mb-1">Consented Marketing Category</h5> <p class="text-muted">Fill all information as below</p> </div> <div class="col-md-2"> <select name="bym_status" class="form-select" id="bym_status" style="float: right; margin-top: 0px;"> <option value="1" {{ $applicant->bym_status==1 ? 'selected' : '' }}>Subscribed</option> <option value="2" {{ $applicant->bym_status==2 ? 'selected' : '' }}>Unknown</option> <option value="3" {{ $applicant->bym_status==3 ? 'selected' : '' }}>Unsubscribed</option> </select> </div> <hr> </div> </div> <!-- Section: Marketing Preferences --> <div class="row mb-2"> <div class="col-md-6"> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="notify_property_alerts" @if(!empty($applicant->notify_property_alerts)) checked @endif id="inlineCheckbox7s" value="1" > <label class="form-check-label" for="inlineCheckbox7s">Property alerts</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="notify_general_news" @if(!empty($applicant->notify_general_news)) checked @endif id="inlineCheckbox71" value="1"> <label class="form-check-label" for="inlineCheckbox71">General news</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="notify_special_offers" @if(!empty($applicant->notify_special_offers)) checked @endif id="inlineCheckbox711" value="1"> <label class="form-check-label" for="inlineCheckbox711">Special offers</label> </div> </div> </div> <!-- Section: Preferred Method of Contact --> <div class="mb-4"> <div class="row"> <div class="col-md-10"> <h5 class="mb-1">Preferred Method of Contact</h5> <p class="text-muted">Fill all information as below</p> </div> <hr> </div> </div> <!-- Contact Preferences --> <div class="row"> <div class="col-md-6"> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="notify_phone" @if(!empty($applicant->notify_phone)) checked @endif id="Phone" value="1"> <label class="form-check-label" for="Phone">Phone</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="notify_email" @if(!empty($applicant->notify_email)) checked @endif id="Email" value="1"> <label class="form-check-label" for="Email">Email</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" name="notify_sms" @if(!empty($applicant->notify_sms)) checked @endif type="checkbox" id="SMS" value="1"> <label class="form-check-label" for="SMS">SMS</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="notify_post" @if(!empty($applicant->notify_post)) checked @endif id="POST" value="1"> <label class="form-check-label" for="POST">POST</label> </div> </div> </div> <div class="d-flex align-items-start gap-3 mt-4"> <button type="button" class="btn btn-link text-decoration-none btn-label previestab" data-previous="pills-gen-info-tab"><i class="ri-arrow-left-line label-icon align-middle fs-16 me-2"></i> Back to General</button> <button type="button" class="btn btn-success btn-label right ms-auto nexttab nexttab" data-nexttab="pills-success-tab"><i class="ri-arrow-right-line label-icon align-middle fs-16 ms-2"></i>Next to Internal Info</button> </div> </div> <!-- end tab pane --> <div class="tab-pane fade" id="pills-success" role="tabpanel" aria-labelledby="pills-success-tab"> <div class="mb-4"> <div> <h5 class="mb-1">Conveyancing</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <div class="col-md-3"> <label for="label">Solicitor</label> <div class="input-group"> <input type="text" class="form-control" name="solicitor" value="{{$applicant->solicitor}}" id="searchQuerySolicitor" placeholder="Search by ID or Name" > </div> </div> </div> <div class="mb-4"> <div> <h5 class="mb-1">Internal info</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <div class="col-md-3"> <label for="label">Label</label> <div class="input-group"> <select name="label" class="form-control"> <option>Please Select</option> @foreach($label as $l) <option value="{{$l->id}}" {{ $applicant->label==$l->id ? 'selected' : '' }}>{{$l->name}}</option> @endforeach </select> </div> </div> <div class="col-md-3"> <label for="label">Status</label> <div class="input-group"> <select name="status" class="form-control"> <option>Please Select</option> <option value="1" {{ $applicant->status==1 ? 'selected' : '' }}>Active</option> <option value="2" {{ $applicant->status==2 ? 'selected' : '' }}>In-Active</option> </select> </div> </div> <div class="col-md-3"> <label for="label">Branch</label> <div class="input-group"> <select name="branch_id" class="form-control"> <option>Please Select</option> @foreach($branch as $b) <option value="{{$b->id}}" {{ $applicant->branch_id==$b->id ? 'selected' : '' }}>{{$b->branch}}</option> @endforeach </select> </div> </div> <div class="col-md-3"> <label for="label">Negotiator </label> <div class="input-group"> <select name="negotiator_id" class="form-control"> <option>Please Select</option> @foreach($user as $u) <option value="{{$u->id}}" {{ $applicant->negotiator_id==$u->id ? 'selected' : '' }}>{{$u->first_name}} {{$u->last_name}}</option> @endforeach </select> </div> </div> <div class="col-md-3"> <label for="label">Assigned to </label> <div class="input-group"> <select name="assigned_to" class="form-control"> <option>Please Select</option> @foreach($user as $u) <option value="{{$u->id}}" {{ $applicant->assigned_to==$u->id ? 'selected' : '' }}>{{$u->first_name}} {{$u->last_name}}</option> @endforeach </select> </div> </div> <div class="col-md-3"> <label for="label">Lead Source </label> <div class="input-group"> <select name="lead_source" class="form-control" id="lead_source"> <option value="1" {{ $applicant->lead_source==1 ? 'selected' : '' }}>Email</option> <option value="2" {{ $applicant->lead_source==2 ? 'selected' : '' }}>Findaproperty</option> <option value="3" {{ $applicant->lead_source==3 ? 'selected' : '' }}>Hotproperty</option> <option value="4" {{ $applicant->lead_source==4 ? 'selected' : '' }}>Look4property</option> <option value="5" {{ $applicant->lead_source==5 ? 'selected' : '' }}>Phone</option> <option value="6" {{ $applicant->lead_source==6 ? 'selected' : '' }}>Primelocation</option> <option value="7" {{ $applicant->lead_source==7 ? 'selected' : '' }}>Propertyfinder</option> <option value="8" {{ $applicant->lead_source==8 ? 'selected' : '' }}>Rightmove</option> <option value="9" {{ $applicant->lead_source==9 ? 'selected' : '' }}>RM Import</option> <option value="10" {{ $applicant->lead_source==10 ? 'selected' : '' }}>Walk-in</option> <option value="11" {{ $applicant->lead_source==11 ? 'selected' : '' }}>Web</option> </select> </div> </div> <div class="row"> <div class="col-md-6"> <label for="label">Comments </label> <div class="input-group"> <textarea name="comments" id="comments" class="form-control">{{$applicant->comments}}</textarea> </div> </div> <div class="col-md-6"> <label for="label">Other Info </label> <div class="input-group"> <textarea name="other_info" id="other_info" class="form-control">{{$applicant->other_info}}</textarea> </div> </div> </div> </div> <div class="d-flex align-items-start gap-3 mt-4"> <button type="button" class="btn btn-success btn-label right ms-auto nexttab nexttab" data-nexttab="pills-success-tab-user"><i class="ri-arrow-right-line label-icon align-middle fs-16 ms-2"></i>Go to more info</button> </div> </div> <div class="tab-pane fade" id="pills-success-user" role="tabpanel" aria-labelledby="pills-success-tab-user"> <div> <div class="mb-4"> <div> <h5 class="mb-1">Users</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <div> <label><input type="radio" name="user_account_type" @if(!empty($applicant->user_account_type=='no_account')) checked @endif value="no_account"> Do not create a user account</label><br> <label><input type="radio" name="user_account_type" value="new_account" @if(!empty($applicant->user_account_type=='new_account')) checked @endif> Create a new user account</label><br> <label><input type="radio" name="user_account_type" value="existing_account" @if(!empty($applicant->user_account_type=='existing_account')) checked @endif> This user is already registered, please enter the username below</label> </div> <!-- New Account Fields (Hidden by Default) --> <div id="newAccountDiv" style="display: none; margin-top: 10px;"> <label for="newUsername">Username:</label> <input type="text" id="newUsername" value="{{$applicant->newUsername}}" class="form-control" name="username"> <label for="newPassword">Password:</label> <input type="password" id="newPassword" class="form-control" name="password"> </div> <!-- Existing Account Fields (Hidden by Default) --> <div id="existingAccountDiv" style="display: none; margin-top: 10px;"> <label for="existingUsername">Enter Username:</label> <input type="text" id="existingUsername" class="form-control"> <small id="usernameStatus" class="text-danger"></small> <!-- AJAX Response Here --> </div> </div> </div> <div class="d-flex align-items-start gap-3 mt-4"> <button type="button" class="btn btn-link text-decoration-none btn-label previestab" data-previous="pills-gen-info-tab"><i class="ri-arrow-left-line label-icon align-middle fs-16 me-2"></i> Back to General</button> <button type="button" class="btn btn-success btn-label right ms-auto nexttab nexttab" data-nexttab="pills-success-tab-file"><i class="ri-arrow-right-line label-icon align-middle fs-16 ms-2"></i>Next to Internal Info</button> </div> </div> <div class="tab-pane fade" id="pills-success-file" role="tabpanel" aria-labelledby="pills-success-file"> <div> <div class="mb-4"> <div> <h5 class="mb-1">Files</h5> <p class="text-muted">Fill all Information as below</p> <hr> </div> </div> <div class="row"> <!-- File Drop Zone --> <div class="col-md-6 mb-3"> <div id="drop-zone" class="drop-zone"> <!-- Instructional Text --> <p>Drag & Drop files here or click to upload</p> <!-- File Input (Hidden) --> <input type="file" name="files_list[]" id="file-input" hidden multiple> </div> <!-- List of Uploaded Files --> <ul id="file-list" class="list-group file-list"> @foreach($applicant->applicantFiles as $f) <li class="list-group-item d-flex justify-content-between align-items-center"> {{$f->file_name }} <button type="button" class="btn btn-sm btn-danger delete-file" data-id="{{$f->id}}" data-file="{{$f->file_name}}"> ✖ </button> </li> @endforeach </ul> </div> </div> </div> <div class="d-flex align-items-start gap-3 mt-4"> <button type="button" class="btn btn-link text-decoration-none btn-label previestab" data-previous="pills-gen-info-tab"><i class="ri-arrow-left-line label-icon align-middle fs-16 me-2"></i> Back to General</button> <button type="submit" class="btn btn-success btn-label right ms-auto nexttab nexttab"><i class="ri-check-double-line label-icon align-middle fs-16 ms-2"></i>Submit</button> </div> </div> </div> <!-- end tab pane --> <!-- end tab content --> </form> </div> <!-- end card body --> </div> </div> </div> </div> </div> <div class="simplebar-placeholder" style="width: 399px; height: 987px;"></div> </div> <div class="simplebar-track simplebar-horizontal" style="visibility: hidden;"> <div class="simplebar-scrollbar" style="width: 0px; display: none;"></div> </div> <div class="simplebar-track simplebar-vertical" style="visibility: visible;"> <div class="simplebar-scrollbar" style="height: 47px; transform: translate3d(0px, 0px, 0px); display: block;"></div> </div> </div> </div> <!-- Search Modal --> <!-- Common Search Modal --> <div class="modal fade" id="searchModal" tabindex="-1" aria-labelledby="searchModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="searchModalLabel">Search User</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> @can('create_directory') <a href="{{ route('directories.create') }}" target="_blank"> <button type="button" class="btn btn-primary btn-sm">Add Directory</button> </a> @endcan <div class="mb-3"> <label class="form-label">Category</label> <select class="form-select" id="dcategory"> @foreach($category as $c) <option value="{{ $c->id }}">{{ $c->name }}</option> @endforeach </select> </div> <div class="mb-3"> <label class="form-label">Search By</label> <select class="form-select" id="searchType"> <option value="name">Name</option> <option value="company">Company</option> </select> </div> <div class="mb-3"> <label class="form-label">Search Query</label> <input type="text" class="form-control" id="searchQueryModal" placeholder="Search by ID or Name"> </div> <button class="btn btn-primary" onclick="searchUser()">Search</button> <table class="table table-bordered mt-3" id="searchResults"> <thead> <tr> <th>Company</th> <th>Name</th> <th>Category</th> </tr> </thead> <tbody></tbody> </table> </div> </div> </div> </div> <!-- JavaScript --> <script> document.addEventListener("DOMContentLoaded", function () { let dropZone = document.getElementById("drop-zone"); let fileInput = document.getElementById("file-input"); let fileList = document.getElementById("file-list"); let csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") || ''; // Click to select files dropZone.addEventListener("click", function () { fileInput.click(); }); // Handle file selection via input fileInput.addEventListener("change", function (event) { handleFiles(event.target.files); }); // Handle file drop dropZone.addEventListener("dragover", function (event) { event.preventDefault(); dropZone.classList.add("dragover"); }); dropZone.addEventListener("dragleave", function () { dropZone.classList.remove("dragover"); }); dropZone.addEventListener("drop", function (event) { event.preventDefault(); dropZone.classList.remove("dragover"); let files = event.dataTransfer.files; fileInput.files = files; // Assign files to input field handleFiles(files); }); // Function to list files function handleFiles(files) { fileList.innerHTML = ""; for (let file of files) { let listItem = document.createElement("li"); listItem.textContent = file.name; listItem.classList.add("list-group-item"); fileList.appendChild(listItem); } } // Handle file deletion via AJAX fileList.addEventListener("click", function (event) { if (event.target.classList.contains("delete-file")) { let fileId = event.target.getAttribute("data-id"); let fileName = event.target.getAttribute("data-file"); let url = "{{ route('applicant.delete_file', ['applicant' => ':id']) }}".replace(':id', fileId); if (confirm("Are you sure you want to delete this file?")) { fetch(url, { method: "POST", // Laravel may not support DELETE via fetch() headers: { "Content-Type": "application/json", "X-CSRF-TOKEN": csrfToken }, body: JSON.stringify({ id: fileId, file: fileName, _method: "DELETE" }) // Laravel expects _method }) .then(response => response.json()) .then(data => { if (data.success) { event.target.closest("li").remove(); // Remove from list } else { alert("Error deleting file: " + data.message); } }) .catch(error => console.error("Error:", error)); } } }); }); let activeInput = null; // Track which input field was clicked // Track input field clicks and set activeInput correctly document.getElementById('searchQueryLander').addEventListener('click', function () { activeInput = this; // Lander input $('#searchModal').modal('show'); }); document.getElementById('searchQuerySolicitor').addEventListener('click', function () { activeInput = this; // Solicitor input $('#searchModal').modal('show'); }); function searchUser() { const query = document.getElementById('searchQueryModal').value.toLowerCase(); const searchType = document.getElementById('searchType').value; const dcategory = document.getElementById('dcategory').value; $.ajax({ url: '{{ route('applicant.users') }}', method: 'GET', data: { query, dcategory, search_type: searchType }, success: function (response) { populateTable(response); }, error: function () { alert('An error occurred while searching for users.'); } }); } document.addEventListener('DOMContentLoaded', function () { const radios = document.querySelectorAll('input[name="accountOption"]'); const newAccountDiv = document.getElementById('newAccountDiv'); const existingAccountDiv = document.getElementById('existingAccountDiv'); const existingUsername = document.getElementById('existingUsername'); const usernameStatus = document.getElementById('usernameStatus'); // Function to toggle divs based on selection radios.forEach(radio => { radio.addEventListener('change', function () { if (this.value === 'new_account') { newAccountDiv.style.display = 'block'; existingAccountDiv.style.display = 'none'; } else if (this.value === 'existing_account') { existingAccountDiv.style.display = 'block'; newAccountDiv.style.display = 'none'; } else { newAccountDiv.style.display = 'none'; existingAccountDiv.style.display = 'none'; } }); }); // AJAX Check for Existing Username }); document.addEventListener('DOMContentLoaded', function () { let existingUsername = document.getElementById('existingUsername'); let usernameStatus = document.getElementById('usernameStatus'); let checkUsernameUrl = "{{ route('applicant.check_user') }}"; // Fix here existingUsername.addEventListener('input', function () { let username = this.value.trim(); if (username.length > 2) { fetch(checkUsernameUrl + '?username=' + encodeURIComponent(username)) // Fix encoding .then(response => response.json()) .then(data => { if (data.exists) { usernameStatus.textContent = 'Username is already taken!'; usernameStatus.style.color = 'red'; } else { usernameStatus.textContent = 'Username is available!'; usernameStatus.style.color = 'green'; } }) .catch(error => console.error('Error:', error)); } else { usernameStatus.textContent = ''; } }); }); function populateTable(response) { const resultsTableBody = document.getElementById('searchResults').querySelector('tbody'); resultsTableBody.innerHTML = ''; if (response.length > 0) { response.forEach(user => { const row = document.createElement('tr'); row.innerHTML = ` <td>${user.company}</td> <td>${user.full_name}</td> <td>${user.category_name}</td> `; row.addEventListener('click', function () { selectUser(user); }); resultsTableBody.appendChild(row); }); } else { const row = document.createElement('tr'); row.innerHTML = '<td colspan="3" class="text-center">No users found</td>'; resultsTableBody.appendChild(row); } } function selectUser(user) { if (activeInput) { activeInput.value = user.full_name; // Set the correct input field } $('#searchModal').modal('hide'); // Close the modal } $(document).ready(function() { // Function to update "Select All" checkbox based on individual selections function updateSelectAllCheckbox() { var allChecked = $('.property-type-checkbox').length > 0 && $('.property-type-checkbox:checked').length === $('.property-type-checkbox').length; $('#selectAllPropertyTypes').prop('checked', allChecked); } // Event Listener for dynamically loaded "Select All" checkbox $(document).on('change', '#selectAllPropertyTypes', function() { $('.property-type-checkbox').prop('checked', $(this).is(':checked')); }); // Event Listener for individual checkboxes $(document).on('change', '.property-type-checkbox', function() { updateSelectAllCheckbox(); }); // Call the function after AJAX updates the checkboxes $(document).ajaxComplete(function() { updateSelectAllCheckbox(); }); }); $(document).ready(function() { function fetchPropertyTypes() { let selectedCategories = []; // Get all checked categories $('.category-checkbox:checked').each(function() { selectedCategories.push($(this).val()); }); // AJAX call to fetch property types if (selectedCategories.length > 0) { $.ajax({ url: "{{ route('applicant.getBy_Categories') }}", type: "GET", data: { category_ids: selectedCategories,id:{{$applicant->id}} }, success: function(response) { $('#propertyTypesContainer').html(response.propertyTypes); } }); } else { $('#propertyTypesContainer').html('<p class="text-muted">No categories selected.</p>'); } } // "Select All" Functionality $('#selectAllCategories').on('change', function() { $('.category-checkbox').prop('checked', $(this).is(':checked')); fetchPropertyTypes(); }); // Individual Category Selection $(document).on('change', '.category-checkbox', function() { // Uncheck "Select All" if any checkbox is unchecked if ($('.category-checkbox:checked').length !== $('.category-checkbox').length) { $('#selectAllCategories').prop('checked', false); } else { $('#selectAllCategories').prop('checked', true); } fetchPropertyTypes(); }); fetchPropertyTypes(); }); document.addEventListener('DOMContentLoaded', function() { var underOfferCheckbox = document.getElementById('Underoffer'); var inputFieldDiv = document.getElementById('inputFieldDiv'); if (underOfferCheckbox && inputFieldDiv) { underOfferCheckbox.addEventListener('change', function() { // Show or hide input field based on checkbox state inputFieldDiv.style.display = this.checked ? "block" : "none"; }); } else { console.error("Element not found! Check the HTML IDs."); } }); document.addEventListener('DOMContentLoaded', function() { var propertyCheckbox = document.getElementById('property_to_market'); var propertyMarketFields = document.getElementById('propertyMarketFields'); if (propertyCheckbox && propertyMarketFields) { propertyCheckbox.addEventListener('change', function() { propertyMarketFields.style.display = this.checked ? "block" : "none"; }); } }); document.addEventListener('DOMContentLoaded', function() { // Get the checkbox and textarea container var chainCheckbox = document.getElementById('Chain'); var textareaDiv = document.getElementById('textareaDiv'); // Check if elements exist before adding event listener if (chainCheckbox && textareaDiv) { chainCheckbox.addEventListener('change', function() { // Show or hide textarea based on checkbox state textareaDiv.style.display = this.checked ? "block" : "none"; }); } else { console.error("Element not found! Check the HTML IDs."); } }); document.addEventListener('DOMContentLoaded', function() { // Get the checkbox and the extra input fields container var propertyToSellCheckbox = document.getElementById('property_to_sell'); var extraInputFields = document.getElementById('extraInputFields'); // Check if elements exist before adding event listener if (propertyToSellCheckbox && extraInputFields) { propertyToSellCheckbox.addEventListener('change', function() { // Show or hide the extra input fields based on checkbox state extraInputFields.style.display = this.checked ? "block" : "none"; }); } else { console.error("Element not found! Check the HTML IDs."); } }); document.addEventListener('DOMContentLoaded', function() { var investorCheckbox = document.getElementById('Investor'); var extraCheckboxDiv = document.getElementById('extraCheckboxDiv'); if (investorCheckbox && extraCheckboxDiv) { investorCheckbox.addEventListener('change', function() { // Show or hide extra checkbox based on the investor checkbox state extraCheckboxDiv.style.display = this.checked ? "block" : "none"; }); } else { console.error("Element not found! Check the HTML IDs."); } }); document.addEventListener('DOMContentLoaded', function() { // Get the checkbox element var firstTimeBuyerCheckbox = document.getElementById('Firsttimebuyer'); // Get the div that should be shown/hidden var fileInputDiv = document.getElementById('fileInputDiv'); // Debugging: Check if elements exist console.log("Checkbox found:", firstTimeBuyerCheckbox); console.log("File input div found:", fileInputDiv); // Ensure the checkbox exists before adding event listener if (firstTimeBuyerCheckbox && fileInputDiv) { firstTimeBuyerCheckbox.addEventListener('change', function() { console.log("Checkbox changed, checked:", this.checked); fileInputDiv.style.display = this.checked ? "block" : "none"; }); } else { console.error("Checkbox or file input div not found!"); } }); document.getElementById('able_dependant_on_sale').addEventListener('change', function() { var div1 = document.getElementById('div1'); var div2 = document.getElementById('div2'); if (this.value == "1") { div1.style.display = "block"; // Show div1 div2.style.display = "none"; // Hide div2 } else if (this.value == "2") { div1.style.display = "none"; // Hide div1 div2.style.display = "block"; // Show div2 } else { div1.style.display = "none"; // Hide all divs div2.style.display = "none"; } }); </script> <script> $(document).ready(function () { $('#lettingswpCheck').change(function () { if ($(this).is(':checked')) { $('#lettingswpDiv').show(); } else { $('#lettingswpDiv').hide(); } }); }); $(document).ready(function () { $('#salesCheck').change(function () { if ($(this).is(':checked')) { $('#saleswpDivwpDiv').show(); } else { $('#saleswpDivwpDiv').hide(); } }); }); $(document).ready(function () { $('#mortgage').change(function () { if ($(this).is(':checked')) { $('#mortgageDiv').show(); } else { $('#mortgageDiv').hide(); } }); }); </script> @endsection
Close