<div class="container-fluid pjCrContainer">
	<?php include_once dirname(__FILE__) . '/elements/menu.php';?>
	<div class="panel panel-default">
		<div class="panel-heading clearfix pjCrHeading">
        	<div class="row">
        		<div class="col-xs-12 pjCrHeadTitle"><?php __('front_menu_profile');?></div>
        	</div>
        </div>
		<?php 
        $client_account_required = __('client_account_required', true);
        $title_arr = pjUtil::getTitles();
        $name_titles = __('personal_titles', true, false);
        $FORM =  @$_SESSION[$controller->defaultClient];
        $months = __('months', true);
        $short_months = __('short_months', true);
        ksort($months);
        ksort($short_months);
        $days = __('days', true);
        $short_days = __('short_days', true);
        $week_start = isset($tpl['option_arr']['o_week_start']) && in_array((int) $tpl['option_arr']['o_week_start'], range(0,6)) ? (int) $tpl['option_arr']['o_week_start'] : 0;
        ?>
        <div id="pjCrCalendarLocale" style="display: none;" data-months="<?php echo implode("_", $months);?>" data-days="<?php echo implode("_", $short_days);?>" data-fday="<?php echo $week_start;?>"></div>
		<div class="panel-body pjCrBody">
			<div class="row">
				<div class="col-sm-6 col-sm-offset-3">
					<form action="#" class="pjCrForm pjCrFormRegisterForm" id="pjCrProfileForm_<?php echo $controller->_get->toString('index');?>" method="post">
        				<input type="hidden" name="client_profile" value="1" />
        				<input type="hidden" name="foreign_id" value="<?php echo @$FORM['foreign_id'];?>" />
                		<div class="row form-group">
                			<label class="col-sm-4 control-label"><?php __('front_client_email'); ?><span class="asterisk">*</span></label><!-- /.col-sm-4 -->
                
                			<div class="col-sm-8">
                				<input type="text" name="customer_email" value="<?php echo isset($FORM['email']) ? pjSanitize::html($FORM['email']) : NULL; ?>" class="form-control email required" data-msg-required="<?php echo $client_account_required['email']; ?>" data-msg-email="<?php echo $client_account_required['invalid_email']; ?>" data-msg-remote="<?php echo pjSanitize::html(__('front_email_exists', false)); ?>" />
                				<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
                			</div><!-- /.col-sm-8 -->
                		</div><!-- /.row -->
                		<div class="row form-group">
                			<label class="col-sm-4 control-label"><?php __('front_client_password'); ?><span class="asterisk">*</span></label><!-- /.col-sm-4 -->
                
                			<div class="col-sm-8">
                				<input type="password" name="customer_password" value="<?php echo isset($FORM['password']) ? pjSanitize::html($FORM['password']) : NULL; ?>" class="form-control required" data-msg-required="<?php echo $client_account_required['password']; ?>"/>
                				<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
                			</div><!-- /.col-sm-8 -->
                		</div><!-- /.row -->
                		
                		<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_title'); ?><span class="asterisk">*</span></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<select name="customer_title" class="form-control required" data-msg-required="<?php echo $client_account_required['title']; ?>">
        							<option value="">-- <?php __('lblChoose'); ?>--</option>
        							<?php
                					foreach ($title_arr as $v)
                					{
                					    ?><option value="<?php echo $v; ?>" <?php echo isset($FORM['customer_title']) && $FORM['customer_title'] == $v ? 'selected="selected"' : '';?>><?php echo pjSanitize::html($name_titles[$v]); ?></option><?php
                					}
                					?>
        						</select>
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
                		
                		<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_fname'); ?><span class="asterisk">*</span></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_fname" value="<?php echo isset($FORM['fname']) ? pjSanitize::html($FORM['fname']) : NULL; ?>" class="form-control required" data-msg-required="<?php echo $client_account_required['fname']; ?>">
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_lname'); ?><span class="asterisk">*</span></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_lname" value="<?php echo isset($FORM['lname']) ? pjSanitize::html($FORM['lname']) : NULL; ?>" class="form-control required" data-msg-required="<?php echo $client_account_required['lname']; ?>">
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
                		<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_phone'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_phone'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_phone" value="<?php echo isset($FORM['phone']) ? pjSanitize::html($FORM['phone']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_phone'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['phone']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_driver_license_number'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_driver_license_number'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_driver_license" value="<?php echo isset($FORM['customer_driver_license']) ? pjSanitize::html($FORM['customer_driver_license']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_driver_license_number'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['driver_license']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_birthday'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_birthday'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<div id="pjCrDateBirthday" class="input-group pjCrDatePicker pjCrDateBirthday">
									<span class="input-group-addon pjCrCursorPointer">
										<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
									</span>

									<input type="text" id="customer_birthday" name="customer_birthday" class="form-control <?php echo ($tpl['option_arr']['o_bf_include_birthday'] == 3) ? ' required' : NULL; ?>" value="<?php echo isset($FORM['customer_birthday']) && !empty($FORM['customer_birthday']) ? date($tpl['option_arr']['o_date_format'], strtotime($FORM['customer_birthday'])) : '';?>" readonly="readonly" data-msg-required="<?php echo $client_account_required['birthday']; ?>"/>
								</div><!-- /.input-group pjCrDatePicker pjCrDateBirthday -->
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_company_name'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_company'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_company" value="<?php echo isset($FORM['customer_company']) ? pjSanitize::html($FORM['customer_company']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_company'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['company']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_address'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_address'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_address_1" value="<?php echo isset($FORM['customer_address_1']) ? pjSanitize::html($FORM['customer_address_1']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_address'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['address']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_city'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_city'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        					
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_city" value="<?php echo isset($FORM['customer_city']) ? pjSanitize::html($FORM['customer_city']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_city'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['city']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_state'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_state'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_state" value="<?php echo isset($FORM['customer_state']) ? pjSanitize::html($FORM['customer_state']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_state'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['state']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_zip'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_zip'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<input type="text" name="customer_zip" value="<?php echo isset($FORM['customer_zip']) ? pjSanitize::html($FORM['customer_zip']) : NULL; ?>" class="form-control<?php echo $tpl['option_arr']['o_bf_include_zip'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['zip']; ?>" />
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_country'); ?><?php if ((int) $tpl['option_arr']['o_bf_include_country'] === 3) : ?><span class="asterisk">*</span><?php endif; ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<select name="customer_country" class="form-control<?php echo $tpl['option_arr']['o_bf_include_country'] == 3 ? ' required' : NULL; ?>" data-msg-required="<?php echo $client_account_required['country']; ?>">
        							<option value="">-- <?php __('booking_country'); ?>--</option>
        							<?php
        							if (isset($tpl['country_arr']) && is_array($tpl['country_arr']))
        							{
        								foreach ($tpl['country_arr'] as $v)
        								{
        								    ?><option value="<?php echo $v['id']; ?>" <?php echo isset($FORM['customer_country']) && $FORM['customer_country'] == $v['id'] ? 'selected="selected"' : '';?>><?php echo pjSanitize::html($v['name']); ?></option><?php
        								}
        							}
        							?>
        						</select>
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label"><?php __('front_client_notes'); ?></label><!-- /.col-sm-4 -->
        
        					<div class="col-sm-8">
        						<textarea name="customer_notes" cols="30" rows="10" class="form-control"><?php echo isset($FORM['customer_notes']) ? pjSanitize::html($FORM['customer_notes']) : NULL; ?></textarea>
        						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
        					</div><!-- /.col-sm-8 -->
        				</div><!-- /.row -->
        				
        				<div class="row form-group">
        					<label class="col-sm-4 control-label">&nbsp;</label><!-- /.col-sm-4 -->
        					<div class="col-sm-8">
        						<input type="submit" value="<?php __('front_button_register', false, true); ?>" class="btn btn-default pjCrBtn pjCrBtntDefault" />
        					</div>
        				</div>
                		
                		<div class="row pjCrProfileMsg" style="display: none;">
            				<div class="col-xs-12 " >
    							<div class="form-group">
    								<div class="alert"></div>
    							</div>
    						</div>
    					</div>
						
        			</form>
				</div>
			</div>
		</div><!-- /.panel-body pjCrBody -->
	</div><!-- /.panel panel-default -->
</div><!-- /.container-fluid pjCrContainer -->