<?php echo $this->render('admin/header.phtml'); ?>


<script type="text/javascript" language="javascript">

	$(document).ready(function () {
	
		<?php if( isset( $this->errorOldPassword ) ){ ?>
			alertify.error("<i class='fa fa-close'></i> <?php echo @Lib_Lang::translate(admin_account_oldpasserror); ?>");
		<?php } ?>
	
		<?php if( isset( $this->errorPassword ) ){ ?>
			alertify.error("<i class='fa fa-close'></i> <?php echo @Lib_Lang::translate(admin_account_newpasserror); ?>");
		<?php } ?>
		
	});

</script>

<div class="container">		

<?php echo $this->render('admin/menu.phtml'); ?>

	<div class="row">
		<div class="col-xs-12 col-sm-12 col-md-12">
			<h3><?php echo @Lib_Lang::translate(admin_account_top); ?><h3>
		</div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right"><?php echo @Lib_Lang::translate(admin_account_login); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><?php echo $this->escape($this->accountAdmin['admin_login']); ?></div>
	</div>
		
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right"><?php echo @Lib_Lang::translate(admin_account_firstname); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><?php echo $this->escape($this->accountAdmin['admin_firstname']); ?></div>
	</div>
		
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right"><?php echo @Lib_Lang::translate(admin_account_secondname); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><?php echo $this->escape($this->accountAdmin['admin_secondname']); ?></div>
	</div>
		
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right success"><?php echo @Lib_Lang::translate(admin_account_email); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><a href="mailto:<?php echo $this->escape($this->accountAdmin['admin_email']); ?>"><?php echo $this->escape($this->accountAdmin['admin_email']); ?></a></div>
	</div>
		
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right success"><?php echo @Lib_Lang::translate(admin_account_ins); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><?php echo $this->escape($this->accountAdmin['admin_ins']); ?></div>
	</div>
		
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right success"><?php echo @Lib_Lang::translate(admin_account_edit); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><?php echo $this->escape($this->accountAdmin['admin_edit']); ?></div>
	</div>
		
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right success"><?php echo @Lib_Lang::translate(admin_account_changepass); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><?php echo $this->escape($this->accountAdmin['admin_changepass']); ?></div>
	</div>
		
	<div class="row text-center"><hr /></div>
		
		


<script type="text/javascript" language="javascript">

	$(document).ready(function () {

		$('#formChangepass').validate({				
			errorClass: "formError",
			errorElement: "div",
			rules: {
				admin_pass_old: {
					required: true			
				},
				admin_pass_new: {
					required: true,
					minlength: 5,
					maxlength: 12				
				},
				admin_pass: { 
					equalTo: "#admin_pass_new"				
				}	
			},
			messages: {
				admin_pass_old: {
					required: "<?php echo @Lib_Lang::translate(admin_account_changepassoldreq); ?>"
				},
				admin_pass_new: {
					required: "<?php echo @Lib_Lang::translate(admin_account_changepassnewreq); ?>",
					minlength: "<?php echo @Lib_Lang::translate(admin_account_changepassnewmin); ?>",
					maxlength: "<?php echo @Lib_Lang::translate(admin_account_changepassnewmax); ?>"
				},
				admin_pass: { 
					equalTo: "<?php echo @Lib_Lang::translate(admin_account_changepassequal); ?>"				
				}			
			}
		});
	
	});

</script>
		
	<form id="formChangepass" method="post">

	<div class="row">	
		<div class="col-xs-12 col-sm-12 col-md-12">
			<h3><?php echo @Lib_Lang::translate(admin_account_changepasstop); ?><h3>
		</div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right formLabelMarginTop"><?php echo @Lib_Lang::translate(admin_account_changepassold); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><input id="admin_pass_old" name="admin_pass_old" class="form-control" type="password" /></div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right formLabelMarginTop"><?php echo @Lib_Lang::translate(admin_account_changepassnew); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><input id="admin_pass_new" name="admin_pass_new" class="form-control" type="password" /></div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right formLabelMarginTop"><?php echo @Lib_Lang::translate(admin_account_changepassnewrep); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><input id="admin_pass" name="admin_pass" class="form-control" type="password" /></div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right"></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><input name="admin_changepass" class="btn btn-info form-control" type="submit" value="<?php echo @Lib_Lang::translate(admin_account_changepassbutton); ?>" /></div>
	</div>
	
	</form>	
		
</div>

<?php echo $this->render('admin/footer.phtml'); ?>