<?php
/**
 * Created by PhpStorm.
 * User: roysinclair
 * Date: 2016/02/29
 * Time: 8:33 AM
 */

//20190510 - Included the layout in wizard steps. - Gael

$stepData = "";
if (isset($_SERVER["QUERY_STRING"])) {
    $QUERY_STRING = $_SERVER["QUERY_STRING"];

    if (isset($_COOKIE[$QUERY_STRING])) {
        $stepData = json_decode($_COOKIE[$QUERY_STRING]);
    }
    
}

$Physical_Address_1 ="";
$Physical_Address_2 ="";
$Physical_Suburb ="";
$Physical_Province ="";
$Physical_Code ="";
$postalAddress ="";
$Postal_Address_1 ="";
$Postal_Address_2 ="";
$Postal_Suburb ="";
$Postal_Province ="";
$Postal_Code ="";
$Telephone_Work ="";
$Telephone_Home ="";
$Telephone_Mobile ="";

if (isset($stepData) && $stepData != "") {

    $Physical_Address_1 =  (isset($stepData->Physical_Address_1) ? $stepData->Physical_Address_1: "") ;
    $Physical_Address_2 =  (isset($stepData->Physical_Address_2) ? $stepData->Physical_Address_2: "") ;
    $Physical_Suburb =  (isset($stepData->Physical_Suburb) ? $stepData->Physical_Suburb: "") ;
    $Physical_Province =  (isset($stepData->Physical_Province) ? $stepData->Physical_Province: "") ;
    $Physical_Code =  (isset($stepData->Physical_Code) ? $stepData->Physical_Code: "") ;
    $postalAddress =  (isset($stepData->postalAddress) ? $stepData->postalAddress: "") ;
    $Postal_Address_1 =  (isset($stepData->Postal_Address_1) ? $stepData->Postal_Address_1: "") ;
    $Postal_Address_2 =  (isset($stepData->Postal_Address_2) ? $stepData->Postal_Address_2 : "") ;
    $Postal_Suburb =  (isset($stepData->Postal_Suburb) ? $stepData->Postal_Suburb : "") ;
    $Postal_Province =  (isset($stepData->Postal_Province) ? $stepData->Postal_Province : "") ;
    $Postal_Code =  (isset($stepData->Postal_Code) ? $stepData->Postal_Code : "") ;
    $Telephone_Work =  (isset($stepData->Telephone_Work) ? $stepData->Telephone_Work : "") ;
    $Telephone_Home =  (isset($stepData->Telephone_Home) ? $stepData->Telephone_Home : "") ;
    $Telephone_Mobile =  (isset($stepData->Telephone_Mobile) ? $stepData->Telephone_Mobile : "") ;
}


$WizardContent = "
    <h1 class='text-left hFont'>Contact Information</h1>
    <h5 class='text-left'>We’d like to keep in touch. Prefer to have your statements posted? Let us know. </h5>

    <form role='form' id='sa-natural-contact'>
        <div class='form-body padding-top35px'>
            <div class='form-group ' id='Physical-Address-1' >
                <label for='form_control_1'>Physical Address <span class='required' aria-required='true'>*</span></label>
                <span class='help-block hiddenContent'></span>
                <textarea type='text' class='form-control input-lg' value='$Physical_Address_1' row='3'></textarea>
                
            </div>

            <!-- <div class='form-group form-md-line-input-signup' id='Physical-Address-2'>
                <label for='form_control_1'>Physical Address </label>
                <span class='help-block hiddenContent'></span>
                <input type='text' class='form-control input-lg' value='$Physical_Address_2'  >
                
            </div> -->

            <div class='form-group form-md-line-input-signup' id='Physical-Suburb' >
                <label for='form_control_1'>Suburb/City <span class='required' aria-required='true'>*</span></label>
                <span class='help-block hiddenContent'></span>
                <input type='text' class='form-control input-lg' value='$Physical_Suburb'>
                
            </div>

            <div class='form-group form-md-line-input-signup' id='Physical-Province' >
                <label for='form_control_1'>Residential Province <span class='required' aria-required='true'>*</span></label>
                <span class='help-block hiddenContent'></span>
                <input type='text' class='form-control input-lg' value='$Physical_Province'>
                
            </div>

            <div class='form-group form-md-line-input-signup' id='Physical-Code' >
                <label for='form_control_1'>Postal Code <span class='required' aria-required='true'>*</span></label>
                <span class='help-block hiddenContent'></span>
                <input type='numbers' class='form-control input-lg' value='$Physical_Code'>
                
            </div>

            <div class='form-group form-md-line-input-signup'>
                <div class='col-md-10'>
                    <div class='md-checkbox-inline'>
                        <div class='md-checkbox'>
                            <input type='checkbox' id='postalAddress' name='signIn' class='md-check'>
                            <label for='postalAddress' >Postal and residential address the same ?
                                <span class='inc' ></span>
                                <span class='check'></span>
                                <span class='box'></span> </label>
                        </div>
                    </div>
                </div>
            </div>

            <div class='clearfix margin-bottom-40'></div>

            <!-- VISIBLE UNTIL postalAddress ? is CLICKED -->
            <div id='postalAddressContent'>
                <div class='form-group form-md-line-input-signup' id='Postal-Address-1' >
                    <label for='form_control_1'>Postal Address </label>
                    <span class='help-block hiddenContent'></span>
                    <textarea type='text' class='form-control input-lg' value='$Postal_Address_1' row='3'></textarea>
                    
                </div>

                <!-- <div class='form-group form-md-line-input-signup' id='Postal-Address-2' >
                    <label for='form_control_1'>Postal Address line 2</label>
                    <span class='help-block hiddenContent'></span>
                    <input type='text' class='form-control input-lg' value='$Postal_Address_2'>
                    
                </div> -->

                <div class='form-group form-md-line-input-signup ' id='Postal-Suburb' >
                    <label for='form_control_1'>Suburb/City</label>
                    <span class='help-block hiddenContent'></span>
                    <input type='text' class='form-control input-lg' value='$Postal_Suburb'>
                    
                </div>

                <div class='form-group form-md-line-input-signup' id='Postal-Province' >
                    <label for='form_control_1'>Postal Province <span class='required' aria-required='true'>*</span></label>
                    <span class='help-block hiddenContent'></span>
                    <input type='text' class='form-control input-lg' value='$Postal_Province'>
                    
                </div>

                <div class='form-group form-md-line-input-signup' id='Postal-Code' >
                    <label for='form_control_1'>Postal Code <span class='required' aria-required='true'>*</span></label>
                    <span class='help-block hiddenContent'></span>
                    <input type='numbers' class='form-control input-lg' value='$Postal_Code'>
                    
                </div>
            </div>
            <!-- END: VISIBLE UNTIL postalAddress ? is CLICKED -->

            <div class='form-group form-md-line-input-signup' id='Telephone-Work' >
                <label for='form_control_1'>Telephone Work</label>
                <span class='help-block hiddenContent'></span>
                <input type='text' class='form-control input-lg' value='$Telephone_Work' id='mask_phone_work'>
                
            </div>

            <div class='form-group form-md-line-input-signup' id='Telephone-Home' >
                <label for='form_control_1'>Telephone Home</label>
                <span class='help-block hiddenContent'></span>
                <input type='text' class='form-control input-lg' value='$Telephone_Home' id='mask_phone_home'>
                
            </div>

            <div class='form-group form-md-line-input-signup' id='Telephone-Mobile' >
                <label for='form_control_1'>Telephone Mobile <span class='required' aria-required='true'>*</span></label>
                <span class='help-block hiddenContent'></span>
                <input type='text' class='form-control input-lg' value='$Telephone_Mobile' id='mask_phone_mobile'>
                
            </div>
        </div>
        <div class='form-actions noborder  button-right text-center'>
            <div class='padding-top52px'></div>
            <a href='#'class='padding-right'>
                <button type='button' class='btn purple btn-lg' id='saveData'>Continue</button>
            </a>
        </div>

        <div class='form-actions noborder '>
            <div class='padding-top52px'></div>
            <a href='#' class='padding-left'>
                <button type='button' class='btn white btn-lg' id='backButton'>Back</button>
            </a>
        </div>

        <div class='form-actions noborder hidden' id='updateContact'>
            <div class='padding-top52px'></div>
            <a href='#'>
                <button type='button' class='btn white btn-lg' id='updateButton'>Update</button>
            </a>
        </div>
    </form>
    <div class='padding-bottom-100px'> </div>
";

require("layout_basic.php");
?>

