FIX_EXPIRY_TOGGLE_AND_BRANCH_CONTACT_NAME_DOT_ALLOWED

This commit is contained in:
VENKATESHWARAN 2026-06-11 16:46:17 +05:30
parent f09b5433cf
commit c347e08538
3 changed files with 22 additions and 22 deletions

View File

@ -2474,11 +2474,11 @@ class ClientController extends AdminController
]
],
'name.*' => [
'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s\-_]+$/]',
'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s.\-_]+$/]',
'errors' => [
'required' => 'Contact name is required',
'min_length' => 'Contact name must be at least 3 characters long',
'regex_match' => 'Contact name can only contain letters, numbers, spaces, hyphens and underscores.'
'regex_match' => 'Contact name can only contain letters, numbers, spaces, periods, hyphens and underscores.'
]
],
'designation.*' => [
@ -2658,11 +2658,11 @@ class ClientController extends AdminController
]
],
'name.*' => [
'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s\-_]+$/]',
'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s.\-_]+$/]',
'errors' => [
'required' => 'Contact name is required',
'min_length' => 'Contact name must be at least 3 characters long',
'regex_match' => 'Contact name can only contain letters, numbers, spaces, hyphens and underscores.'
'regex_match' => 'Contact name can only contain letters, numbers, spaces, periods, hyphens and underscores.'
]
],
'designation.*' => [

View File

@ -202,7 +202,7 @@ input:checked + .slider-branch-contact:before {
<label for="state">State<span class="text-danger">*</span></label>
<select class="form-control" id="state" name="state" required>
<option value="">Select State</option>
<?php foreach($state as $value) { ?>
<?php foreach($state ?? [] as $value) { ?>
<option value="<?= $value['id'] ?>"><?= $value['state'] ?></option>
<?php } ?>
</select>
@ -265,8 +265,8 @@ input:checked + .slider-branch-contact:before {
<label for="first_name">Name<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control" placeholder="Enter Contact Name"
name="name[]" id="name" required
data-parsley-pattern="^[A-Za-z\s]+$"
data-parsley-pattern-message="Contact name may contain only letters and spaces.">
data-parsley-pattern="^[A-Za-z\s.]+$"
data-parsley-pattern-message="Contact name may contain only letters, spaces, and periods.">
</div>
<div class="form-group col-md-6">
<label for="designation">Designation<span class="text-danger">*</span></label>
@ -773,8 +773,8 @@ function appendContactHtml(contact = false, reset = false) {
<div class="form-group col-md-6">
<label for="${uniqueId}_first_name">Name<span class="text-danger">*</span></label>
<input value="${contact !== undefined && contact !== false ? contact.name : ''}" type="text" class="form-control" placeholder="Enter Contact Name" name="name[]" id="${uniqueId}_name" required
data-parsley-pattern="^[A-Za-z\s]+$"
data-parsley-pattern-message="Contact name may contain only letters and spaces.">
data-parsley-pattern="^[A-Za-z\\s.]+$"
data-parsley-pattern-message="Contact name may contain only letters, spaces, and periods.">
</div>
<div class="form-group col-md-6">
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>

View File

@ -37,9 +37,12 @@
font-weight: 500;
color: #333;
justify-content: flex-end;
margin-right: 40px;
}
.expired-policies-toggle-wrap {
padding-bottom: 10px;
}
.switch-label input {
opacity: 0;
width: 0;
@ -143,18 +146,15 @@ input:checked + .slider_blue::before {
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm" style="position: relative;right: 10px;"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
<button type="button" id="BtnAddSuccess" class="btn btn-success waves-effect waves-light BtnAddSuccess btn-sm" onclick="showModal()"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy From Opportunities</button>
</div>
<br>
<div class="expired-policies-toggle-wrap" style="padding-bottom: 10px; position: absolute; right: 0; z-index: 10;">
<label class="switch-label" for="chk-show-expired">
<input type="checkbox" id="chk-show-expired">
<span class="slider"></span>
<span class="switch-text">Expired Policies</span>
</label>
</div>
<div class="table-responsive" id="table_list">
<div class="expired-policies-toggle-wrap d-flex justify-content-end">
<label class="switch-label" for="chk-show-expired">
<input type="checkbox" id="chk-show-expired">
<span class="slider"></span>
<span class="switch-text">Expired Policies</span>
</label>
</div>
<table data-custom-table-css="table" class="table table-borderless table mb-0 w-100 nowrap" id="table-client-policy">
<thead class="">
<tr style="color:black !important;">
@ -177,8 +177,8 @@ input:checked + .slider_blue::before {
<div class="col-12">
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" id="btnPolicyBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack btn-sm"><span class="mdi mdi-format-list-bulleted" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<div class="d-flex justify-content-end mb-2" style="padding-right: 13px;">
<button type="button" id="btnPolicyBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="mdi mdi-format-list-bulleted" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>