1028 lines
58 KiB
PHP
1028 lines
58 KiB
PHP
<?php
|
|
session_start(); iper_hook_css(); get_header('product'); global $indice;//richiama la funzione per settare gli stili. vedi functions.php
|
|
|
|
function print_tab_index(){
|
|
static $tab_index = 2;
|
|
$tab_index++;
|
|
echo $tab_index;
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
|
|
$us_state_states = array(
|
|
'st'=>'State*',
|
|
'AK'=>'AK',
|
|
'AL'=>'AL',
|
|
'AR'=>'AR',
|
|
'AZ'=>'AZ',
|
|
'CA'=>'CA',
|
|
'CO'=>'CO',
|
|
'CT'=>'CT',
|
|
'DC'=>'DC',
|
|
'DE'=>'DE',
|
|
'FL'=>'FL',
|
|
'GA'=>'GA',
|
|
'HI'=>'HI',
|
|
'ID'=>'ID',
|
|
'IA'=>'IA',
|
|
'IL'=>'IL',
|
|
'IN'=>'IN',
|
|
'KS'=>'KS',
|
|
'KY'=>'KY',
|
|
'LA'=>'LA',
|
|
'MA'=>'MA',
|
|
'MD'=>'MD',
|
|
'ME'=>'ME',
|
|
'MI'=>'MI',
|
|
'MN'=>'MN',
|
|
'MO'=>'MO',
|
|
'MS'=>'MS',
|
|
'MT'=>'MT',
|
|
'NC'=>'NC',
|
|
'ND'=>'ND',
|
|
'NE'=>'NE',
|
|
'NH'=>'NH',
|
|
'NJ'=>'NJ',
|
|
'NM'=>'NM',
|
|
'NV'=>'NV',
|
|
'NY'=>'NY',
|
|
'OH'=>'OH',
|
|
'OK'=>'OK',
|
|
'OR'=>'OR',
|
|
'PA'=>'PA',
|
|
'PR'=>'PR',
|
|
'RI'=>'RI',
|
|
'SC'=>'SC',
|
|
'SD'=>'SD',
|
|
'TN'=>'TN',
|
|
'TX'=>'TX',
|
|
'UT'=>'UT',
|
|
'VA'=>'VA',
|
|
'VT'=>'VT',
|
|
'WA'=>'WA',
|
|
'WI'=>'WI',
|
|
'WV'=>'WV',
|
|
'WY'=>'WY'
|
|
);
|
|
|
|
$canadian_states_up = array(
|
|
"Pr"=>'Province*',
|
|
"AB" => "AB",
|
|
"BC" => "BC",
|
|
"MB" => "MB",
|
|
"NB" => "NB",
|
|
"NL" => "NL",
|
|
"NS" => "NS",
|
|
"NT" => "NT",
|
|
"NU" => "NU",
|
|
"ON" => "ON",
|
|
"PE" => "PE",
|
|
"QC" => "QC",
|
|
"SK" => "SK",
|
|
"YT" => "YT"
|
|
);
|
|
|
|
$objProfile =$_SESSION['shipping_info'];
|
|
$hasData=is_array($_SESSION["md_profile"]);
|
|
?>
|
|
|
|
<script>
|
|
function submitform() {
|
|
var form = document.getElementById('form-payment');
|
|
document.form.submit();
|
|
}
|
|
|
|
var shippingInfo=jQuery.parseJSON("<?php echo addslashes(json_encode($objProfile));?>");
|
|
var arrUS= jQuery.parseJSON('<?php echo addslashes(json_encode($us_state_states));?>');
|
|
var arrCanada=jQuery.parseJSON('<?php echo addslashes(json_encode($canadian_states_up));?>');
|
|
var oldState="US";
|
|
|
|
jQuery(function(){
|
|
|
|
jQuery(window).bind("pageshow", function(event) {
|
|
if (event.originalEvent.persisted) {
|
|
location.reload();
|
|
}
|
|
});
|
|
|
|
|
|
function checkStateIsValid(e, id, value1, value2, value3, value4){
|
|
var parent=jQuery(id).closest('.form-group');
|
|
parent.removeClass('has-error');
|
|
|
|
jQuery(".help-block.with-errors",parent).html("");
|
|
|
|
|
|
if(jQuery(id).val()==value1 || jQuery(id).val()==value2 || jQuery(id).val()==value3 || jQuery(id).val()==value4){
|
|
|
|
parent.addClass('has-error');
|
|
//jQuery('.state').toggleClass('has-error');
|
|
|
|
var errText=jQuery(id).attr("data-error");
|
|
jQuery(".help-block.with-errors",parent).html(errText);
|
|
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
|
|
function checkRelationship(){
|
|
|
|
var parent=jQuery('#relationship1').closest('.form-group');
|
|
parent.removeClass('has-error');
|
|
jQuery(".help-block.with-errors",parent).html("");
|
|
|
|
if(jQuery('#relationship1').val()=='rel'){
|
|
var errText=jQuery('#relationship1').attr("data-error");
|
|
jQuery(".help-block.with-errors",parent).html(errText);
|
|
parent.addClass('has-error');
|
|
}
|
|
|
|
|
|
}
|
|
|
|
jQuery('#form-payment').on('submit', function (e) {
|
|
if (e.isDefaultPrevented()) {
|
|
// handle the invalid form...
|
|
checkStateIsValid(e, '#state_shipping', 'State*', 'Province*', 'St', 'Pr');
|
|
checkRelationship();
|
|
|
|
} else {
|
|
// everything looks good!
|
|
checkStateIsValid(e, '#state_shipping', 'State*', 'Province*', 'St', 'Pr');
|
|
checkRelationship();
|
|
|
|
}
|
|
})
|
|
|
|
jQuery("#billing_sameas_shipping").change(function(){
|
|
if(jQuery(this).prop("checked")){
|
|
/*jQuery("#firstName_shipping").val(shippingInfo.Name);
|
|
jQuery("#lastName_shipping").val(shippingInfo.LastName);*/
|
|
jQuery("#country_shipping").val(shippingInfo.Country);
|
|
jQuery("#address1_shipping").val(shippingInfo.Street1);
|
|
jQuery("#address2_shipping").val(shippingInfo.Street2);
|
|
jQuery("#city_shipping").val(shippingInfo.City);
|
|
jQuery("#state_shipping").val(shippingInfo.State);
|
|
jQuery("#zip_shipping").val(shippingInfo.PostalCode);
|
|
jQuery("#email_shipping").val(shippingInfo.Mail);
|
|
jQuery("#phone_shipping").val(shippingInfo.Phone);
|
|
|
|
var value=jQuery('#country_shipping').val();
|
|
if(value=='Canada' && oldState!="Canada") {
|
|
|
|
jQuery('#state_shipping').html("");
|
|
for(var i in arrCanada){
|
|
jQuery('#state_shipping').append("<option value='"+i+"'>"+arrCanada[i]+"</option>");
|
|
jQuery('#state_shipping').selectpicker('refresh');
|
|
|
|
}
|
|
|
|
}else if(value=="United States" && oldState!="United States"){
|
|
jQuery('#state_shipping').html("");
|
|
for(var i in arrUS){
|
|
jQuery('#state_shipping').append("<option value='"+i+"'>"+arrUS[i]+"</option>");
|
|
jQuery('#state_shipping').selectpicker('refresh');
|
|
|
|
}
|
|
}
|
|
|
|
oldState=value;
|
|
|
|
|
|
jQuery('#country_shipping').selectpicker('refresh');
|
|
jQuery('#state_shipping').selectpicker('refresh');
|
|
|
|
jQuery('#country_shipping').selectpicker('val',shippingInfo.Country);
|
|
jQuery('#state_shipping').selectpicker('val',shippingInfo.State);
|
|
|
|
jQuery('#country_shipping').selectpicker('refresh');
|
|
jQuery('#state_shipping').selectpicker('refresh');
|
|
}
|
|
});
|
|
|
|
|
|
jQuery('#country_shipping').on('changed.bs.select', function (e) {
|
|
|
|
var value=jQuery('#country_shipping').val();
|
|
if(value=='Canada' && oldState!="Canada") {
|
|
|
|
jQuery('#state_shipping').html("");
|
|
for(var i in arrCanada){
|
|
jQuery('#state_shipping').append("<option value='"+i+"'>"+arrCanada[i]+"</option>");
|
|
jQuery('#state_shipping').selectpicker('refresh');
|
|
|
|
}
|
|
|
|
}else if(value=="United States" && oldState!="United States"){
|
|
jQuery('#state_shipping').html("");
|
|
for(var i in arrUS){
|
|
jQuery('#state_shipping').append("<option value='"+i+"'>"+arrUS[i]+"</option>");
|
|
jQuery('#state_shipping').selectpicker('refresh');
|
|
|
|
}
|
|
}
|
|
|
|
oldState=value;
|
|
});
|
|
|
|
jQuery('input[name=another_person]').on('change', function() {
|
|
if(jQuery('input[name=another_person]:checked', '#form-payment').val()=='Yes'){
|
|
jQuery('.another_persone_use_the_system').toggleClass('hide_another_persone_use_the_system');
|
|
} else { jQuery('.another_persone_use_the_system').toggleClass('hide_another_persone_use_the_system');
|
|
}
|
|
});
|
|
|
|
function validate_fields(e, id, bool,text) {
|
|
|
|
var parent=jQuery(id).closest('.form-group');
|
|
var gliphycon=jQuery('.glyphicon', parent);
|
|
var errText=jQuery(id).attr("data-error");
|
|
gliphycon.removeClass('glyphicon-ok');
|
|
|
|
if(bool=='false'){
|
|
parent.removeClass('has-success');
|
|
parent.addClass('has-error');
|
|
gliphycon.removeClass('glyphicon-ok');
|
|
gliphycon.addClass('glyphicon-remove');
|
|
|
|
if(text){jQuery(".help-block.with-errors",parent).html(text);}else { jQuery(".help-block.with-errors",parent).html(errText);}
|
|
|
|
|
|
|
|
} else if(bool=='true'){
|
|
|
|
parent.addClass('has-success');
|
|
parent.removeClass('has-error');
|
|
gliphycon.addClass('glyphicon-ok');
|
|
gliphycon.removeClass('glyphicon-remove');
|
|
jQuery(".help-block.with-errors",parent).html('');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var id_form = jQuery('#form-payment');
|
|
id_form.on('submit', function (e) {
|
|
|
|
check_zip_code_state('#country_shipping', '#zip_shipping');
|
|
if(check_zip_number('#country_shipping', '#zip_shipping')!='1'){e.preventDefault();}
|
|
|
|
if(jQuery('#phone_first_emergency_contact').val() && jQuery('#phone_first_emergency_contact').val()==jQuery('#phone_shipping').val()){
|
|
validate_fields(e, '#phone_first_emergency_contact', 'false', 'Emergency Contact phone number cannot be the same as that of the primary user');
|
|
e.preventDefault();
|
|
} else {if(verify_number(e, '#phone_first_emergency_contact') === true){ validate_fields(e, '#phone_first_emergency_contact', 'true'); } }
|
|
if(jQuery('#phone_second_emergency_contact').val() && jQuery('#phone_second_emergency_contact').val()==jQuery('#phone_shipping').val()){
|
|
validate_fields(e, '#phone_second_emergency_contact', 'false', 'Emergency Contact phone number cannot be the same as that of the primary user');
|
|
e.preventDefault();
|
|
} else {validate_fields(e, '#phone_second_emergency_contact', 'true'); }
|
|
if(jQuery('#phone_third_emergency_contact').val() && jQuery('#phone_third_emergency_contact').val()==jQuery('#phone_shipping').val()){
|
|
validate_fields(e, '#phone_third_emergency_contact', 'false', 'Emergency Contact phone number cannot be the same as that of the primary user');
|
|
e.preventDefault();
|
|
} else {validate_fields(e, '#phone_third_emergency_contact', 'true'); }
|
|
|
|
|
|
if(jQuery('#fname_second_emergency_contact').val() || jQuery('#sname_second_emergency_contact').val()){
|
|
if(!jQuery('#fname_second_emergency_contact').val()){validate_fields(e, '#fname_second_emergency_contact', 'false');} else {validate_fields(e, '#fname_second_emergency_contact', 'true');}
|
|
if(!jQuery('#sname_second_emergency_contact').val()){validate_fields(e, '#sname_second_emergency_contact', 'false');} else {validate_fields(e, '#sname_second_emergency_contact', 'true');}
|
|
|
|
if(!jQuery('#phone_second_emergency_contact').val()){validate_fields(e, '#phone_second_emergency_contact', 'false');} else {validate_fields(e, '#phone_second_emergency_contact', 'true');}
|
|
|
|
if(jQuery('#relationship2').val()=='rel' ){
|
|
validate_fields(e, '#relationship2', 'false');
|
|
e.preventDefault();
|
|
} else { validate_fields(e, '#relationship2', 'true');}
|
|
} //else { validate_fields(e, '#relationship2', 'true');}
|
|
|
|
if(jQuery('#fname_third_emergency_contact').val() || jQuery('sname_third_emergency_contact').val()){
|
|
|
|
if(!jQuery('#fname_third_emergency_contact').val()){validate_fields(e, '#fname_third_emergency_contact', 'false');} else {validate_fields(e, '#fname_third_emergency_contact', 'true');}
|
|
if(!jQuery('#sname_third_emergency_contact').val()){validate_fields(e, '#sname_third_emergency_contact', 'false');} else {validate_fields(e, '#sname_third_emergency_contact', 'true');}
|
|
|
|
if(!jQuery('#phone_third_emergency_contact').val()){validate_fields(e, '#phone_third_emergency_contact', 'false');} else {validate_fields(e, '#phone_second_emergency_contact', 'true');}
|
|
|
|
if(jQuery('#relationship3').val()=='rel'){
|
|
|
|
validate_fields(e, '#relationship3', 'false');
|
|
e.preventDefault();
|
|
}else { validate_fields(e, '#relationship3', 'true');}
|
|
} //else { validate_fields(e, '#relationship3', 'true');}
|
|
|
|
if(jQuery('#relationship1').val()=='rel'){e.preventDefault();}
|
|
|
|
var div_error = id_form.find('.has-error').first();
|
|
|
|
console.log('error'+div_error.length);
|
|
|
|
if(div_error.length != '0'){
|
|
var div_error_offset = div_error.offset().top;
|
|
var view_height= jQuery( window ).height();
|
|
window.scrollTo(0, div_error_offset-view_height/2);
|
|
e.preventDefault();}
|
|
else{
|
|
if(!e.isDefaultPrevented()){
|
|
jQuery('body').append('<div class="loader"><div class="spinner"><div class="double-bounce1"></div><div class="double-bounce2"></div></div></div>');
|
|
jQuery('.loader').show();
|
|
}
|
|
}
|
|
|
|
if(check_if_filled('.you_cant_see_me_input') || check_if_filled('.you_cant_see_me_input')!=''){
|
|
e.preventDefault();
|
|
} else { jQuery('.spam_blocker').html("");}
|
|
|
|
}
|
|
);
|
|
|
|
function verify_number(e, id){
|
|
var phone_ship = jQuery(id);
|
|
var phone_ship_nodash = phone_ship.val().replace(/-/g,"");
|
|
var field_length = phone_ship_nodash.length;
|
|
|
|
var index1 = phone_ship.val().indexOf('-');
|
|
var index2 = phone_ship.val().indexOf('-', 4);
|
|
var index3 = phone_ship.val().indexOf('-', 8);
|
|
var dash_check = false;
|
|
|
|
if(index1==(-1)){ //index=-1 non ci sono dash
|
|
dash_check = true;
|
|
} else {
|
|
if(index1==3 && index2==7 && index3==(-1)){
|
|
dash_check = true;
|
|
} else { dash_check = false;}
|
|
}
|
|
|
|
if((field_length!=10 || isNaN(phone_ship_nodash) || dash_check==false) && (phone_ship.val()) ){
|
|
validate_fields(e, id, 'false');
|
|
}else{
|
|
|
|
if(id!='#phone_shipping'){
|
|
number_ec_validation_check(e, id);} else {validate_fields(e, id, 'true'); return true;}
|
|
}
|
|
}
|
|
function number_ec_validation(){
|
|
|
|
|
|
if(jQuery('#fname_second_emergency_contact').val() || jQuery('#sname_second_emergency_contact').val()){
|
|
jQuery('select[id=relationship2] > option:contains("Relationship")').text('Relationship*');
|
|
jQuery('#relationship2').selectpicker('refresh');
|
|
jQuery('#phone_second_emergency_contact').attr('placeholder', 'Phone*:555-555-5555');
|
|
} else if(!jQuery('#fname_second_emergency_contact').val() && !jQuery('#sname_second_emergency_contact').val()){
|
|
jQuery('#phone_second_emergency_contact').attr('placeholder', 'Phone:555-555-5555');
|
|
jQuery('select[id=relationship2] > option:contains("Relationship")').text('Relationship');
|
|
jQuery('#relationship2').selectpicker('refresh');
|
|
|
|
}
|
|
|
|
if(jQuery('#fname_third_emergency_contact').val() || jQuery('#sname_third_emergency_contact').val()){
|
|
jQuery('select[id=relationship3] > option:contains("Relationship")').text('Relationship*');
|
|
jQuery('#relationship3').selectpicker('refresh');
|
|
jQuery('#phone_third_emergency_contact').attr('placeholder', 'Phone*:555-555-5555');
|
|
} else if(!jQuery('#fname_third_emergency_contact').val() && !jQuery('#sname_third_emergency_contact').val()){
|
|
jQuery('select[id=relationship3] > option:contains("Relationship")').text('Relationship');
|
|
jQuery('#phone_third_emergency_contact').attr('placeholder', 'Phone:555-555-5555');
|
|
jQuery('#relationship3').selectpicker('refresh');
|
|
|
|
}
|
|
}
|
|
|
|
function number_ec_validation_check(e, id){
|
|
|
|
var phone_ship1 = jQuery('#phone_first_emergency_contact');
|
|
var phone_ship_nodash1 = phone_ship1.val().replace(/-/g,"");
|
|
var field_length1 = phone_ship_nodash1.length;
|
|
if(jQuery(id).val() && jQuery(id).val()==jQuery('#phone_shipping').val()){
|
|
validate_fields(e, id, 'false', 'Emergency Contact phone number cannot be the same as that of the primary user');
|
|
} else if(jQuery(id).val() && field_length1 ==10){validate_fields(e, id, 'true'); }
|
|
}
|
|
|
|
|
|
|
|
jQuery('#form-payment').on('change keyup blur keydown focusout', function(e){
|
|
check_if_filled('.you_cant_see_me_input');
|
|
|
|
|
|
|
|
number_ec_validation();
|
|
|
|
verify_number(e, '#phone_first_emergency_contact');
|
|
verify_number(e, '#phone_second_emergency_contact');
|
|
verify_number(e, '#phone_third_emergency_contact');
|
|
verify_number(e, '#phone_shipping');
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
function check_if_filled(id){
|
|
|
|
var hidden_input = jQuery(id);
|
|
hidden_input.attr('name', Math.floor(Date.now() / 1000));
|
|
hidden_input.attr('id', Math.floor(Date.now() / 1000));
|
|
|
|
|
|
|
|
return jQuery("#"+hidden_input.attr('id')).val();
|
|
}
|
|
|
|
function validate_fields2(id, bool, error) {
|
|
var parent=jQuery(id).closest('.form-group');
|
|
var gliphycon=jQuery('.glyphicon', parent);
|
|
var errText=jQuery(id).attr("data-error");
|
|
gliphycon.removeClass('glyphicon-ok');
|
|
|
|
if(bool=='false'){
|
|
parent.removeClass('has-success');
|
|
parent.addClass('has-error');
|
|
gliphycon.removeClass('glyphicon-ok');
|
|
gliphycon.addClass('glyphicon-remove');
|
|
|
|
if(error!='errText'){
|
|
jQuery(".help-block.with-errors",parent).html(error);} else {
|
|
|
|
jQuery(".help-block.with-errors",parent).html(errText);
|
|
|
|
}
|
|
|
|
} else if(bool=='true'){
|
|
|
|
parent.addClass('has-success');
|
|
parent.removeClass('has-error');
|
|
gliphycon.addClass('glyphicon-ok');
|
|
gliphycon.removeClass('glyphicon-remove');
|
|
jQuery(".help-block.with-errors",parent).html('');
|
|
}
|
|
}
|
|
|
|
|
|
function check_zip_code_state(id_country, id_zip){
|
|
|
|
var parent=jQuery(id_zip).closest('.form-group');
|
|
var errText=jQuery(id_zip).attr("data-error");
|
|
|
|
/*check_zip_number(id_zip);*/
|
|
|
|
|
|
if(jQuery(id_country).val()=='Canada'){
|
|
jQuery(id_zip).attr('placeholder', 'Postal Code*');
|
|
jQuery(id_zip).attr('data-error', 'Please enter your PostalCode');
|
|
|
|
if((jQuery(id_zip).val().indexOf(' '))!='-1'){
|
|
jQuery(id_zip).selectpicker('refresh');
|
|
} else {
|
|
|
|
jQuery(id_zip).selectpicker('refresh');
|
|
}
|
|
|
|
} else {
|
|
jQuery(id_zip).attr('placeholder', 'Zip*');
|
|
jQuery(id_zip).attr('data-error', 'Please enter your Zip Code');
|
|
|
|
jQuery(id_zip).selectpicker('refresh');}
|
|
|
|
/*jQuery(".help-block.with-errors",parent).html('');*/
|
|
}
|
|
|
|
function check_zip_number(id_country, id_zip){
|
|
|
|
var res = 1;
|
|
if(jQuery(id_country).val()=='Canada'){
|
|
console.log('canada');
|
|
|
|
if((jQuery(id_zip).val().indexOf(' '))!='-1'){
|
|
console.log('space');
|
|
if(jQuery(id_zip).val().length!='7'/* || isNaN(jQuery(id_zip).val().replace(' ', ''))*/ || jQuery(id_zip).val().indexOf(' ')!='3'){validate_fields2(id_zip, 'false', 'Please enter your PostalCode'); res-=1;} else { validate_fields2(id_zip, 'true'); console.log('=7');}
|
|
} else {
|
|
console.log('nospace');
|
|
if(jQuery(id_zip).val().length!='6' /*|| isNaN(jQuery(id_zip).val())*/){validate_fields2(id_zip, 'false', 'Please enter your PostalCode'); res-=1; } else { validate_fields2(id_zip, 'true'); }
|
|
}
|
|
} else {
|
|
console.log('no_canada');
|
|
|
|
if(jQuery(id_zip).val().length!='5' /*|| isNaN(jQuery(id_zip).val())*/){validate_fields2(id_zip, 'false', 'Please enter your Zip Code'); res-=1;} else { validate_fields2(id_zip, 'true');}
|
|
}
|
|
|
|
return res;
|
|
|
|
|
|
}
|
|
|
|
|
|
check_zip_code_state('#country_shipping', '#zip_shipping');
|
|
|
|
jQuery('#zip_shipping').on('change keyup blur', function(){
|
|
check_zip_number('#country_shipping', '#zip_shipping');
|
|
});
|
|
|
|
function neutralize_field(id){
|
|
var parent= jQuery(id).closest('.form-group');
|
|
var gliphycon=jQuery('.glyphicon', parent);
|
|
parent.removeClass('has-error');
|
|
parent.removeClass('has-success');
|
|
gliphycon.removeClass('glyphicon-ok');
|
|
gliphycon.removeClass('glyphicon-remove');
|
|
jQuery(".help-block.with-errors",parent).html('');
|
|
|
|
}
|
|
|
|
jQuery('#country_shipping').on('change', function(){
|
|
|
|
|
|
if(jQuery('#zip_shipping').val()){
|
|
check_zip_number('#country_shipping', '#zip_shipping');
|
|
}
|
|
if(jQuery('#zip_shipping').closest('.form-group').hasClass('has-error')){
|
|
|
|
if(!jQuery('#zip_shipping').val()){
|
|
neutralize_field('#zip_shipping'); console.log('hereeee');
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
jQuery('#country_shipping').on('change keyup blur focus', function(){
|
|
check_zip_code_state('#country_shipping', '#zip_shipping');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
<form id="form-payment" data-toggle="validator" action="<?php echo get_permalink($config['id_medical_thank']); ?>" method="post" role="form">
|
|
|
|
<div class="row">
|
|
<div class="col-12 col-lg-10">
|
|
|
|
<div class="profile-title-page title_fixed_size">Set Up Your Subscriber Profile</div>
|
|
|
|
|
|
<div class="container-form-payment">
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="firstName_shipping" name="firstName_shipping" placeholder="First Name*" data-error="Please enter your First Name" maxlength="40" required >
|
|
<!--value="--><?php /*echo ($hasData) ? $_SESSION["md_profile"]["first_name"] : "";*/?>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input type="text" tabindex="<?php print_tab_index(); ?>" class="form-control" id="lastName_shipping" name="lastName_shipping" placeholder="Last Name*" data-error="Please enter your Second Name" maxlength="80" required >
|
|
<!--value="--><?php /*echo ($hasData) ? $_SESSION["md_profile"]["last_name"] : "";*/?>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12"><label>Date of Birth*</label></div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<select tabindex="<?php print_tab_index(); ?>" name="profile_month" id="Month" class="form-control selectpicker show-tick" title="Month*" required>
|
|
<option value="01">January</option>
|
|
<option value="02">February</option>
|
|
<option value="03">March</option>
|
|
<option value="04">April</option>
|
|
<option value="05">May</option>
|
|
<option value="06">June</option>
|
|
<option value="07">July</option>
|
|
<option value="08">August</option>
|
|
<option value="09">September</option>
|
|
<option value="10">October</option>
|
|
<option value="11">November</option>
|
|
<option value="12">December</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<select tabindex="<?php print_tab_index(); ?>" id="Day" name="profile_day" class="form-control selectpicker show-tick" title="Day*" required>
|
|
<option value="1">1</option>
|
|
<option value="2">2</option>
|
|
<option value="3">3</option>
|
|
<option value="4">4</option>
|
|
<option value="5">5</option>
|
|
<option value="6">6</option>
|
|
<option value="7">7</option>
|
|
<option value="8">8</option>
|
|
<option value="9">9</option>
|
|
<option value="10">10</option>
|
|
<option value="11">11</option>
|
|
<option value="12">12</option>
|
|
<option value="13">13</option>
|
|
<option value="14">14</option>
|
|
<option value="15">15</option>
|
|
<option value="16">16</option>
|
|
<option value="17">17</option>
|
|
<option value="18">18</option>
|
|
<option value="19">19</option>
|
|
<option value="20">20</option>
|
|
<option value="21">21</option>
|
|
<option value="22">22</option>
|
|
<option value="23">23</option>
|
|
<option value="24">24</option>
|
|
<option value="25">25</option>
|
|
<option value="26">26</option>
|
|
<option value="27">27</option>
|
|
<option value="28">28</option>
|
|
<option value="29">29</option>
|
|
<option value="30">30</option>
|
|
<option value="31">31</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<select tabindex="<?php print_tab_index(); ?>" id="year" name="profile_year" class="form-control selectpicker show-tick" title="Year*" required>
|
|
<?php $cY=date("Y"); ?>
|
|
<?php for($i=$cY-1;$i>$cY-132;$i--): ?>
|
|
<option value="<?php echo $i;?>"><?php echo $i;?></option>
|
|
<?php endfor; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<label>Address where the device will be used*</label>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="form-group">
|
|
<div class="checkbox">
|
|
<input tabindex="<?php print_tab_index(); ?>" id="billing_sameas_shipping" name="billing_sameas_shipping" type="checkbox" <?php if(isset($_POST['billing_sameas_shipping'])){echo 'checked';} ?> >
|
|
<label for="billing_sameas_shipping">Same as shipping address</label>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<input id="country_shipping" name="country_shipping" value="United States" type="hidden" />
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="address1_shipping" name="address1_shipping" placeholder="Address Line 1*" data-error="Insert the Address where the device will be used" maxlength="125" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="address2_shipping" name="address2_shipping" placeholder="Apt or Unit#" maxlength="125" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="cross_street" name="cross_street" placeholder="Cross Street" maxlength="125" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="city_shipping" name="city_shipping" placeholder="City*" data-error="Enter the city where the device will be used" maxlength="40" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group state has-feedback">
|
|
<select tabindex="<?php print_tab_index(); ?>" id="state_shipping" name="state_shipping" class="form-control selectpicker show-tick" data-error="Select a State or Province" title="" required>
|
|
<?php
|
|
$i=0;
|
|
foreach($us_state_states as $key => $value){
|
|
echo "<option value='".$value."'>".$value."</option>";}
|
|
?>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="zip_shipping" name="zip_shipping" placeholder="Zip*" data-error="Please enter your Zip Code" maxlength="20" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="email" class="form-control" id="email_shipping" name="email_shipping" placeholder="Email*" data-error="Please provide a valid Email Address" maxlength="80" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="tel" class="form-control" id="phone_shipping" name="phone_shipping" pattern="[0-9/-]{10,12}" placeholder="Phone*:555-555-5555" data-error="Please provide a valid Phone Number" maxlength="12" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label>Will Anyone Else Use This System*</label>
|
|
<div class="row ">
|
|
<div class="col-md-12">
|
|
<div class="form-group">
|
|
<div class="radio">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="radio" name="another_person" id="another_person_yes" value="Yes" >
|
|
<label for="another_person_yes"><span class="name yes">Yes</span> </label>
|
|
</div>
|
|
<div class="radio">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="radio" name="another_person" id="another_person_no" value="No" checked="checked">
|
|
<label for="another_person_no"><span class="name no">No</span> </label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container-form-payment billing-detail">
|
|
<div class="another_persone_use_the_system hide_another_persone_use_the_system">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="tel" class="form-control" id="anotherperson_firstname_text" name="anotherperson_firstname" placeholder="First Name*" maxlength="40" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="tel" class="form-control" id="anotherperson_lastname_text" name="anotherperson_lastname" placeholder="Last Name*" maxlength="80" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group you_cant_see_me">
|
|
<div>
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="you_cant_see_me_input" id="<?php echo time(); ?>" name="<?php echo time(); ?>" >
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="form-subtitle1 title-page less_top">Emergency Contact Information</div>
|
|
<div class="form-subtitle2 pad-left"><label>Primary Contact</label></div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="fname_emergency_contact" name="fname_emergency_contact" data-error="Please insert the emergency contact's First Name" placeholder="First Name*" maxlength="40" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="sname_emergency_contact" name="sname_emergency_contact" data-error="Please insert the emergency contact's Last Name" placeholder="Last Name*" maxlength="80" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
<div>
|
|
<select tabindex="<?php print_tab_index(); ?>" id="relationship1" name="1_emergencycontact_relationship" class="form-control selectpicker show-tick" data-error="Please select the emergency contact Relationship" title="Relationship*" required>
|
|
<option value="rel">Relationship*</option>
|
|
<option value="Aunt">Aunt</option>
|
|
<option value="Caretaker">Caretaker</option>
|
|
<option value="Daughter">Daughter</option>
|
|
<option value="Doctor">Doctor</option>
|
|
<option value="Ex-Husband">Ex-Husband</option>
|
|
<option value="Ex-Wife">Ex-Wife</option>
|
|
<option value="Father">Father</option>
|
|
<option value="Friend">Friend</option>
|
|
<option value="Granddaughter">Granddaughter</option>
|
|
<option value="Grandfather">Grandfather</option>
|
|
<option value="Grandmother">Grandmother</option>
|
|
<option value="Grandparent">Grandparent</option>
|
|
<option value="Grandson">Husband</option>
|
|
<option value="Husband">Grandson</option>
|
|
<option value="Mother">Mother</option>
|
|
<option value="Niece">Niece</option>
|
|
<option value="Neighbor">Neighbor</option>
|
|
<option value="Nephew">Nephew</option>
|
|
<option value="Nurse">Nurse</option>
|
|
<option value="Sibling">Sibling</option>
|
|
<option value="Son">Son</option>
|
|
<option value="Uncle">Uncle</option>
|
|
<option value="Wife">Wife</option>
|
|
<option value="Other">Other</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-8">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="phone_first_emergency_contact" name="phone_first_emergency_contact" pattern="[0-9/-]{10,12}" maxlength="12" data-error='Enter a valid Phone Number' placeholder="Phone1*:555-555-5555" required>
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="form-subtitle2 pad-left"><label>Secondary Contact</label></div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="fname_second_emergency_contact" name="fname_second_emergency_contact" data-error="Please insert the emergency contact's First Name" placeholder="First Name" maxlength="40" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="sname_second_emergency_contact" name="sname_second_emergency_contact" data-error="Please insert the emergency contact's Second Name" placeholder="Last Name" maxlength="80" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
<div>
|
|
<select tabindex="<?php print_tab_index(); ?>" id="relationship2" name="2_emergencycontact_relationship" class="form-control selectpicker show-tick" title="Relationship" data-error="Please select the emergency contact Relationship" >
|
|
<option value="rel">Relationship</option>
|
|
<option value="Aunt">Aunt</option>
|
|
<option value="Caretaker">Caretaker</option>
|
|
<option value="Daughter">Daughter</option>
|
|
<option value="Doctor">Doctor</option>
|
|
<option value="Ex-Husband">Ex-Husband</option>
|
|
<option value="Ex-Wife">Ex-Wife</option>
|
|
<option value="Father">Father</option>
|
|
<option value="Friend">Friend</option>
|
|
<option value="Granddaughter">Granddaughter</option>
|
|
<option value="Grandfather">Grandfather</option>
|
|
<option value="Grandmother">Grandmother</option>
|
|
<option value="Grandparent">Grandparent</option>
|
|
<option value="Grandson">Grandson</option>
|
|
<option value="Husband">Husband</option>
|
|
<option value="Mother">Mother</option>
|
|
<option value="Niece">Niece</option>
|
|
<option value="Neighbor">Neighbor</option>
|
|
<option value="Nephew">Nephew</option>
|
|
<option value="Nurse">Nurse</option>
|
|
<option value="Sibling">Sibling</option>
|
|
<option value="Son">Son</option>
|
|
<option value="Uncle">Uncle</option>
|
|
<option value="Wife">Wife</option>
|
|
<option value="Other">Other</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-8">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="phone_second_emergency_contact" name="phone_second_emergency_contact" pattern="[0-9/-]{10,12}" maxlength="12" data-error='Enter a valid Phone Number' placeholder="Phone:555-555-5555" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row <?php if($_POST["fname_third_emergency_contact"]==""){echo 'hide_emergency_contact';}?> emergency_contact">
|
|
<div class="col-md-12">
|
|
<div class="form-subtitle2 pad-left"><label>Third Contact</label></div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
<div class="form-subtitle2">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="fname_third_emergency_contact" name="fname_third_emergency_contact" placeholder="First Name" data-error="Please insert the emergency contact's First Name" maxlength="40" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-subtitle2">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="sname_third_emergency_contact" name="sname_third_emergency_contact" placeholder="Last Name" data-error="Please insert the emergency contact's Second Name" maxlength="80" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group has-feedback">
|
|
<div class="form-subtitle2">
|
|
<select tabindex="<?php print_tab_index(); ?>" id="relationship3" name="3_emergencycontact_relationship" class="form-control selectpicker show-tick" title="Relationship" data-error="Please select the emergency contact Relationship">
|
|
<option value="rel">Relationship</option>
|
|
<option value="Aunt">Aunt</option>
|
|
<option value="Caretaker">Caretaker</option>
|
|
<option value="Daughter">Daughter</option>
|
|
<option value="Doctor">Doctor</option>
|
|
<option value="Ex-Husband">Ex-Husband</option>
|
|
<option value="Ex-Wife">Ex-Wife</option>
|
|
<option value="Father">Father</option>
|
|
<option value="Friend">Friend</option>
|
|
<option value="Granddaughter">Granddaughter</option>
|
|
<option value="Grandfather">Grandfather</option>
|
|
<option value="Grandmother">Grandmother</option>
|
|
<option value="Grandparent">Grandparent</option>
|
|
<option value="Grandson">Grandson</option>
|
|
<option value="Husband">Husband</option>
|
|
<option value="Mother">Mother</option>
|
|
<option value="Niece">Niece</option>
|
|
<option value="Neighbor">Neighbor</option>
|
|
<option value="Nephew">Nephew</option>
|
|
<option value="Nurse">Nurse</option>
|
|
<option value="Sibling">Sibling</option>
|
|
<option value="Son">Son</option>
|
|
<option value="Uncle">Uncle</option>
|
|
<option value="Wife">Wife</option>
|
|
<option value="Other">Other</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-8">
|
|
<div class="form-group has-feedback">
|
|
<input tabindex="<?php print_tab_index(); ?>" type="text" class="form-control" id="phone_third_emergency_contact" name="phone_third_emergency_contact" data-error='Enter a valid Phone Number' pattern="[0-9/-]{10,12}" maxlength="12" placeholder="Phone:555-555-5555" >
|
|
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="_add_contact">
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12"><label><a id="_a_add_contact" class="blue_big" >+Add Another Emergency Contact</a></label></div>
|
|
<div class="col-md-8">
|
|
<div class=" btn-to-continue">
|
|
<button tabindex="<?php print_tab_index(); ?>" id="complete_profile" class="btn btn-red-learnmore btn_ship">Complete Subscriber Profile Set Up</button>
|
|
<!-- <a href="<?php /*echo get_permalink($config['id_medical_thank']); */?>" class="btn btn-red btn_ship">Complete Profile Set Up</a>-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
jQuery(function(){
|
|
jQuery("#complete_profile").click(function(){$("form-payment").submit();});
|
|
new Cleave('#phone_first_emergency_contact', {
|
|
numericOnly: true,
|
|
blocks: [3, 3, 4],
|
|
delimiters: ['-']
|
|
});
|
|
new Cleave('#phone_second_emergency_contact', {
|
|
numericOnly: true,
|
|
blocks: [3, 3, 4],
|
|
delimiters: ['-']
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<?php include($ABS_path . "/footer.php");
|
|
get_footer(); ?>
|