<?php
$index = $_GET['index'];
$error_messages = __('front_sys', true);
?>
<div class="container-fluid pjTsContainer">
	<?php include PJ_VIEWS_PATH . 'pjLoad/elements/header.php'; ?>
	<div class="panel panel-default pjTsBody">
		<header class="panel-heading text-center">
			<p class="panel-title"><?php __('front_menu_profile'); ?></p><!-- /.panel-title -->
		</header><!-- /.panel-heading text-center -->

		<div class="panel-body">
			<form id="pjTsProfileForm_<?php echo $index;?>" action="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjLoad&amp;action=pjActionProfile<?php echo isset($_GET['iframe']) ? '&amp;iframe' : NULL; ?>" method="post" class="form-horizontal pjTsForm pjTsFormProfile" data-toggle="validator" role="form">
				<input type="hidden" name="update_profile" value="1" />
				<input type="hidden" name="id" value="<?php echo $tpl['arr']['id'];?>" />
				
				<div class="row">
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_contact_name'); ?></label>
					
						<div class="col-sm-6">
							<input type="text" name="name" value="<?php echo pjSanitize::html($tpl['arr']['name']);?>" class="form-control required" data-msg-required="<?php echo $error_messages['contact_name'];?>"/>
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_contact_email'); ?></label>
					
						<div class="col-sm-6">
							<input type="email" name="email" value="<?php echo pjSanitize::html($tpl['arr']['email']);?>" class="form-control required validateEmail" data-msg-required="<?php echo $error_messages['contact_email'];?>" data-msg-validateEmail="<?php echo $error_messages['contact_email_inv'];?>" data-msg-remote="<?php echo $error_messages['duplicated_email'];?>"/>
					
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_password'); ?></label>
					
						<div class="col-sm-6">
							<input type="password" name="password" value="password" class="form-control required" data-msg-required="<?php echo $error_messages['log_pass'];?>"/>
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_website'); ?></label>
					
						<div class="col-sm-6">
							<input type="text" name="website" value="<?php echo pjSanitize::html($tpl['arr']['website']);?>" class="form-control" />
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_country'); ?></label>
					
						<div class="col-sm-6">
							<select name="country_id" class="form-control">
								<option value="">-- <?php __('lblChoose'); ?>--</option>
								<?php
								foreach ($tpl['country_arr'] as $k => $v)
								{
									if($v['id'] == $tpl['arr']['country_id'])
									{
									    ?><option value="<?php echo $v['id']; ?>" selected="selected"><?php echo pjSanitize::html($v['name']); ?></option><?php
									}else{
									    ?><option value="<?php echo $v['id']; ?>"><?php echo pjSanitize::html($v['name']); ?></option><?php
									}
								}
								?>
							</select>
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_state'); ?></label>
					
						<div class="col-sm-6">
							<input type="text" name="state" value="<?php echo pjSanitize::html($tpl['arr']['state']);?>" class="form-control" />
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_city'); ?></label>
					
						<div class="col-sm-6">
							<input type="text" name="city" value="<?php echo pjSanitize::html($tpl['arr']['city']);?>" class="form-control" />
						</div><!-- /.col-sm-6 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_address'); ?></label>
					
						<div class="col-sm-8">
							<input type="text" name="address" value="<?php echo pjSanitize::html($tpl['arr']['address']);?>" class="form-control" />
						</div><!-- /.col-sm-8 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_phone'); ?></label>
					
						<div class="col-sm-4">
							<input type="text" name="phone" value="<?php echo pjSanitize::html($tpl['arr']['phone']);?>" class="form-control" />
						</div><!-- /.col-sm-4 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_cell_phone'); ?></label>
					
						<div class="col-sm-4">
							<input type="text" name="cell_phone" value="<?php echo pjSanitize::html($tpl['arr']['cell_phone']);?>" class="form-control" />
						</div><!-- /.col-sm-4 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_label_fax'); ?></label>
					
						<div class="col-sm-4">
							<input type="text" name="fax" value="<?php echo pjSanitize::html($tpl['arr']['fax']);?>" class="form-control" />
						</div><!-- /.col-sm-4 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<div class="col-sm-9 col-sm-offset-3">
							<button type="submit" class="btn btn-default pjTsBtn pjTsBtnPrimary"><?php __('front_btn_save'); ?></button>
						</div><!-- /.col-sm-9 col-sm-offset-3 -->
					</div><!-- /.form-group -->
					<div class="form-group" style="display: none;">
						<div class="col-sm-9 col-sm-offset-3">
							<p id="pjTsMessage_<?php echo $index;?>" class=""></p>
						</div><!-- /.col-sm-6 col-sm-offset-3 -->
					</div><!-- /.form-group -->
				</div><!-- /.row -->
			</form><!-- /.form-horizontal pjTsForm pjTsFormProfile -->
		</div><!-- /.panel-body -->
	</div><!-- /.panel panel-default pjTsBody -->
</div><!-- /.container-fluid pjTsContainer -->					