wecuro_blog/application/modules/caregivers/views/saveCaregiverBasicTab.php

2314 lines
128 KiB
PHP
Executable File

<form role="form" action="<?php echo base_url(); ?>CaregiversDashboard/ProfileUpdate" id="caregiverBasicForm" method="post" enctype="multipart/form-data" class="needs-validation" onsubmit="return saveShift(),checkShift(),validateEmpBasicForm()">
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<!--data-toggle="validator" novalidate="true"-->
<input type="hidden" name="form_tab_status" value="1">
<input type="hidden" id="basicVerificStatus" value="<?php echo $nurse->verification_status?>">
<input type="hidden" name="id" id="caregiver_id" value="<?php if (!empty($nurse->caregiver_table_id)) echo $nurse->caregiver_table_id; ?>">
<input type="hidden" name="form_status" value="1">
<input type="hidden" name="form_mode" value="<?php if($nurse->form_status>0) echo 'Edit'; else echo 'Add'; ?>">
<div class="form-group col-md-12">
<div class="col-md-12" style="background-color:lavender; padding: 10px;">
<I>
<p style="margin-bottom: 0px;"><b><u> Note</u></b> : - Please enter name exactly as displayed on your federal or state ID. Please be sure to include middle or initial if applicable.</p>
</I>
</div>
</div>
<div class="row">
<div class="form-group col-md-3">
<label for="cg_caregiver_id"><?php echo lang('Caregiver ID'); ?></label>
<input type="text" class="form-control" value='<?php echo $nurse->caregiver_id; ?>' readonly>
</div>
<div class="form-group col-md-3">
<label for="cg_first_name_1" class="required-field"><?php echo lang('First Name'); ?></label>
<input type="text" class="form-control" name="fname" id="cg_first_name_1" value='<?php
if (!empty($setval)) {
echo set_value('fname');
}
if (!empty($nurse->fname)) {
echo $nurse->fname;
}
?>' required data-error="Please enter a valid first name.">
<div class="help-block with-errors"></div>
<div id="cg_first_name_1Error" style="display: none;color: #B94A48;font-size: 12.5px !important;" >Please enter a valid first name.</div>
</div>
<div class="form-group col-md-3">
<label for="cg_middle_name_1" class="<?php if ($nurse->mid_name !="") { echo "required-field"; } ?>" id="cg_middle_name_lbl"><?php echo lang('Middle Name'); ?></label>
<input type="text" class="form-control" name="mid_name" id="cg_middle_name_1" value='<?php
if (!empty($setval)) {
echo set_value('mid_name');
}
if (!empty($nurse->mid_name)) {
echo $nurse->mid_name;
}
?>' data-error="Please enter a valid middle name." <?php if (empty($nurse->mid_name)) { echo $nurse->mid_name; } else { echo "required"; } if ($nurse->mid_name =="") { echo "disabled"; } ?>>
<label>
<input type="checkbox" id="midName" name="midNameOptional" <?php if (empty($nurse->mid_name)) { echo "checked"; } ?>>&nbsp;I don't have a middle name
</label>
<div class="help-block with-errors"></div>
<div id="cg_middle_name_1Error" style="display: none;color: #B94A48;font-size: 12.5px !important;" >Please enter a valid middle name.</div>
</div>
<div class="form-group col-md-3">
<label for="cg_last_name_1" class="required-field"><?php echo lang('Last Name'); ?></label>
<input type="text" class="form-control" name="lname" id="cg_last_name_1" value='<?php
if (!empty($setval)) {
echo set_value('lname');
}
if (!empty($nurse->lname)) {
echo $nurse->lname;
}
?>' required data-error="Please enter a valid last name.">
<div class="help-block with-errors"></div>
<div id="cg_last_name_1Error" style="display: none;color: #B94A48;font-size: 12.5px !important;" >Please enter a valid last name.</div>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Mobile Number'); ?></label>
<input type="text" class="form-control" name="phone" id="phone_no" onkeypress="return isNumberKey(event)" onkeyup="USformatPhoneNumber(this.value,this);" onBlur="USformatPhoneNumber(this.value,this);" value='<?php
if (!empty($setval)) {
echo set_value('phone');
}
if (!empty($nurse->phone)) {
echo $nurse->phone;
}
?>' placeholder="" required data-error="Please enter a valid mobile number.">
<div class="help-block with-errors"></div>
<div id="phone_noError" style="display: none;color: #B94A48;font-size: 12.5px !important;" >Please enter a valid phone number.</div>
</div>
<!-- <div class="form-group col-md-3">
<label class="required-field"><?php echo lang('email'); ?></label>
<input type="text" class="form-control" name="email" value='<?php
if (!empty($setval)) {
echo set_value('email');
}
if (!empty($nurse->email)) {
echo $nurse->email;
}
?>' placeholder="" <?php if (!empty($nurse->caregiver_table_id)){ echo 'Readonly'; } ?> required data-error="Please enter a valid email.">
<div class="help-block with-errors"></div>
</div> -->
<div class="form-group col-md-3">
<label class="required-field">
<?=lang('email')?>
</label>
<div class="input-group">
<input
type="email"
class="form-control"
name="email"
id="refEmailId"
value="<?=!empty($setval)?set_value('email'):(!empty($nurse->email)?$nurse->email:'')?>"
placeholder=""
data-error="Please enter a valid email."
required
>
<div class="input-group-append" id="emailcheckTab" style="display:none;">
<span class="input-group-text">
<span id="emailChecking" style="display:none">
<i class="la la-hourglass-start" style="color:blue;"></i>
</span>
<span id="emailAvailable" style="display:none">
<i class="la la-check" style="color:green;">Available</i>
</span>
<span id="emailNA" style="display:none">
<i class="la la-close" style="color:red;">Not-Available</i>
</span>
</span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="form-group col-md-3">
<label ><?php echo lang('Preferred Contact Method'); ?></label>
<select class="form-control" name="preferred_contact">
<option value="" disabled>Select</option>
<option value="text" <?php
if (!empty($setval)) {
if ('text' == set_value('preferred_contact')) {
echo 'selected';
}
}
if (!empty($nurse->preferred_contact)) {
if ($nurse->preferred_contact == 'text') {
echo 'selected';
}
}
?> ><?php echo lang("Text"); ?></option>
<option value="email" <?php
if (!empty($setval)) {
if ('email' == set_value('preferred_contact')) {
echo 'selected';
}
}
if (!empty($nurse->preferred_contact)) {
if ($nurse->preferred_contact == 'email') {
echo 'selected';
}
}
?> ><?php echo lang("Email"); ?></option>
<option value="voice" <?php
if (!empty($setval)) {
if ('voice' == set_value('preferred_contact')) {
echo 'selected';
}
}
if (!empty($nurse->preferred_contact)) {
if ($nurse->preferred_contact == 'voice') {
echo 'selected';
}
}
?> ><?php echo lang("Voice"); ?></option>
<option value="mobile" <?php
if (!empty($setval)) {
if ('mobile' == set_value('preferred_contact')) {
echo 'selected';
}
}
if (!empty($nurse->preferred_contact)) {
if ($nurse->preferred_contact == 'mobile') {
echo 'selected';
}
}
?> ><?php echo lang("Mobile"); ?></option>
</select>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Gender'); ?></label>
<select class="form-control" name="gender" data-error="Please select a gender." required>
<option value="" selected disabled>Select</option>
<option value="Male" <?php if (!empty($nurse->gender)) { if ($nurse->gender == "Male") { echo 'selected'; } } ?> >Male</option>
<option value="Female" <?php if (!empty($nurse->gender)) { if ($nurse->gender == "Female") { echo 'selected'; } } ?> >Female</option>
<option value="Other" <?php if (!empty($nurse->gender)) { if ($nurse->gender == "Other") { echo 'selected'; } } ?>>Other</option>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Date of Birth'); ?></label>
<input type="date" class="form-control" name="dob" id="dob" value='<?php
if (!empty($setval)) {
echo set_value('dob');
}
if (!empty($nurse->dob)) {
echo $nurse->dob;
}
?>' placeholder="" data-error="Please enter a valid date." required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Country of Birth'); ?></label>
<select class="form-control" name="country_of_birth" data-error="Please enter a valid country of birth." required>
<option value="" selected disabled>Select</option>
<?php foreach ($country as $cnty) { ?>
<option value="<?php echo $cnty->name; ?>" <?php
if (!empty($setval)) {
if ($cnty->name == set_value('country_of_birth')) {
echo 'selected';
}
}
if (!empty($nurse->country_of_birth)) {
if ($nurse->country_of_birth == $cnty->name) {
echo 'selected';
}
}
if (empty($nurse->country_of_birth)||$nurse->country_of_birth=="") {
if ($cnty->name == 'UNITED STATES') {
echo 'selected';
}
}
?> > <?php echo $cnty->name; ?> </option>
<?php } ?>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label ><?php echo lang('Marital Status'); ?></label>
<select class="form-control" name="marital_status">
<option value="" selected disabled>Select</option>
<option value="Single" <?php if (!empty($nurse->marital_status)) { if ($nurse->marital_status == "Single") { echo 'selected'; } } ?> ><?php echo lang('Single'); ?></option>
<option value="Married" <?php if (!empty($nurse->marital_status)) { if ($nurse->marital_status == "Married") { echo 'selected'; } } ?> ><?php echo lang('Married'); ?></option>
<option value="Un-Married" <?php if (!empty($nurse->marital_status)) { if ($nurse->marital_status == "Un-Married") { echo 'selected'; } } ?> ><?php echo lang('Un-Married'); ?></option>
<option value="Un-Married" <?php if (!empty($nurse->marital_status)) { if ($nurse->marital_status == "Separated") { echo 'selected'; } } ?> ><?php echo lang('Separated'); ?></option>
<option value="Un-Married" <?php if (!empty($nurse->marital_status)) { if ($nurse->marital_status == "Widowed") { echo 'selected'; } } ?> ><?php echo lang('Widowed'); ?></option>
<option value="Un-Married" <?php if (!empty($nurse->marital_status)) { if ($nurse->marital_status == "Divorced") { echo 'selected'; } } ?> ><?php echo lang('Divorced'); ?></option>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label ><?php echo lang('Maiden Name'); ?></label>
<input type="text" class="form-control" name="maiden_name" id="" value='<?php
if (!empty($setval)) {
echo set_value('maiden_name');
}
if (!empty($nurse->maiden_name)) {
echo $nurse->maiden_name;
}
?>' placeholder="" data-error="Please enter a valid email.">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Ethnicity'); ?></label>
<select class="form-control" name="ethnicity" data-error="Please Select Ethnicity." required>
<option value="" selected disabled>Select</option>
<?php foreach ($ethnicity_list as $ethnicity) { ?>
<option value="<?php echo $ethnicity->name; ?>" <?php
if (!empty($setval)) {
if ($ethnicity->name == set_value('ethnicity')) {
echo 'selected';
}
}
if (!empty($nurse->ethnicity)) {
if ($nurse->ethnicity == $ethnicity->name) {
echo 'selected';
}
}
?> > <?php echo $ethnicity->name; ?> </option>
<?php } ?>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Social Security Number #'); ?></label>
<!-- <div class="input-group"> -->
<?php
if($nurse->soc_sec!=""){
$actual_ssn=$nurse->soc_sec;
$ssn_arr=explode("-", $actual_ssn);
$view_ssn="XXX-XX-".$ssn_arr[2];
}
?>
<input type="hidden" id="actual_ssn" name="soc_sec" value="<?php echo $nurse->soc_sec;?>">
<input type="text" class="form-control onlyNumber" value="<?php echo $view_ssn; ?>" onkeypress="return isNumberKey(event)" onkeyup="socialSecurity(this.value,this)" onblur="socialSecurity(this.value,this)" placeholder="" required data-error="Please enter a valid social security">
<!-- </div> -->
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Confirm Social Security Number #'); ?></label>
<!-- <div class="input-group"> -->
<input type="hidden" id="confirm_actual_ssn" value="<?php echo $nurse->soc_sec;?>">
<input type="text" class="form-control onlyNumber" id="confirm_actual_ssn_field" value="<?php echo $view_ssn; ?>" onkeypress="return isNumberKey(event)" onkeyup="ConfirmSocialSecurity(this.value,this)" onBlur="checkActualSSNandConfirmSSN()" required data-error="Please enter a valid social security">
<!-- </div> -->
<div class="help-block with-errors"></div>
</div>
<script>
function socialSecurity(phoneNumberString,_this) {
//var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
var cleaned =phoneNumberString;
if(cleaned.length > 11){
cleaned = cleaned.substr(0, 11);
}
var match = cleaned.match(/^(1|)?(\d{3})(\d{2})(\d{4})$/);
if (cleaned.length == 9 && match) {
//var fres = [match[2], '-', match[3], '-', match[4]].join('');
$("#actual_ssn").val([match[2], '-', match[3], '-', match[4]].join(''));
var fres = ['XXX', '-', 'XX', '-', match[4]].join('');
//alert(fres);
_this.value = fres;
}else{
_this.value = cleaned
}
return null
}
function ConfirmSocialSecurity(phoneNumberString,_this) {
//var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
var cleaned =phoneNumberString;
if(cleaned.length > 11){
cleaned = cleaned.substr(0, 11);
}
var match = cleaned.match(/^(1|)?(\d{3})(\d{2})(\d{4})$/);
if (cleaned.length == 9 && match) {
//var fres = [match[2], '-', match[3], '-', match[4]].join('');
var confirm_actual_ssn=[match[2], '-', match[3], '-', match[4]].join('');
$("#confirm_actual_ssn").val(confirm_actual_ssn);
var fres = ['XXX', '-', 'XX', '-', match[4]].join('');
_this.value = fres;
}else{
_this.value = cleaned
}
return null
}
function checkActualSSNandConfirmSSN(){
var actual_ssn=$("#actual_ssn").val();
var confirm_actual_ssn=$("#confirm_actual_ssn").val();
if(actual_ssn!=confirm_actual_ssn){
Swal.fire({
position: 'center',
icon: 'error',
title: 'Confirm Social Security Number Not Matched.',
showConfirmButton: false,
timer: 2500
});
$("#confirm_actual_ssn").val('');
$("#confirm_actual_ssn_field").val('');
}
}
</script>
</div>
<div class="row">
<div class="form-group col-md-6 languages_frm">
<label class="required-field"><?php echo lang('Languages spoken'); ?></label>
<select class="form-control multiselect-class" name="primary_langualge[]" id="primary_langualge" required multiple data-error="Please select a primary language." style="width:100%">
<?php foreach ($language as $lang) { ?>
<option value="<?php echo $lang->name; ?>" <?php
if (!empty($setval)) {
if ($lang->name == set_value('primary_langualge')) {
echo 'selected';
}
}
if (!empty($nurse->primary_langualge)) {
$primary_lang_arr=explode("/",$nurse->primary_langualge);
if (in_array($lang->name, $primary_lang_arr)) {
echo 'selected';
}
}
?> > <?php echo $lang->name; ?> </option>
<?php } ?>
</select>
<div class="help-block with-errors"></div>
</div>
</div>
<hr>
<div class="row">
<div class="form-group col-md-4">
<label class="required-field"><?php echo lang('Referral Source'); ?></label>
<select class="form-control" name="referral_source" required>
<option value="">Select</option>
<?php foreach($referral_source as $val){ ?>
<option value="<?php echo $val->id ?>" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == $val->id) { echo 'selected'; } } ?>><?php echo $val->name;?></option>
<?php } ?>
</select>
<!-- <select class="form-control" name="referral_source" required="">
<option value="" selected disabled>Select</option>
<option value="WalkIn" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == "WalkIn") { echo 'selected'; } } ?> ><?php echo lang("Walk In"); ?></option>
<option value="Friend" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == "Friend") { echo 'selected'; } } ?> ><?php echo lang("Friend"); ?></option>
<option value="Craigslist" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == "Craigslist") { echo 'selected'; } } ?> ><?php echo lang("Craigslist"); ?></option>
<option value="CHHA" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == "CHHA") { echo 'selected'; } } ?> ><?php echo lang("CHHA"); ?></option>
<option value="School" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == "School") { echo 'selected'; } } ?> ><?php echo lang("School"); ?></option>
<option value="JobFair" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == "JobFair") { echo 'selected'; } } ?> ><?php echo lang("Job Fair"); ?></option>
</select> -->
<div class="help-block with-errors"></div>
</div>
<!-- <div class="form-group col-md-4">
<label ><?php echo lang('Employee Type'); ?></label>
<input type="text" class="form-control" value="Caregiver" readonly>
</div> -->
<?php
if($group_name!="caregiver")
{
?>
<div class="form-group col-md-4">
<label for="exampleInputEmail1" class="required-field">
<?php echo lang('Employee Type'); ?>
</label>
<select type="text" class="form-control" name="employee_type" id="employee_type" required data-error="Please select an employee Type.">
<option value="contrator" <?php if($nurse->employee_type=="contrator"){echo "selected";}?>>CONTRACTOR</option>
<option value="inhouse" <?php if($nurse->employee_type=="inhouse"){echo "selected";}?>>IN-HOUSE</option>
</select>
<div class="help-block with-errors"></div>
</div>
<?php
}
?>
<div class="form-group col-md-4">
<label ><?php echo lang('Application Date'); ?></label>
<input type="date" class="form-control" value="<?php echo $nurse->application_date; ?>" readonly>
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label class="inner-heading"><?php echo lang('Permanent Address'); ?></label>
<input type="hidden" id="check_p_address" value="<?php if(isset($nurse->zipcode1)){ echo 'checked'; } ?>" >
<input type="hidden" name="lang1" id="lang1" value="<?php echo $nurse->lang1; ?>">
<input type="hidden" name="long1" id="long1" value="<?php echo $nurse->long1; ?>">
</div>
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('House Number and/or Street Name'); ?></label>
<input type="text" class="form-control" name="address1" id="address1" value='<?php
if (!empty($setval)) {
echo set_value('address1');
}
if (!empty($nurse->address1)) {
echo $nurse->address1;
}
?>' placeholder="" required data-error="Please enter your permanent address.">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3">
<label><?php echo lang('Apt #'); ?></label>
<input type="text" class="form-control" name="apt1" id="apt1" value='<?php
if (!empty($setval)) {
echo set_value('apt1');
}
if (!empty($nurse->apartment1)) {
echo $nurse->apartment1;
}
?>' placeholder="" data-error="Please enter your permanent address.">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('State'); ?></label>
<input type="text" class="form-control" name="state1" id="state1" value="<?php echo $nurse->state1; ?>" readonly required data-error="Please enter zipcode and check address.">
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('County'); ?></label>
<input type="text" class="form-control" name="county1" id="county1" value="<?php echo $nurse->county1; ?>" readonly required data-error="Please enter zipcode and check address.">
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('City'); ?></label>
<input type="text" class="form-control" name="city1" id="city1" value="<?php echo $nurse->city1; ?>" readonly required data-error="Please enter zipcode and check address.">
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Zip Code'); ?></label>
<input type="text" class="form-control" name="zipcode1" id="zipcode1" minlength="5" maxlength="5" onkeypress="return isNumberKey(event)" value='<?php
if (!empty($setval)) {
echo set_value('zipcode1');
}
if (!empty($nurse->zipcode1)) {
echo $nurse->zipcode1;
}
?>' placeholder="" data-error="Please enter your zip code." required>
<section id="zipcode1Error" class="col-md-12 zipcode1Error"></section>
</div>
<div class="form-group col-md-1 mt-2">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader" Style="display:none;">
<button type="button" class="btn btn-info" id="check_parmanent_address_btn" onclick="check_parmanent_address();"><?php echo lang('Check'); ?></button>
</div>
</div>
<hr>
<div class="row">
<div class="form-group col-md-12">
<label class="inner-heading"><?php echo lang('Alternate Mailing Address'); ?></label>
<label for="same_emergency" class="pull-right"><?php echo lang("Same as Permanent Address"); ?>
&nbsp;&nbsp;
<input type="checkbox" id="same_emergency">
<input type="hidden" name="lang2" id="lang2" value="<?php echo $nurse->lang2; ?>">
<input type="hidden" name="long2" id="long2" value="<?php echo $nurse->long2; ?>">
</label>
</div>
<div class="form-group col-md-3">
<label ><?php echo lang('House Number and/or Street Name'); ?></label>
<input type="text" class="form-control" name="address2" id="address2" value='<?php
if (!empty($setval)) {
echo set_value('address2');
}
if (!empty($nurse->address2)) {
echo $nurse->address2;
}
?>' placeholder="">
<section id="address2Error" class="col-md-12 address2Error"></section>
</div>
<div class="form-group col-md-3">
<label ><?php echo lang('Apt #'); ?></label>
<input type="text" class="form-control" name="apt2" id="apt2" value='<?php
if (!empty($setval)) {
echo set_value('apt2');
}
if (!empty($nurse->apartment2)) {
echo $nurse->apartment2;
}
?>' placeholder="">
<section id="address2Error" class="col-md-12 address2Error"></section>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('State'); ?></label>
<input type="text" class="form-control" name="state2" id="state2" value="<?php echo $nurse->state2; ?>" readonly>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('County'); ?></label>
<input type="text" class="form-control" name="county2" id="county2" value="<?php echo $nurse->county2; ?>" readonly>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('City'); ?></label>
<input type="text" class="form-control" name="city2" id="city2" value="<?php echo $nurse->city2; ?>" readonly>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('Zip Code'); ?></label>
<input type="text" class="form-control" name="zipcode2" id="zipcode2" maxlength="5" onkeypress="return isNumberKey(event)" value='<?php
if (!empty($setval)) {
echo set_value('zipcode2');
}
if (!empty($nurse->zipcode2)) {
echo $nurse->zipcode2;
}
?>' placeholder="">
<section id="zipcode2Error" class="col-md-12 zipcode2Error"></section>
</div>
<div class="form-group col-md-1 mt-2">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_alternative_address_loader" Style="display:none;">
<button type="button" class="btn btn-info" id="check_alternative_address_btn" onclick="check_alternative_address();"><?php echo lang('Check'); ?></button>
</div>
</div>
<hr>
<label class="inner-heading"><?php echo lang('U.S. Work Authorization and Identification'); ?></label>
<?php $citizen = json_decode($nurse->citizen); ?>
<?php //pre($citizen); ?>
<div class="row">
<div class="form-group col-md-12">
<label class="required-field"><?php echo lang('Are you a citizen of the United States? '); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input citizen_depending" type="radio" id="citizenyes" name="citizen" open_value="1" change_required_to="us_work_auth" value="1" <?php if (isset($citizen->citizen) && $citizen->citizen==1) { echo "checked"; } ?>>
<label class="form-check-label" for="citizenyes">Yes
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input citizen_depending" type="radio" id="citizenno" name="citizen" open_value="1" change_required_to="us_work_auth" value="0" <?php if (isset($citizen->citizen) && $citizen->citizen==0) { echo "checked"; } ?>>
<label class="form-check-label" for="citizenno">No
</label>
</div>
</div>
</div>
</div>
<div id="us_work_auth" <?php if(!isset($citizen->citizen)){ echo ''; }else if($citizen->citizen==0){ echo ''; }else{ echo 'style="display: none;"'; } ?>>
<div class="form-group col-md-12 ">
<label class="required-field"><?php echo lang('If not, do you have the right to remain permanently and work in the United States? '); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input us_work_auth_depending" type="radio" id="remain_permanentlyyes" name="remain_permanently" open_value="1" change_required_to="work_auth" value="1" <?php if (isset($citizen->remain_permanently) && $citizen->remain_permanently==1) { echo "checked"; } ?>>
<label class="form-check-label" for="remain_permanentlyyes"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input us_work_auth_depending" type="radio" id="remain_permanentlyno" name="remain_permanently" open_value="1" change_required_to="work_auth" value="0" <?php if (isset($citizen->remain_permanently) && $citizen->remain_permanently==0) { echo "checked"; } ?>>
<label class="form-check-label" for="remain_permanentlyno"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$(".us_work_auth_depending").click(function(){
var target_val = $(this).val();
var open_value = $(this).attr("open_value");
var change_required_to = $(this).attr("change_required_to");
if(target_val == open_value) {
$("#"+change_required_to).hide();
}else{
$("#"+change_required_to).show();
}
checkBasicCheckList();
});
});
</script>
<?php //if(!isset($citizen->remain_permanently)){ echo ''; }else if($citizen->remain_permanently==0){ echo ''; }else{echo 'style="display: none;"'; } ?>
<div class="form-group col-md-12" id="work_auth" <?php if(!isset($citizen->remain_permanently)||($citizen->remain_permanently==1)){echo 'style="display: none;"'; } ?>>
<label class="required-field"><?php echo lang('Do you have authorization to work? '); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="authorization_to_work_yes" name="authorization_to_work" value="1" <?php if (isset($citizen->authorization_to_work) && $citizen->authorization_to_work==1) { echo "checked"; } ?>>
<label class="form-check-label" for="authorization_to_work_yes"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="authorization_to_work_no" name="authorization_to_work" value="0" <?php if (isset($citizen->authorization_to_work) && $citizen->authorization_to_work==0) { echo "checked"; } ?>>
<label class="form-check-label" for="authorization_to_work_no"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label class="required-field"><?php echo lang('Are you involved as a defendant in any professional litigation? '); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="professional_litigation_yes" name="involved_as_defendant" open_value="1" change_required_to="involved_as_defendant_explain_sec" required_field="involved_as_defendant_explain" value="1" <?php if (isset($citizen->involved_as_defendant) && $citizen->involved_as_defendant==1) { echo "checked"; } ?> required>
<label class="form-check-label" for="professional_litigation_yes"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="professional_litigation_no" name="involved_as_defendant" open_value="1" change_required_to="involved_as_defendant_explain_sec" required_field="involved_as_defendant_explain" value="0" <?php if (isset($citizen->involved_as_defendant) && $citizen->involved_as_defendant==0) { echo "checked"; } ?> required>
<label class="form-check-label" for="professional_litigation_no"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
<div class="form-group col-md-6" id="involved_as_defendant_explain_sec" <?php if((!isset($citizen->involved_as_defendant)) || ($citizen->involved_as_defendant==0)){ echo 'style="display:none;"'; } ?>>
<label class="required-field"><?php echo lang('Explain'); ?></label>
<textarea class="form-control" name="involved_as_defendant_explain" id="involved_as_defendant_explain" <?php if ($citizen->involved_as_defendant ==1 ) {?> Required <?php } ?>><?php
if (!empty($setval)) {
echo set_value('involved_as_defendant_explain');
}
if (!empty($citizen->involved_as_defendant_explain)) {
echo $citizen->involved_as_defendant_explain;
}
?></textarea>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label class="required-field"><?php echo lang('Have you ever been convicted of a crime? If yes please explain '); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="convicted_crime_yes" name="convicted" value="1" open_value="1" change_required_to="convicted_crime_sec" required_field="convicted_crime_explain" <?php if (isset($citizen->convicted) && $citizen->convicted==1) {
echo "checked"; } ?> required>
<label class="form-check-label" for="convicted_crime_yes"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="convicted_crime_no" name="convicted" value="0" open_value="1" change_required_to="convicted_crime_sec" required_field="convicted_crime_explain" <?php if ( isset($citizen->convicted) && $citizen->convicted==0) {
echo "checked"; } ?> required>
<label class="form-check-label" for="convicted_crime_no"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
<div class="form-group col-md-6" id="convicted_crime_sec" <?php if((!isset($citizen->convicted)) || ($citizen->convicted==0)){ echo 'style="display:none;"'; } ?>>
<label class="required-field" ><?php echo lang('Explain'); ?></label>
<textarea class="form-control" name="convicted_crime_explain" id="convicted_crime_explain" <?php if ($citizen->convicted ==1 ) {?> Required <?php } ?>><?php
if (!empty($setval)) {
echo set_value('convicted_crime_explain');
}
if (!empty($citizen->convicted_crime_explain)) {
echo $citizen->convicted_crime_explain;
}
?></textarea>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label class="required-field"><?php echo lang('Have you ever been convicted for negligence?'); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="convicted_for_negligenceYes" name="convicted_for_negligence" value="1" open_value="1" change_required_to="negligence_sec" required_field="negligence_explain" <?php if (isset($citizen->convicted_for_negligence) && $citizen->convicted_for_negligence==1) {
echo "checked"; } ?> required>
<label class="form-check-label" for="convicted_for_negligenceYes"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input activate_depending" type="radio" id="convicted_for_negligenceNo" name="convicted_for_negligence" value="0" open_value="1" change_required_to="negligence_sec" required_field="negligence_explain" <?php if (isset($citizen->convicted_for_negligence) && $citizen->convicted_for_negligence==0) {
echo "checked"; } ?> required>
<label class="form-check-label" for="convicted_for_negligenceNo"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
<div class="form-group col-md-6" id="negligence_sec" <?php if((!isset($citizen->convicted_for_negligence)) || ($citizen->convicted_for_negligence==0)){ echo 'style="display:none;"'; } ?>>
<label class="required-field"><?php echo lang('Explain'); ?></label>
<textarea class="form-control" name="negligence_explain" id="negligence_explain" <?php if ($citizen->convicted_for_negligence ==1 ) {?> Required <?php } ?>><?php
if (!empty($setval)) {
echo set_value('negligence_explain');
}
if (!empty($citizen->negligence_explain)) {
echo $citizen->negligence_explain;
}
?></textarea>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label class="required-field"><?php echo lang('Do you have any criminal convictions? '); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80">
<input class="form-check-input criminal_convictions" type="radio" id="criminal_convictionsYes" name="criminal_convictions" value="1" <?php if (isset($citizen->criminal_convictions) && $citizen->criminal_convictions==1) {
echo "checked"; } ?> required>
<label class="form-check-label" for="criminal_convictionsYes"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80">
<input class="form-check-input criminal_convictions" type="radio" id="criminal_convictionsNo" name="criminal_convictions" value="0" <?php if (isset($citizen->criminal_convictions) && $citizen->criminal_convictions==0) {
echo "checked"; } ?> required>
<label class="form-check-label" for="criminal_convictionsNo"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
<div class="form-group col-md-6" id="criminal_convictions_details" <?php if ($citizen->criminal_convictions ==0 ) {?> style="display:none" <?php } ?>>
<label class="required-field"><?php echo lang('Explain'); ?></label>
<!-- <input type="text" class="form-control" name="criminal_convictions_details" id="criminalConvictionsDetailsField" value="<?php
if (!empty($citizen->criminal_convictions_details)) {
echo $citizen->criminal_convictions_details;
}
?>"> -->
<textarea class="form-control" name="criminal_convictions_details" id="criminalConvictionsDetailsField" <?php if ($citizen->criminal_convictions ==1 ) {?> Required <?php } ?>><?php
if (!empty($citizen->criminal_convictions_details)) {
echo trim($citizen->criminal_convictions_details);
}
?></textarea>
<div class="help-block with-errors"></div>
</div>
</div>
<?php
/*
<div class="row">
<div class="form-group col-md-4 citizen-documents-type">
<label class="required-field"><?php echo lang('Document Type'); ?></label>
<select class="form-control" name="documents_type" id="documents_type" onchange="getDocumentsType(this.value);" required>
<option value="">Select</option>
<?php
if(isset($citizen->citizen) && $citizen->citizen==0)
{
// Foreign Passport with I-94 Stamp
// Permanent Resident Card
// Employment Authorization Card
// Valid Work Visa
?>
<option value="Foreign Passport with I-94 Stamp" <?php if($nurse->documents_type=="Foreign Passport with I-94 Stamp"){ echo 'Selected'; }?>>
<?php echo lang("Foreign Passport with I-94 Stamp");?>
</option>
<option value="Permanent Resident Card" <?php if($nurse->documents_type=="Permanent Resident Card"){ echo 'Selected'; }?>>
<?php echo lang("Permanent Resident Card"); ?>
</option>
<option value="Employment Authorization Card" <?php if($nurse->documents_type=="Employment Authorization Card"){ echo 'Selected'; }?>>
<?php echo lang("Employment Authorization Card");?>
</option>
<!-- <option value="Work Permit" <?php if($nurse->documents_type=="Work Permit"){ echo 'Selected'; }?>>
<?php echo lang("Work Permit");?>
</option> -->
<option value="Valid Work Visa" <?php if($nurse->documents_type=="Valid Work Visa"){ echo 'Selected'; }?>>
<?php echo lang("Valid Work Visa");?>
</option>
<?php
}
else
{
// Birth Certificate
// State ID
// Citizenship Certificate
// US Passport
?>
<option value="Birth Certificate" <?php if($nurse->documents_type=="Birth Certificate"){ echo 'Selected'; }?>>
<?php echo lang("Birth Certificate");?>
</option>
<!-- <option value="Foreign Passport with I-94 Stamp" <?php if($nurse->documents_type=="Foreign Passport with I-94 Stamp"){echo 'Selected'; }?>>
<?php echo lang("Foreign Passport with I-94 Stamp");?>
</option> -->
<option value="State ID" <?php if($nurse->documents_type=="State ID"){ echo 'Selected'; }?>>
<?php echo lang("State ID");?>
</option>
<option value="Citizenship Certificate" <?php if($nurse->documents_type=="Citizenship Certificate"){ echo 'Selected'; }?>>
<?php echo lang("Citizenship Certificate");?>
</option>
<option value="US Passport" <?php if($nurse->documents_type=="US Passport"){ echo 'Selected'; }?>>
<?php echo lang("US Passport");?>
</option>
<?php
}
?>
</Select>
<div class="help-block with-errors"></div>
</div>
<script>
function getDocumentsType(doc_type){
if(doc_type=="Birth Certificate" || doc_type=="Citizenship Certificate"){
$("#documents_expire_date").val('');
$("#documents_expire_date").removeAttr('required');
$(".docExpLvl").removeClass("required-field");
$(".documents_expire_date_container").hide();
}else{
$("#documents_expire_date").val('');
$("#documents_expire_date").attr("required","required");
$(".docExpLvl").addClass("required-field");
$(".documents_expire_date_container").show();
}
}
</script>
<div class="form-group col-md-4 citizen-documents-type">
<label class="required-field" ><?php echo lang('Document Number'); ?></label>
<input type="text" class="form-control" name="documents_no" id="uscis" value='<?php
if (!empty($setval)) {
echo set_value('documents_no');
}
if (!empty($nurse->documents_no)) {
echo $nurse->documents_no;
}
?>' required data-error="Please enter a valid uscis.">
<div class="help-block with-errors"></div>
</div>
<?php
$exp_display="";
$exp_required="";
if($nurse->documents_type=="Birth Certificate"){
$exp_display='style="display: none;"';
$exp_required="";
}else{
$exp_display="";
$exp_required="required";
}
?>
<div class="form-group col-md-4 citizen-documents-type documents_expire_date_container" <?php echo $exp_display ?>>
<label class="<?php if($exp_required=="required"){ ?> required-field <?php } ?> docExpLvl"><?php echo lang('Document Expiration Date'); ?></label>
<input type="date" class="form-control not-past-time" name="documents_expire_date" id="documents_expire_date" value='<?php
if (!empty($setval)) {
echo set_value('documents_expire_date');
}
if (!empty($nurse->documents_expire_date)) {
$date=date_create("$nurse->documents_expire_date");
echo date_format($date,"Y-m-d");
}
?>' <?php echo $exp_required ?>>
</div>
<!-- state list -->
<div class="form-group col-md-4 citizen-documents-type citizen-yes-state-list">
<input type="hidden" id="doc_state_val" value="<?php echo $nurse->doc_state;?>">
<label class="required-field"><?php echo lang('State'); ?></label>
<select class="form-control" name="doc_state" id="state_list" onchange="getDocumentsType(this.value);" required="">
<option value="">Select</option>
<?php
foreach($state_list as $sl){
?>
<option value="<?php echo $sl->name;?>" <?php if($sl->name==$nurse->doc_state){ echo 'Selected';}?>>
<?php echo $sl->name;?>
</option>
<?php
}
?>
</Select>
<div class="help-block with-errors"></div>
</div>
<!-- state list -->
</div>
*/
?>
<!--<div class="row">
<div class="form-group col-md-6">
<label class="required-field"><?php echo lang('Languages spoken'); ?></label>
<select class="form-control multiselect-class" name="primary_langualge[]" id="primary_langualge" required multiple data-error="Please select a primary language." style="width:100%">
<?php foreach ($language as $lang) { ?>
<option value="<?php echo $lang->name; ?>" <?php
if (!empty($setval)) {
if ($lang->name == set_value('primary_langualge')) {
echo 'selected';
}
}
if (!empty($nurse->primary_langualge)) {
$primary_lang_arr=explode("/",$nurse->primary_langualge);
if (in_array($lang->name, $primary_lang_arr)) {
echo 'selected';
}
}
?> > <?php echo $lang->name; ?> </option>
<?php } ?>
</select>
<div class="help-block with-errors"></div>
</div>
</div> -->
<script type="text/javascript">
$(function(){
$(".activate_depending_require").click(function(){
var target_val = $(this).val();
var open_value = $(this).attr("open_value");
var change_required_to = $(this).attr("change_required_to");
if(target_val == open_value){
$("."+change_required_to).attr("required","required");
$("."+change_required_to).parent().find('label').addClass("required-field");
$('.licence_details').show();
}else{
$("."+change_required_to).removeAttr("required");
$("."+change_required_to).parent().find('label').removeClass("required-field");
$('.licence_details').hide();
}
});
});
</script>
<hr>
<div class="row">
<div class="form-group col-md-12">
<label class="inner-heading"><?php echo lang("Employment Preference"); ?></label>
</div>
<div class="form-group col-md-4">
<div class="row">
<div class="form-group col-md-12">
<label class="required-field"><?php echo lang('Schedule Preference'); ?></label>
<select class="form-control" name="position_applied" id="position_applied" style="width:100%" required>
<option value="" selected="">Select</option>
<option value="Full Time" <?php if($nurse->position_applied=="Full Time") { ?> selected <?php } ?>><?php echo lang("Full Time"); ?></option>
<option value="Part Time" <?php if($nurse->position_applied=="Part Time") { ?> selected <?php } ?>><?php echo lang("Part Time"); ?></option>
<option value="Per Diem"<?php if($nurse->position_applied=="Per Diem") { ?> selected <?php } ?>><?php echo lang("Per Diem"); ?></option>
</select>
</div>
<?php $nearest_city=getNearCityByIp(); ?>
<div class="form-group col-md-12 languages_frm">
<label class="required-field"><?php echo lang('Cities'); ?></label>
<?php
$city_arr=explode("/",$nurse->availability_borough);
?>
<!-- <select class="form-control multiselect-class" name="availability_borough[]" id="boros" required multiple data-error="Please select a primary language." style="width:100%">
<?php foreach ($city_list as $city) { ?>
<option value="<?php echo $city->id; ?>" <?php if(in_array($city->id, $city_arr)){ echo 'Selected'; } ?> ><?php echo $city->name; ?></option>
<?php } ?>
</select> -->
<select class="form-control multiselect-class" name="availability_borough[]" id="boros" required multiple data-error="Please select a primary language." style="width:100%">
<?php
foreach($nearest_city as $key=>$city){
if(in_array($city['city'],$city_arr)){
$city_seleted="selected";
$city_key=array_search($city['city'],$city_arr);
unset($city_arr[$city_key]);
}else{
$city_seleted="";
}
?>
<option value="<?php echo $city['city']; ?>" <?=$city_seleted?>><?php echo $city['city']; ?></option>
<?php
}
?>
<?php
if(count($city_arr)>0){
foreach($city_arr as $ct){
if($ct!=""){
?>
<option value="<?=$ct?>" selected><?=$ct?></option>
<?php
}
}
}
?>
</select>
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<div class="form-group col-md-6">
<label class="required-field"><?php echo lang('Schedule Preference');?></label>
<table class="table table-bordered">
<tbody>
<tr>
<td rowspan="2"><?php echo lang("Days");?></td>
<td colspan="2"><?php echo lang("Preferrence");?></td>
<td><?php echo lang("Details"); ?></td>
</tr>
<tr>
<td><?php echo lang("Shift");?></td>
<td><?php echo lang("Hourly");?></td>
<td></td>
</tr>
<tr>
<td><?php echo lang("Everyday"); ?></td>
<td>
<input type="radio" class="shiftPreferance evday" name="evd_pref" attr_type="shift" attr_day="1" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '1') { echo "checked"; break; } }?>>
</td>
<td>
<input type="radio" class="shiftPreferance evday" name="evd_pref" attr_type="hourly" attr_day="1" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '1') { echo "checked"; break; } } ?>>
</td>
<td>
<select class="form-control" name="1_preferred_shifts" id="1_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '1') { echo "block"; break; } } ?>;">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '1' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '1')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="1_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '1') { echo "block"; break; } } ?>;">
<input type="time" name="1_startTime" id="1_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="1_endTime" id="1_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Monday"); ?></td>
<td>
<input type="radio" class="shiftPreferance weekDay" name="monday_pref"
<?php
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '3')
{
echo "checked";
break;
}
}
?>
attr_type="shift" attr_day="3">
</td>
<td>
<input type="radio" class="shiftPreferance weekDay" name="monday_pref"
<?php
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '3')
{
echo "checked"; break;
}
}
?> attr_type="hourly" attr_day="3"></td>
<td>
<select class="form-control" name="3_preferred_shifts" id="3_preferred_shifts" style="display:
<?php
echo "none";
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '3')
{
echo "block"; break;
}
}
?>;">
<option value="" disable selected>Select</option>
<?php
foreach ($time_slot as $slot)
{
?>
<option value="<?php echo $slot->id;?>"
<?php
if (!empty($setval))
{
if ($slot->id == set_value('preferred_shifts'))
{
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '3' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> >
<?php echo $slot->name;?>
</option>
<?php
}
?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '3')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="3_preferred_hours" style="display:
<?php echo "none";
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '3')
{
echo "block"; break;
}
}
?>;">
<input type="time" name="3_startTime" id="3_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="3_endTime" id="3_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Tuesday"); ?></td>
<td><input type="radio" class="shiftPreferance weekDay" name="tuesday_pref" attr_type="shift" attr_day="4" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '4') { echo "checked"; break; } } ?>></td>
<td><input type="radio" class="shiftPreferance weekDay" name="tuesday_pref" attr_type="hourly" attr_day="4" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '4') { echo "checked"; break; } } ?>></td>
<td>
<select class="form-control" name="4_preferred_shifts" id="4_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '4') { echo "block"; break; } } ?>;">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '4' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '4')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="4_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '4') { echo "block"; break; } } ?>;">
<input type="time" name="4_startTime" id="4_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="4_endTime" id="4_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Wednesday"); ?></td>
<td><input type="radio" class="shiftPreferance weekDay" name="wed_pref" attr_type="shift" attr_day="5" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '5') { echo "checked"; break; } } ?>></td>
<td><input type="radio" class="shiftPreferance weekDay" name="wed_pref" attr_type="hourly" attr_day="5" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '5') { echo "checked"; break; } } ?>></td>
<td>
<select class="form-control" name="5_preferred_shifts" id="5_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '5') { echo "block"; break; } } ?>;">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '5' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '5')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="5_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '5') { echo "block"; break; } } ?>;">
<input type="time" name="5_startTime" id="5_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="5_endTime" id="5_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Thrusday"); ?></td>
<td><input type="radio" class="shiftPreferance weekDay" name="thrusday_pref" attr_type="shift" attr_day="6" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '6') { echo "checked"; break; } } ?>></td>
<td><input type="radio" class="shiftPreferance weekDay" name="thrusday_pref" attr_type="hourly" attr_day="6" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '6') { echo "checked"; break; } } ?>></td>
<td>
<select class="form-control" name="6_preferred_shifts" id="6_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '6') { echo "block"; break; } } ?>;">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '6' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '6')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="6_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '6') { echo "block"; break; } } ?>;">
<input type="time" name="6_startTime" id="6_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="6_endTime" id="6_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Friday"); ?></td>
<td><input type="radio" class="shiftPreferance weekDay" name="friday_pref" attr_type="shift" attr_day="7" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '7') { echo "checked"; break; } } ?>></td>
<td><input type="radio" class="shiftPreferance weekDay" name="friday_pref" attr_type="hourly" attr_day="7" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '7') { echo "checked"; break; } } ?>></td>
<td>
<select class="form-control" name="7_preferred_shifts" id="7_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '7') { echo "block"; break; } } ?>;">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '7' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '7')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="7_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '7') { echo "block"; break; } } ?>;">
<input type="time" name="7_startTime" id="7_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="7_endTime" id="7_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Saturday"); ?></td>
<td><input type="radio" class="shiftPreferance weekDay" name="saturday_pref" attr_type="shift" attr_day="8" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '8') { echo "checked"; break; } } ?>></td>
<td><input type="radio" class="shiftPreferance weekDay" name="saturday_pref" attr_type="hourly" attr_day="8" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '8') { echo "checked"; break; } } ?>></td>
<td>
<select class="form-control" name="8_preferred_shifts" id="8_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '8') { echo "block"; break; } } ?>;">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '8' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '8')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="8_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '8') { echo "block"; break; } } ?>;">
<input type="time" name="8_startTime" id="8_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="8_endTime" id="8_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
<tr>
<td><?php echo lang("Sunday"); ?></td>
<td><input type="radio" class="shiftPreferance weekDay" name="sunday_pref" attr_type="shift" attr_day="2" <?php foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '2') { echo "checked"; break; } } ?>></td>
<td><input type="radio" class="shiftPreferance weekDay" name="sunday_pref" attr_type="hourly" attr_day="2" <?php foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '2') { echo "checked"; break; } } ?>></td>
<td>
<select class="form-control" name="2_preferred_shifts" id="2_preferred_shifts" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if($datas->pref_type == 'shift' && $datas->day == '2') { echo "block"; break; } } ?>;" >
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
foreach ($getPrefShift as $datas)
{
if($datas->pref_type == 'shift' && $datas->day == '2' && $datas->session == $slot->id)
{
echo "selected";
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<?php
$fromTime = '00:00';
$toTime = '00:00';
foreach ($getPrefShift as $datas)
{
if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '2')
{
$htime = explode(',', $datas->time);
$fromTime = $htime[0];
$toTime = $htime[1];
}
}
?>
<div class="input-group" id="2_preferred_hours" style="display: <?php echo "none"; foreach ($getPrefShift as $datas) { if(($datas->pref_type == 'hourly' || $datas->pref_type == 'Hourly') && $datas->day == '2') { echo "block"; break; } } ?>;">
<input type="time" name="2_startTime" id="2_startTime" value="<?=$fromTime?>" class="form-control">
<span class="input-group-addon">-To-</span>
<input type="time" name="2_endTime" id="2_endTime" value="<?=$toTime?>" class="form-control">
</div>
</td>
</tr>
</tbody>
</table>
<script>
$(function(){
$(".evday").click(function(){
$(".evday").each(function(i) {
if(this.checked == true)
{
$(".weekDay").each(function(i) {
$(this).prop('checked', false);
});
$("#3_preferred_hours,#3_preferred_shifts,#4_preferred_hours,#4_preferred_shifts,#5_preferred_hours,#5_preferred_shifts,#6_preferred_hours,#6_preferred_shifts,#7_preferred_hours,#7_preferred_shifts,#8_preferred_hours,#8_preferred_shifts,#2_preferred_hours,#2_preferred_shifts").hide();
// $(".weekDay").prop( "disabled", true );
}
});
});
$(".weekDay").click(function(){
$(".weekDay").each(function(i) {
if(this.checked == true)
{
$(".evday").each(function(i) {
$(this).prop('checked', false);
});
$("#1_preferred_hours,#1_preferred_shifts").hide();
// $(".weekDay").prop( "disabled", true );
}
});
})
})
</script>
</div>
<input type="hidden" name="preferancesData" id="preferancesData">
<!-- <div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Availability'); ?>
</label>
<select class="form-control multiselect-class" name="availability[]" id="availability" required multiple data-error="Please select a primary language." style="width:100%">
<option class="day" value="1" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(1, $availability)) {
echo 'selected';
}
}
?> >Sunday</option>
<option class="day" value="2" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(2, $availability)) {
echo 'selected';
}
}
?> >Monday</option>
<option class="day" value="3" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(3, $availability)) {
echo 'selected';
}
}
?> >Tuesday</option>
<option class="day" value="4" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(4, $availability)) {
echo 'selected';
}
}
?> >Wednesday</option>
<option class="day" value="5" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(5, $availability)) {
echo 'selected';
}
}
?> >Thursday</option>
<option class="day" value="6" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(6, $availability)) {
echo 'selected';
}
}
?> >Friday</option>
<option class="day" value="7" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(7, $availability)) {
echo 'selected';
}
}
?> >Saturday</option>
<option class="day" value="8" <?php
if (!empty($nurse->availability)) {
$availability=explode("/",$nurse->availability);
if (in_array(8, $availability)) {
echo 'selected';
}
}
?> >Everyday</option>
</select>
<script>
$('#availability').on('change',function() {
var selectedDay=$(this).val();
if(jQuery.inArray("8", selectedDay)!=-1){
$.each($("#availability").children('option'),function(i,obj){
console.log($(obj).val());
// $(obj).removeAttr("selected");
if($(obj).val()!=8){
$(obj).prop("selected",false);
}
})
}
});
$('#availability').select2();
</script>
<div class="help-block with-errors"></div>
</div> -->
<!-- <div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Preferred Shifts'); ?></label>
<select class="form-control" name="preferred_shifts" required data-error="Please fill up the field.">
<option value="" disable selected>Select</option>
<?php foreach ($time_slot as $slot) { ?>
<option value="<?php echo $slot->id; ?>" <?php
if (!empty($setval)) {
if ($slot->id == set_value('preferred_shifts')) {
echo 'selected';
}
}
if (!empty($nurse->preferred_shifts)) {
if ($nurse->preferred_shifts == $slot->id) {
echo 'selected';
}
}
?> > <?php echo $slot->name; ?> </option>
<?php } ?>
</select>
<div class="help-block with-errors"></div>
</div> -->
</div>
<?php
/*
<div class="row">
<div class="form-group col-md-3">
<label class="required-field"><?php echo lang('Valid Drivers License'); ?></label>
<div class="col-md-6">
<div class="row">
<div class="form-check width-80 ">
<input class="form-check-input activate_depending_require" type="radio" id="ny_drive_infoYES" name="ny_drive_info" open_value="1" change_required_to="fiel_depending_require" value="1" <?php if ($nurse->ny_drive_info==1) {
echo "checked"; } ?>>
<label class="form-check-label" for="ny_drive_infoYES"><?php echo lang("Yes"); ?>
</label>
</div>
<div class="form-check width-80 ">
<input class="form-check-input activate_depending_require" type="radio" id="ny_drive_infoNO" name="ny_drive_info" open_value="1" change_required_to="fiel_depending_require" value="0" <?php if ($nurse->ny_drive_info==0) {
echo "checked"; } ?>>
<label class="form-check-label" for="ny_drive_infoNO"><?php echo lang("No"); ?>
</label>
</div>
</div>
</div>
</div>
<div class="form-group col-md-3 licence_details" <?php if ($nurse->ny_drive_info ==0 ) {?> style="display:none" <?php } ?>>
<label><?php echo lang('License No'); ?></label>
<input type="text" class="form-control fiel_depending_require" name="lic_no" id="driving_lic_no" value='<?php
if (!empty($setval)) {
echo set_value('lic_no');
}
if (!empty($nurse->lic_no)) {
echo $nurse->lic_no;
}
?>' data-error="Please enter a valid last name.">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-3 licence_details" <?php if ($nurse->ny_drive_info ==0 ) {?> style="display:none" <?php } ?>>
<label ><?php echo lang('License State'); ?></label>
<select class="form-control fiel_depending_require" name="lic_state" data-error="Please fill up the field.">
<option value="" disable selected>Select</option>
<?php foreach ($state_list as $state) { ?>
<option value="<?php echo $state->id; ?>" <?php
if (!empty($setval)) {
if ($state->id == set_value('lic_state')) {
echo 'selected';
}
}
if (!empty($nurse->lic_state)) {
if ($nurse->lic_state == $state->id) {
echo 'selected';
}
}
?> > <?php echo $state->name; ?> </option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3 licence_details" <?php if ($nurse->ny_drive_info ==0 ) {?> style="display:none" <?php } ?>>
<label ><?php echo lang('License Expiration Date'); ?></label>
<input type="date" class="form-control fiel_depending_require" name="lic_exp_date" value='<?php
if (!empty($setval)) {
echo set_value('lic_exp_date');
}
if (!empty($nurse->lic_exp_date)) {
echo $nurse->lic_exp_date;
}
?>' placeholder="">
<div class="help-block with-errors"></div>
</div>
</div>
*/
?>
<?php
/*
<div class="row">
<div class="form-group col-md-12">
<label class=""><?php echo lang("Traveling Information"); ?></label>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Will You Drive to Work?'); ?></label>
</div>
<div class="form-group col-md-4">
<select class="form-control" name="drive_info" id="drive_info" onchange="ShowHideAutomobileInfo();">
<option value="" Select Disabled>Select</option>
<option value="No" <?php if ($nurse->drive_info=="No"){ echo "Selected"; } ?>><?php echo lang("No"); ?></option>
<option value="Yes" <?php if ($nurse->drive_info=="Yes"){ echo "Selected"; } ?> ><?php echo lang("Yes"); ?></option>
</select>
</div>
</div>
<div class="row" id="automobile_insurance_info" <?php if($nurse->drive_info!="Yes"){ echo "Style='Display:none;'"; } ?>>
<div class="form-group col-md-4">
<label class=""><?php echo lang('Automobile Policy Holder Name'); ?></label>
<input type="text" class="form-control" name="Automobile_Policy_Holder_Name" value='<?php
if (!empty($nurse->Automobile_Policy_Holder_Name)) {
echo $nurse->Automobile_Policy_Holder_Name;
}
?>'>
</div>
<div class="form-group col-md-4">
<label class=""><?php echo lang('Automobile Policy Number'); ?></label>
<input type="text" class="form-control" name="Automobile_Policy_Number" value='<?php
if (!empty($nurse->Automobile_Policy_Number)) {
echo $nurse->Automobile_Policy_Number;
}
?>'>
</div>
<div class="form-group col-md-4">
<label class=""><?php echo lang('Automobile Policy Expiration Date'); ?></label>
<input type="date" class="form-control" name="Automobile_Policy_Expiration_Date" value='<?php
if (!empty($nurse->Automobile_Policy_Expiration_Date)) {
echo $nurse->Automobile_Policy_Expiration_Date;
}
?>'>
</div>
</div>
*/
?>
<hr>
<div class="row">
<div class="form-group col-md-12">
<label class="inner-heading"><?php echo lang('Emergency Contact'); ?></label>
</div>
<div class="form-group col-md-4">
<label class="required-field"><?php echo lang('Emergency Contact Name'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Name" value='<?php
if (!empty($nurse->Emergency_Contact_Name)) {
echo $nurse->Emergency_Contact_Name;
}
?>' required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-4">
<label class="required-field"><?php echo lang('Relationship'); ?></label>
<select class="form-control" name="Emergency_Contact_Relationship" required>
<option value="">Select</option>
<?php foreach($relation as $val){ ?>
<option value="<?php echo $val->id ?>" <?php if (!empty($nurse->Emergency_Contact_Relationship)) { if ($nurse->Emergency_Contact_Relationship == $val->id) { echo 'selected'; } } ?>><?php echo $val->name;?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-4">
<label class="required-field"><?php echo lang('Telephone'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Telephone" id="emergency_Contact_Telephone1" onkeypress="return isNumberKey(event)" onkeyup="USformatPhoneNumber(this.value,this)" onblur="USformatPhoneNumber(this.value,this)" value='<?php
if (!empty($nurse->Emergency_Contact_Telephone)) {
echo $nurse->Emergency_Contact_Telephone;
}
?>' required>
<div class="help-block with-errors"></div>
<div id="emergency_Contact_Telephone1Error" style="display: none;color: #B94A48;font-size: 12.5px !important;" >Please enter a valid telephone number.</div>
</div>
<div class="form-group col-md-4">
<label><?php echo lang('Cellphone'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Cellphone" onkeypress="return isNumberKey(event)" onkeyup="USformatPhoneNumber(this.value,this)" onblur="USformatPhoneNumber(this.value,this)" value='<?php
if (!empty($nurse->Emergency_Contact_Cellphone)) {
echo $nurse->Emergency_Contact_Cellphone;
}
?>'>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Other'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Other" id="Emergency_Contact_Other" value='<?php
if (!empty($nurse->Emergency_Contact_Other)) {
echo $nurse->Emergency_Contact_Other;
}
?>'>
</div>
<div class="form-group col-md-4">
<label><?php echo lang('Email'); ?></label>
<input type="email" class="form-control" name="Emergency_Contact_Email" id="Emergency_Contact_Email" value='<?php
if (!empty($nurse->Emergency_Contact_Email)) {
echo $nurse->Emergency_Contact_Email;
}
?>' >
</div>
<div class="form-group col-md-12">
<label for="same_emergency1"><?php echo lang("Same as Permanent Address"); ?>
&nbsp;&nbsp;
<input type="checkbox" id="same_emergency1">
</label>
</div>
<div class="form-group col-md-3" >
<?php
$Emergency_Contact=json_decode($nurse->Emergency_Contact_Address);
// var_dump($Emergency_Contact);
// echo "<pre>";
// print_r($nurse->Emergency_Contact_Address);
?>
<input type="hidden" name="Emergency_Contact_Lang" id="Emergency_Contact_Lang" value="<?php echo $Emergency_Contact->Emergency_Contact_Lang; ?>">
<input type="hidden" name="Emergency_Contact_Long" id="Emergency_Contact_Long" value="<?php echo $Emergency_Contact->Emergency_Contact_Long; ?>">
<label class="required-field"><?php echo lang('Street Address'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Address" id="Emergency_Contact_Address" value='<?php
if (!empty($Emergency_Contact->Emergency_Contact_Address)) {
echo $Emergency_Contact->Emergency_Contact_Address;
}
?>' required>
<section id="address3Error" class="col-md-12 address3Error"></section>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('County'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_County" id="Emergency_Contact_County" value='<?php
if (!empty($Emergency_Contact->Emergency_Contact_County)) {
echo $Emergency_Contact->Emergency_Contact_County;
}
?>' readonly>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('State'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_State" id="Emergency_Contact_State" value='<?php
if (!empty($Emergency_Contact->Emergency_Contact_State)) {
echo $Emergency_Contact->Emergency_Contact_State;
}
?>'readonly>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('City'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_City" id="Emergency_Contact_City" value='<?php
if (!empty($Emergency_Contact->Emergency_Contact_City)) {
echo $Emergency_Contact->Emergency_Contact_City;
}
?>'readonly>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Zip Code'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_zipcode" maxlength="5" onkeypress="return isNumberKey(event)" id="Emergency_Contact_zipcode" value='<?php
if (!empty($setval)) {
echo set_value('Emergency_Contact_zipcode');
}
if (!empty($Emergency_Contact->Emergency_Contact_zipcode)) {
echo $Emergency_Contact->Emergency_Contact_zipcode;
}
?>' placeholder="" data-error="Please enter your zip code." required>
<section id="zipcode3Error" class="col-md-12 zipcode3Error" ></section>
</div>
<div class="form-group col-md-1 mt-2">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_emg_address_loader" Style="display:none;">
<button type="button" class="btn btn-info" id="check_emg_address_btn" onclick="check_emergency_address_loader();"><?php echo lang('Check'); ?></button>
</div>
</div>
<hr>
<div class="row">
<div class="form-group col-md-12">
<label class="inner-heading"><?php echo lang('2ND Emergency Contact'); ?></label>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Emergency Contact Name'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Name1" value='<?php
if (!empty($nurse->Emergency_Contact_Name1)) {
echo $nurse->Emergency_Contact_Name1;
}
?>' data-error="Please fill up the field.">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Relationship'); ?></label>
<select class="form-control" name="Emergency_Contact_Relationship1">
<option value="">Select</option>
<?php foreach($relation as $val){ ?>
<option value="<?php echo $val->id ?>" <?php if (!empty($nurse->Emergency_Contact_Relationship1)) { if ($nurse->Emergency_Contact_Relationship1 == $val->id) { echo 'selected'; } } ?>><?php echo $val->name;?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Telephone'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Telephone1" onkeypress="return isNumberKey(event)" onkeyup="USformatPhoneNumber(this.value,this)" onblur="USformatPhoneNumber(this.value,this)" value='<?php
if (!empty($nurse->Emergency_Contact_Telephone1)) {
echo $nurse->Emergency_Contact_Telephone1;
}
?>' data-error="Please fill up the field.">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Cellphone'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Cellphone1" onkeypress="return isNumberKey(event)" onkeyup="USformatPhoneNumber(this.value,this)" onblur="USformatPhoneNumber(this.value,this)" value='<?php
if (!empty($nurse->Emergency_Contact_Cellphone1)) {
echo $nurse->Emergency_Contact_Cellphone1;
}
?>'>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Other'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Other1" id="Emergency_Contact_Other" value='<?php
if (!empty($nurse->Emergency_Contact_Other1)) {
echo $nurse->Emergency_Contact_Other1;
}
?>'>
</div>
<div class="form-group col-md-4">
<label ><?php echo lang('Email'); ?></label>
<input type="email" class="form-control" name="Emergency_Contact_Email1" id="Emergency_Contact_Email" value='<?php
if (!empty($nurse->Emergency_Contact_Email1)) {
echo $nurse->Emergency_Contact_Email1;
}
?>'>
</div>
<div class="form-group col-md-12">
<label for="same_emergency2"><?php echo lang("Same as Permanent Address"); ?>
&nbsp;&nbsp;
<input type="checkbox" id="same_emergency2">
</label>
</div>
<div class="form-group col-md-3">
<?php $Emergency_Contact1=json_decode($nurse->Emergency_Contact_Address1); ?>
<input type="hidden" name="Emergency_Contact_Lang1" id="Emergency_Contact_Lang1" value="<?php echo $Emergency_Contact1->Emergency_Contact_Lang1; ?>">
<input type="hidden" name="Emergency_Contact_Long2" id="Emergency_Contact_Long2" value="<?php echo $Emergency_Contact1->Emergency_Contact_Long2; ?>">
<label ><?php echo lang('Street Address'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_Address1" id="Emergency_Contact_Address1" value='<?php
if (!empty($Emergency_Contact1->Emergency_Contact_Address1)) {
echo $Emergency_Contact1->Emergency_Contact_Address1;
}
?>'>
<section id="address3Error" class="col-md-12 address3Error"></section>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('County'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_County1" id="Emergency_Contact_County1" value='<?php
if (!empty($Emergency_Contact1->Emergency_Contact_County1)) {
echo $Emergency_Contact1->Emergency_Contact_County1;
}
?>' readonly>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('State'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_State1" id="Emergency_Contact_State1" value='<?php
if (!empty($Emergency_Contact1->Emergency_Contact_State1)) {
echo $Emergency_Contact1->Emergency_Contact_State1;
}
?>'readonly>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('City'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_City1" id="Emergency_Contact_City1" value='<?php
if (!empty($Emergency_Contact1->Emergency_Contact_City1)) {
echo $Emergency_Contact1->Emergency_Contact_City1;
}
?>'readonly>
</div>
<div class="form-group col-md-2">
<label ><?php echo lang('Zip Code'); ?></label>
<input type="text" class="form-control" name="Emergency_Contact_zipcode1" maxlength="5" onkeypress="return isNumberKey(event)" id="Emergency_Contact_zipcode1" value='<?php
if (!empty($Emergency_Contact1->Emergency_Contact_zipcode1)) {
echo $Emergency_Contact1->Emergency_Contact_zipcode1;
}
?>'>
<section id="zipcode3Error" class="col-md-12 zipcode3Error"></section>
</div>
<div class="form-group col-md-1 mt-2">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_emg_address_loader1" Style="display:none;">
<button type="button" class="btn btn-info" id="check_emg_address_btn1" onclick="check_emergency_address_loader1();"><?php echo lang('Check'); ?></button>
</div>
</div>
<div class="row" >
<div class="form-group col-md-12" style="padding: 20px;">
<button type="submit" name="submit" class="btn btn-info" id="basic_submit_btn" disabled><?php echo lang('submit'); ?></button>
</div>
</div>
</form>
<!-- Script Goes Here -->
<script type="text/javascript">
$(function(){
$("#midName").click(function(){
if($(this).is(":checked"))
{
$("#cg_middle_name_1").val("");
$("#cg_middle_name_1").prop( "disabled", true );
$("#cg_middle_name_lbl").removeClass('required-field');
$('#cg_middle_name_1').removeAttr('required');
}
else
{
$("#cg_middle_name_1").prop( "disabled", false );
$("#cg_middle_name_lbl").addClass('required-field');
$('#cg_middle_name_1').prop('required',true);
}
})
});
</script>
<script type="text/javascript">
$(function(){
var daysArray = [];
$(".shiftPreferance").change(function(){
var day = $(this).attr('attr_day');
var attr_type = $(this).attr('attr_type');
if(day=="1")
{
}
if(attr_type=='shift')
{
$("#"+day+"_preferred_shifts").show();
$("#"+day+"_preferred_hours").hide();
}
else
{
$("#"+day+"_preferred_shifts").hide();
$("#"+day+"_preferred_hours").show();
}
// if(!daysArray.includes(day))
// {
// daysArray.push(day);
// }
// console.log(daysArray);
});
})
function saveShift()
{
var shiftData = [];
var v= $('input[type=radio].shiftPreferance:checked');
$(v).each(function(i){
attr_type = $(this).attr('attr_type');
attr_day = $(this).attr('attr_day');
type_val = '';
if(attr_type == 'shift')
{
type_val = $("#"+attr_day+"_preferred_shifts").val();
}
else if (attr_type == 'hourly')
{
type_val += $("#"+attr_day+"_startTime").val();
type_val +=',';
type_val += $("#"+attr_day+"_endTime").val();
}
// console.log(attr_type+":"+attr_day+":"+type_val+":"+attr_day)
shiftData.push({day:attr_day,shift_type:attr_type,type_val:type_val});
});
// console.log(shiftData);
// return false;
// JSON.stringify(shiftData);
// var preferancesData = shiftData.toString();
//if(shiftData.length > 0){
$('#preferancesData').val(JSON.stringify(shiftData));
// }else{
// //confirm('Please Select Schedule Preference');
// return checkShift();
// }
}
function checkShift(){
var shift=$("#preferancesData").val();
if(shift== '' || shift == '[]'){
confirm('Please Select Schedule Preference');
event.preventDefault();
// return false;
}else{
return basic_info_Validation();
}
}
</script>
<script>
function basic_info_Validation(){
var submit=false;
var ssc=$("#actual_ssn").val();
var c_ssc=$("#confirm_actual_ssn").val();
if(ssc==c_ssc && ssc!=""){
submit=true;
}else{
submit=false;
Swal.fire({
position: 'center',
icon: 'error',
title: 'Confirm Social Security Number Not Matched.',
showConfirmButton: false,
timer: 2500
});
}
var citizen=$('input[name=citizen]:checked').val();
var remain_permanently=$('input[name=remain_permanently]:checked').val();
var authorization_to_work=$('input[name=authorization_to_work]:checked').val();
if((citizen==true) || (remain_permanently==true) || (authorization_to_work==true)){
submit=true;
}else{
submit=false;
Swal.fire({
position: 'center',
icon: 'error',
title: 'Check the basic question.',
showConfirmButton: false,
timer: 2500
});
}
if(submit==true){
return Confirmation();
}
return false;
}
function Confirmation()
{
// if (confirm('Do you want to save the data')) {
// // Save it!
// return true;
// } else {
// // Do nothing!
// return false;
// }
// var finalres = false;
// var cnf = Swal.fire({
// title: 'Are you sure?',
// text: "You won't be able to revert this!",
// icon: 'warning',
// showCancelButton: true,
// confirmButtonColor: '#3085d6',
// cancelButtonColor: '#d33',
// confirmButtonText: 'Yes, Save it!'
// }).then((result) => {
// if (result.isConfirmed) {
// finalres=true;
// };
// return finalres;
}
// $( window ).on( "load", function() {
// var caregiverView = $('#basicVerificStatus').val();
// if(caregiverView == 'verified'){
// $("#caregiverBasicForm :input").prop("disabled", true);
// $("#basic_submit_btn").hide();
// }else{
// $("#caregiverBasicForm :input").prop("disabled", false);
// $("#basic_submit_btn").show();
// }
// });
function validateEmpBasicForm()
{
var cg_first_name_1 = $('#cg_first_name_1').val();
if($.trim(cg_first_name_1) == ''){
$("#cg_first_name_1Error").show();
$('#cg_first_name_1').focus();
return false;
}else{
$("#cg_first_name_1Error").hide();
}
var check_middle_name=false;
if($("#midName").is(':checked')){
check_middle_name=true;
}
if(check_middle_name==false)
{
var cg_middle_name_1 = $('#cg_middle_name_1').val();
if($.trim(cg_middle_name_1) == ''){
$("#cg_middle_name_1Error").show();
$('#cg_middle_name_1').focus();
return false;
}else{
$("#cg_middle_name_1Error").hide();
}
}
var cg_last_name_1 = $('#cg_last_name_1').val();
if($.trim(cg_last_name_1) == ''){
$("#cg_last_name_1Error").show();
$('#cg_last_name_1').focus();
return false;
}else{
$("#cg_last_name_1Error").hide();
}
var phone_no = $('#phone_no').val();
if(phone_no.length<13){
$("#phone_noError").show();
$('#phone_no').focus();
return false;
}else{
$("#phone_noError").hide();
}
var emergency_Contact_Telephone1 = $('#emergency_Contact_Telephone1').val();
if(emergency_Contact_Telephone1.length<13){
$("#emergency_Contact_Telephone1Error").show();
$('#emergency_Contact_Telephone1').focus();
return false;
}else{
$("#emergency_Contact_Telephone1Error").hide();
}
return true;
}
</script>
<!-- modification 08-12-2021 -->
<script>
$(document).ready(function() {
$(".citizen_depending").click(function(){
var target_val = $(this).val();
var open_value = $(this).attr("open_value");
var change_required_to = $(this).attr("change_required_to");
var yesDocumentsOption= '<option value="">Select</option>'
+'<option value="Birth Certificate">Birth Certificate</option>'
+'<option value="State ID">State ID</option>'
+'<option value="Citizenship Certificate">Citizenship Certificate</option>'
+'<option value="US Passport">US Passport</option>';
var noDocumentsOption= '<option value="">Select</option>'
+'<option value="Permanent Resident Card">Permanent Resident Card</option>'
+'<option value="Employment Authorization Card">Employment Authorization Card</option>'
+'<option value="Valid Work Visa">Valid Work Visa</option>';
if($('#remain_permanentlyyes').is(':checked')){
noDocumentsOption += '<option value="Foreign Passport with I-94 Stamp">Foreign Passport with I-94 Stamp</option>';
}
if (target_val == open_value){
$("#"+change_required_to).hide();
$("#documents_type").html(yesDocumentsOption);
$(".documents_expire_date_container").hide()
$("#documents_expire_date").removeAttr('required');
$("#documents_expire_date").val('');
$("#uscis").val('');
$(".docExpLvl").removeClass("required-field");
}else{
$("#documents_expire_date").val('');
$("#uscis").val('');
$("#"+change_required_to).show();
$("#documents_type").html(noDocumentsOption);
$(".documents_expire_date_container").show();
}
lookingForCitizenYes();
checkBasicCheckList();
});
});
</script>
<script>
$(document).ready(function() {
$(".us_work_auth_depending").click(function(){
var us_work_auth_depending=$(this).val();
var noDocumentsOption = '<option value="">Select</option>'
+'<option value="Permanent Resident Card">Permanent Resident Card</option>'
+'<option value="Employment Authorization Card">Employment Authorization Card</option>'
+'<option value="Valid Work Visa">Valid Work Visa</option>';
if(us_work_auth_depending==1){
noDocumentsOption += '<option value="Foreign Passport with I-94 Stamp">Foreign Passport with I-94 Stamp</option>';
}
$("#documents_type").html(noDocumentsOption);
});
});
</script>
<script type="text/javascript">
function lookingForCitizenYes(){
$(document).ready(function(){
if(!$('#citizenyes').is(':checked')){
$(".citizen-yes-state-list").hide();
$(".citizen-yes-state-list").children("label").removeClass("required-field");
$(".citizen-yes-state-list").children("select").prop("required",false);
}
});
}
</script>
<script type="text/javascript">
$(document).ready(function(){
var state=$("#documents_type").val();
state_show_hide_add_remove_require(state);
$("#documents_type").change(function(){
var state_select=$(this).val();
state_show_hide_add_remove_require(state_select);
});
if(!$("#citizenno").is(":checked")){
$("#us_work_auth").hide();
}
function state_show_hide_add_remove_require(select){
if(select=="State ID"){
$(".citizen-yes-state-list").show();
$(".citizen-yes-state-list").children("label").addClass("required-field");
$(".citizen-yes-state-list").children("select").prop("required",true);
select_for_first_time();
}else{
$(".citizen-yes-state-list").hide();
$(".citizen-yes-state-list").children("label").removeClass("required-field");
$(".citizen-yes-state-list").children("select").prop("required",false);
}
}
function select_for_first_time(){
var permanent_state=$("#state1").val();
var doc_state=$("#doc_state_val").val();
if(doc_state==""){
if(permanent_state!=""){
$("#state_list").val(permanent_state);
}else{
$("#state_list").val("");
}
}
}
});
</script>
<!-- End of modification 08-12-2021 -->
<script type="text/javascript">
$("#refEmailId").blur(function(){
var email=this.value;
$("#emailcheckTab").show();
$("#emailChecking").show();
$("#emailAvailable").hide();
$("#emailNA").hide();
$("#basic_submit_btn").prop('disabled', true);
$.ajax({
url:'<?=base_url()?>CaregiversDashboard/hms_check_nurse_email_avl',
type:'GET',
data:{
cgid:<?=$nurse->caregiver_table_id?>,
email:email
},
beforeSend: function(){
$("#emailcheckTab").show();
$("#emailChecking").show();
$("#emailAvailable").hide();
$("#emailNA").hide();
},
success:function(data){
if(data==true){
$("#emailAvailable").show();
$("#emailNA").hide();
$("#basic_submit_btn").prop('disabled', false);
}else{
$("#emailAvailable").hide();
$("#emailNA").show();
}
$("#emailcheckTab").show();
$("#emailChecking").hide();
}
});
});
</script>