<?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_login_title'); ?></p><!-- /.panel-title -->
		</header><!-- /.panel-heading text-center -->

		<div class="panel-body">
			<form id="pjTsLoginForm_<?php echo $index;?>" action="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjLoad&amp;action=pjActionLogin<?php echo isset($_GET['iframe']) ? '&amp;iframe' : NULL; ?>" method="post" class="form-horizontal pjTsForm pjTsFormAccess" data-toggle="validator" role="form">
				<input type="hidden" name="login" value="1" />
				
				<div class="row">
					<div class="form-group">
						<label for="" class="col-sm-3 control-label"><?php __('front_login_email'); ?></label>
					
						<div class="col-sm-6">
							<input type="email" name="login_email" class="form-control required validateEmail" data-msg-required="<?php echo $error_messages['log_email'];?>" data-msg-validateEmail="<?php echo $error_messages['log_email_inv'];?>"/>
					
							<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_login_password'); ?></label>
					
						<div class="col-sm-6">
							<input type="password" name="login_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">
						<div class="col-sm-9 col-sm-offset-3">
							<button type="submit" class="btn btn-default pjTsBtn pjTsBtnPrimary"><?php __('front_login_submit'); ?></button>
					
							<a href="#" class="btn btn-link pjTsBtn pjTsBtnLink pjTsForgotLink"><?php __('front_login_forgot'); ?></a>
						</div><!-- /.col-sm-9 col-sm-offset-3 -->
					</div><!-- /.form-group -->
					
					<?php
					if($tpl['option_arr']['o_allow_client_registrations'] == 'Yes')
					{
						?>
						<div class="form-group">
							<div class="col-sm-9 col-sm-offset-3">
								<span class="pjTsBtn"><?php __('front_new_client');?></span>&nbsp;<a href="#" class="btn btn-link pjTsBtn pjTsBtnLink pjTsCreateAccLink"><?php __('front_lnk_create_an_account'); ?></a>
							</div><!-- /.col-sm-9 col-sm-offset-3 -->
						</div><!-- /.form-group -->
						<?php
					} 
					?>
					
					<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 pjTsFormAccess -->
		</div><!-- /.panel-body -->
	</div><!-- /.panel panel-default pjTsBody -->
</div><!-- /.container-fluid pjTsContainer -->				