CHANGE_NOTIFICATION_CHECKS_GMS_EDIT_AGE_ISSUE : AADHAVAN
This commit is contained in:
parent
96167760c0
commit
c509399f91
@ -168,6 +168,8 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
// echo "<pre>";
|
// echo "<pre>";
|
||||||
// print_r($data); die;
|
// print_r($data); die;
|
||||||
|
$data['placeHolders'] = ['member_name','nhance_logo','tpa_id','ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'client_name'];
|
||||||
|
|
||||||
|
|
||||||
echo view('layout/header', $headerData);
|
echo view('layout/header', $headerData);
|
||||||
echo view('client_onboarding', $data);
|
echo view('client_onboarding', $data);
|
||||||
@ -1241,19 +1243,19 @@ class ClientController extends AdminController
|
|||||||
$client_policy_id = $this->request->getPost("client_policy_id");
|
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||||
|
|
||||||
$data['sum_insured'] =str_replace(',', '',$this->request->getPost("sum_insured"));
|
$data['sum_insured'] =str_replace(',', '',$this->request->getPost("sum_insured"));
|
||||||
$data['family_floater'] =$this->request->getPost("family_floater");
|
$data['family_floater'] =$this->request->getPost("family_floater") ? $this->request->getPost("family_floater") : 0;
|
||||||
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
|
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer") ? $this->request->getPost("corporatebuffer") : 0;
|
||||||
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
||||||
|
|
||||||
// print_r($this->request->getPost());die;
|
// print_r($this->request->getPost());die;
|
||||||
$data['age_ratio']['self']['min'] = $this->request->getPost("self_min_age");
|
$data['age_ratio']['self']['min'] = $this->request->getPost("self_min_age") ? $this->request->getPost("self_min_age") :0;
|
||||||
$data['age_ratio']['self']['max'] = $this->request->getPost("self_max_age");
|
$data['age_ratio']['self']['max'] = $this->request->getPost("self_max_age") ? $this->request->getPost("self_max_age") : 0;
|
||||||
$data['age_ratio']['spouse']['min'] = $this->request->getPost("spouse_min_age");
|
$data['age_ratio']['spouse']['min'] = $this->request->getPost("spouse_min_age") ? $this->request->getPost("spouse_min_age") : 0;
|
||||||
$data['age_ratio']['spouse']['max'] = $this->request->getPost("spouse_max_age");
|
$data['age_ratio']['spouse']['max'] = $this->request->getPost("spouse_max_age") ? $this->request->getPost("spouse_max_age") : 0;
|
||||||
$data['age_ratio']['child']['min'] = $this->request->getPost("child_min_age");
|
$data['age_ratio']['child']['min'] = $this->request->getPost("child_min_age") ? $this->request->getPost("child_min_age") : 0;
|
||||||
$data['age_ratio']['child']['max'] = $this->request->getPost("child_max_age");
|
$data['age_ratio']['child']['max'] = $this->request->getPost("child_max_age") ? $this->request->getPost("child_max_age") : 0;
|
||||||
$data['age_ratio']['elders']['min'] = $this->request->getPost("other_member_min_age");
|
$data['age_ratio']['elders']['min'] = $this->request->getPost("other_member_min_age") ? $this->request->getPost("other_member_min_age") :0;
|
||||||
$data['age_ratio']['elders']['max'] = $this->request->getPost("other_member_max_age");
|
$data['age_ratio']['elders']['max'] = $this->request->getPost("other_member_min_age") ? $this->request->getPost("other_member_min_age") : 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1327,7 +1329,7 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['family_floaters']['elders_count'] =$this->request->getPost("member_count");
|
$data['family_floaters']['elders_count'] =$this->request->getPost("member_count") ? $this->request->getPost("member_count") : 0;
|
||||||
|
|
||||||
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
||||||
if ($data['waiverofpreexistingdiseases'] == 1) {
|
if ($data['waiverofpreexistingdiseases'] == 1) {
|
||||||
|
|||||||
@ -1977,6 +1977,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
$count = 0;
|
$count = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return true; // Email(s) sent successfully
|
return true; // Email(s) sent successfully
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@ -618,7 +618,6 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
$client_data = $this->clientModel->where('id', $client_id)->first();
|
$client_data = $this->clientModel->where('id', $client_id)->first();
|
||||||
|
|
||||||
$notification = $this->notificationModel->where('client_id',$client_id)->where('template_name','member_welcome_mail')->first();
|
|
||||||
|
|
||||||
$jwt = $this->request->getHeader('Authorization');
|
$jwt = $this->request->getHeader('Authorization');
|
||||||
$jwtParts = explode(' ', $jwt);
|
$jwtParts = explode(' ', $jwt);
|
||||||
@ -874,8 +873,9 @@ class EmployeeRestController extends AdminController
|
|||||||
$emp_policy = $this->employeePolicyModel->insert($emp_policy_data);
|
$emp_policy = $this->employeePolicyModel->insert($emp_policy_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$notification = $this->notificationModel->where('client_id',$client_id)->where('template_name','member_welcome_mail')->first();
|
||||||
|
|
||||||
if ($notification['enabled'] == 1) {
|
if (isset($notification) && $notification['enabled'] == 1) {
|
||||||
//trigger
|
//trigger
|
||||||
if ($dataToInsert[$a]['relationship'] == 'Self') {
|
if ($dataToInsert[$a]['relationship'] == 'Self') {
|
||||||
|
|
||||||
@ -900,7 +900,6 @@ class EmployeeRestController extends AdminController
|
|||||||
// if ($dataToInsert[$a]['email_corporate'] != null || $dataToInsert[$a]['email_corporate'] != '' && $dataToInsert[$a]['relationship'] == 'Self') {
|
// if ($dataToInsert[$a]['email_corporate'] != null || $dataToInsert[$a]['email_corporate'] != '' && $dataToInsert[$a]['relationship'] == 'Self') {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return $this->respond(['status' => 'success', 'code' => 200, 'message' => "Success" ], 200);
|
return $this->respond(['status' => 'success', 'code' => 200, 'message' => "Success" ], 200);
|
||||||
}else{
|
}else{
|
||||||
@ -1650,12 +1649,18 @@ public function iAgreeForAddOn()
|
|||||||
$find = $this->employeeModel->getEmpFamilybyEmpCode(client_policy_id: $value,emp_code: $emp_code,client_id: $client_id,emp_status:['draft','enrolled'],policy_status:['draft','enrolled']);
|
$find = $this->employeeModel->getEmpFamilybyEmpCode(client_policy_id: $value,emp_code: $emp_code,client_id: $client_id,emp_status:['draft','enrolled'],policy_status:['draft','enrolled']);
|
||||||
$array_list[] = $find;
|
$array_list[] = $find;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$notification = $this->notificationModel->where('client_id' ,$client_id)->where('template_name', 'member_review_and_summary_mail')->first();
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($notification) && $notification['enabled'] == 1) {
|
||||||
$params ['array_list'] = $array_list;
|
$params ['array_list'] = $array_list;
|
||||||
$params ['client_policy_id'] = $client_policy_id;
|
$params ['client_policy_id'] = $client_policy_id;
|
||||||
$params ['emp_code'] = $emp_code;
|
$params ['emp_code'] = $emp_code;
|
||||||
$params ['client_id'] = $client_id;
|
$params ['client_id'] = $client_id;
|
||||||
$wholeData =sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
|
$params ['notification'] = $notification;
|
||||||
|
|
||||||
|
$wholeData =sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
|
||||||
MailHelper::send_email($wholeData[0]);
|
MailHelper::send_email($wholeData[0]);
|
||||||
|
|
||||||
if (isset($wholeData[0])) {
|
if (isset($wholeData[0])) {
|
||||||
@ -1672,6 +1677,7 @@ public function iAgreeForAddOn()
|
|||||||
MailHelper::send_email($value);
|
MailHelper::send_email($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,6 @@ class MailHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function bulk_mail(array $mails = [])
|
public static function bulk_mail(array $mails = [])
|
||||||
{
|
{
|
||||||
// print_r();die;
|
// print_r();die;
|
||||||
@ -78,6 +77,5 @@ class MailHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -201,11 +201,11 @@ body {
|
|||||||
|
|
||||||
|
|
||||||
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
|
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
|
||||||
$('#btnBranchAdd').hide();
|
$('#notification-tab').hide();
|
||||||
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
|
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
|
||||||
}else{
|
}else{
|
||||||
if ($('#btnBranchBack')[0].style.display == 'none') {
|
if ($('#notification-tab')[0].style.display == 'none') {
|
||||||
$('#btnBranchAdd').show();
|
$('#notification-tab').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,10 +236,10 @@ body {
|
|||||||
client_branch_contact();
|
client_branch_contact();
|
||||||
});
|
});
|
||||||
|
|
||||||
// document.getElementById("notification_tab").addEventListener("click", function(event) {
|
document.getElementById("notification_tab").addEventListener("click", function(event) {
|
||||||
// event.preventDefault();
|
event.preventDefault();
|
||||||
// client_notification();
|
client_notification();
|
||||||
// });
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
$member_review_and_summary_mail = 0;
|
$member_review_and_summary_mail = 0;
|
||||||
$account_maneger_summary_mail = 0;
|
$account_maneger_summary_mail = 0;
|
||||||
$client_hr_summary_mail = 0;
|
$client_hr_summary_mail = 0;
|
||||||
|
if(isset($notification)){
|
||||||
foreach($notification as $value){
|
foreach($notification as $value){
|
||||||
|
|
||||||
if ($value['template_name'] == 'member_welcome_mail') {
|
if ($value['template_name'] == 'member_welcome_mail') {
|
||||||
@ -50,6 +51,7 @@
|
|||||||
if ($value['template_name'] == 'client_hr_summary_mail') {
|
if ($value['template_name'] == 'client_hr_summary_mail') {
|
||||||
$client_hr_summary_mail = $value['enabled'];
|
$client_hr_summary_mail = $value['enabled'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?></p>
|
?></p>
|
||||||
</div>
|
</div>
|
||||||
@ -57,15 +59,15 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Nhance team mail ID's<span class="text-danger">*</span></label>
|
<label for="branch_name">Nhance team mail ID's<span class="text-danger">*</span></label>
|
||||||
<textarea name="" id="nhance_team_mail_ids" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo $client['common_mails'] ?></textarea>
|
<textarea name="" id="nhance_team_mail_ids" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['common_mails']) ? $client['common_mails'] : ''; ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">HR mail ID's<span class="text-danger">*</span></label>
|
<label for="branch_name">HR mail ID's<span class="text-danger">*</span></label>
|
||||||
<textarea name="" id="hr_mail_id" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo $client['hr_mails'] ?></textarea>
|
<textarea name="" id="hr_mail_id" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['hr_mails']) ? $client['hr_mails'] : ''; ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Member welcome mail</label>
|
<label for="branch_name">Member welcome mail</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="member_welcome_mail_btn" type="checkbox" name="member_welcome_mail_btn" <?= ($member_welcome_mail == 1) ? 'checked' : '' ?>>
|
<input id="member_welcome_mail_btn" type="checkbox" name="member_welcome_mail_btn" <?= ($member_welcome_mail == 1) ? 'checked' : '' ?>>
|
||||||
@ -81,8 +83,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Member remider mail</label>
|
<label for="branch_name">Member reminder mail</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="member_reminder_mail_btn" type="checkbox" name="member_reminder_mail_btn" <?= $member_reminder_mail == 1 ? 'checked' : '' ?>>
|
<input id="member_reminder_mail_btn" type="checkbox" name="member_reminder_mail_btn" <?= $member_reminder_mail == 1 ? 'checked' : '' ?>>
|
||||||
<span class="slider round" style="height: 27px;"></span>
|
<span class="slider round" style="height: 27px;"></span>
|
||||||
@ -96,7 +98,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Member ECard mail</label>
|
<label for="branch_name">Member ECard mail</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="member_ecard_mail_btn" type="checkbox" name="member_ecard_mail_btn" <?= $member_ecard_mail == 1 ? 'checked' : '' ?>>
|
<input id="member_ecard_mail_btn" type="checkbox" name="member_ecard_mail_btn" <?= $member_ecard_mail == 1 ? 'checked' : '' ?>>
|
||||||
@ -111,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Member Review and summary mail</label>
|
<label for="branch_name">Member Review and summary mail</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="member_review_and_summary_mail_btn" type="checkbox" name="member_review_and_summary_mail_btn" <?= $member_review_and_summary_mail == 1 ? 'checked' : '' ?>>
|
<input id="member_review_and_summary_mail_btn" type="checkbox" name="member_review_and_summary_mail_btn" <?= $member_review_and_summary_mail == 1 ? 'checked' : '' ?>>
|
||||||
@ -126,7 +128,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Account Maneger summary mail</label>
|
<label for="branch_name">Account Maneger summary mail</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="account_maneger_summary_mail_btn" type="checkbox" name="account_maneger_summary_mail_btn" <?= $account_maneger_summary_mail ? 'checked' : '' ?>>
|
<input id="account_maneger_summary_mail_btn" type="checkbox" name="account_maneger_summary_mail_btn" <?= $account_maneger_summary_mail ? 'checked' : '' ?>>
|
||||||
@ -141,7 +143,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-6">
|
||||||
<label for="branch_name">Client HR summary mail</label>
|
<label for="branch_name">Client HR summary mail</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="client_hr_summary_mail_btn" type="checkbox" name="client_hr_summary_mail_btn" <?= $client_hr_summary_mail == 1 ? 'checked' : '' ?>>
|
<input id="client_hr_summary_mail_btn" type="checkbox" name="client_hr_summary_mail_btn" <?= $client_hr_summary_mail == 1 ? 'checked' : '' ?>>
|
||||||
@ -265,7 +267,7 @@
|
|||||||
<label for="emp_code">Template Name</label>
|
<label for="emp_code">Template Name</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-5">
|
||||||
<input type="text" id="template_name" name="template_name" class="form-control" value="Member Remider Mail" readonly placeholder="Template Name">
|
<input type="text" id="template_name" name="template_name" class="form-control" value="Member Reminder Mail" readonly placeholder="Template Name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -136,13 +136,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="width: 11%;"><span style="margin-right: 20px;">Self:</span></td>
|
<td style="width: 11%;"><span style="margin-right: 20px;">Self:</span></td>
|
||||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;" name="family_floaters[]" value="self" id="self" checked> </td>
|
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;" name="family_floaters[]" value="self" id="self" checked> </td>
|
||||||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($self_min_age) ? $self_min_age : '18'; ?>" style="width: 25%;;" type="number" name="self_min_age" id="self_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo (isset($self_min_age) && $self_min_age > 0) ? $self_min_age : '18'; ?>" style="width: 25%;;" type="number" name="self_min_age" id="self_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>" style="width: 25%;;" type="number" name="self_max_age" id="self_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>" style="width: 25%;;" type="number" name="self_max_age" id="self_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 11%;"><span style="margin-right: 20px;">Spouse:</span></td>
|
<td style="width: 11%;"><span style="margin-right: 20px;">Spouse:</span></td>
|
||||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"name="family_floaters[]" value="spouse" id="spouse"></td>
|
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"name="family_floaters[]" value="spouse" id="spouse"></td>
|
||||||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($spouse_min_age) ? $spouse_min_age : '18'; ?>" style="width: 25%;;" type="number" name="spouse_min_age" id="spouse_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo (isset($spouse_min_age) && $spouse_min_age > 0) ? $spouse_min_age : '18'; ?>" style="width: 25%;;" type="number" name="spouse_min_age" id="spouse_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>" style="width: 25%;;" type="number" name="spouse_max_age" id="spouse_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>" style="width: 25%;;" type="number" name="spouse_max_age" id="spouse_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -686,8 +686,8 @@
|
|||||||
|
|
||||||
|
|
||||||
if (!$('#self').prop('checked')) {
|
if (!$('#self').prop('checked')) {
|
||||||
$('#self_min_age').removeAttr('name')
|
$('#self_min_age').removeAttr('name');
|
||||||
$('#self_max_age').removeAttr('name')
|
$('#self_max_age').removeAttr('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$('#spouse').prop('checked')) {
|
if (!$('#spouse').prop('checked')) {
|
||||||
@ -1040,6 +1040,9 @@
|
|||||||
|
|
||||||
if ($('#spouse').prop('checked')) {
|
if ($('#spouse').prop('checked')) {
|
||||||
$('.spouse-age').css('display','');
|
$('.spouse-age').css('display','');
|
||||||
|
$('#spouse_min_age').val(18);
|
||||||
|
$('#spouse_max_age').val(60);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.spouse-age').css('display','none');
|
$('.spouse-age').css('display','none');
|
||||||
}
|
}
|
||||||
@ -1253,6 +1256,12 @@
|
|||||||
$('#spouse').change(function () {
|
$('#spouse').change(function () {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
$('.spouse-age').css('display','');
|
$('.spouse-age').css('display','');
|
||||||
|
if($('#spouse_min_age').val() < 0 || $('#spouse_min_age').val() == '' ){
|
||||||
|
$('#spouse_min_age').val(18);
|
||||||
|
}
|
||||||
|
if($('#spouse_max_age').val() < 0 || $('#spouse_max_age').val() == '' ){
|
||||||
|
$('#spouse_max_age').val(60);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$('.spouse-age').css('display','none');
|
$('.spouse-age').css('display','none');
|
||||||
}
|
}
|
||||||
@ -1262,6 +1271,13 @@
|
|||||||
$('#children').change(function () {
|
$('#children').change(function () {
|
||||||
if ($(this).val() != 0) {
|
if ($(this).val() != 0) {
|
||||||
$('.child-age').css('display','');
|
$('.child-age').css('display','');
|
||||||
|
|
||||||
|
if($('#child_min_age').val() < 0 || $('#child_min_age').val() == '' ){
|
||||||
|
$('#child_min_age').val(0);
|
||||||
|
}
|
||||||
|
if($('#child_max_age').val() < 0 || $('#child_max_age').val() == '' ){
|
||||||
|
$('#child_max_age').val(25);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$('.child-age').css('display','none');
|
$('.child-age').css('display','none');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user