Location: PHPKode > projects > SimpleHRM > simplehrm-1.0-beta1/simplehrm-1.0-beta1/templates/default/admin/userlogin.tpl.html
{* notag *}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Log in · Demo Admin</title>
{assign var=css value=$util->get_values_from_config('ADMIN_THEME')}
<link rel="stylesheet" type="text/css" href="##LBL_SITE_URL##templates/css_theme/css/{$css.css}.css" />
<script type="text/javascript" src="##JS_PATH_EXT##jquery/jquery.js"></script>
<script type="text/javascript" src="##JS_PATH##libsext/jquery/jquery.validate.js"></script>
<script type="text/javascript" src="##LBL_SITE_URL##templates/flexyjs/flexymessage.js"></script>
{literal}
<script type="text/javascript">
$(document).ready(function() {
	$('#uname').focus();	
});
function open_div() {
	document.getElementById('forgot_pass').style.display='';
	document.getElementById('inner_div').style.display='none';
	$('#adm_mess').html('');
	$('#usr_name').val('');
}
function open_log_div() {
	if(document.getElementById('inner_div').style.display =='none') {
		document.getElementById('forgot_pass').style.display='none';
		document.getElementById('inner_div').style.display='';
	}else {
		return false;
	}
}
function validate_login(){
	var validator=$("#login_form").validate({
	   	rules: {
		   	username: {
				required:true
			},
			password:{
				required: true,
				minlength: 6
			}
		},
		messages: {
			username:{
				required:flexymsg.required

			},
			password:{
				required:flexymsg.required,
				minlength:flexymsg.minlength
			}
		}
	});
	x=validator.form();
	return x;
}
function forgot_pass() {
	var url="##LBL_ADMIN_SITE_URL##index.php";
	var usr_name = $('#usr_name').val();
	var validator=$("#lost_pass").validate({
	   	rules: {
			usr_name: {
				required:true
			}
		},
		messages: {
			usr_name:{
				required:flexymsg.required
			}
		}
	});
	x=validator.form();
	if(x) {
      		$.post(url,{"page":"user","ce":"0","choice":"recover_pass","usr_name":usr_name},function(res){
			open_log_div();
			$('#adm_mess').html(res);
		});
	}
}
</script>
{/literal}
</head>
    <body id="login">

		<div class="box box-50 altbox">
			<div class="boxin">
				<div class="header">
					<h3>Flexy Admin</h3>
					<ul>
						<li><a href="javascript:void(0);" onclick="return open_log_div();">login</a></li><!-- .active for active tab -->
						<li><a href="javascript:void(0);" onclick="open_div();">lost password</a></li>
					</ul>
				</div>
                <div id="adm_mess" align="center">
                </div>		
				<div class="inner-form" id="inner_div">
				   <form class="table" id="login_form" action="##LBL_SITE_URL##index.php/page-user-choice-set_login-ce-0" method="post" onsubmit="return validate_login();"><!-- Default forms (table layout) set_login  LBL_ADMIN_SITE_URL-->
                	<input type="hidden" name="admin_st" id="admin_st" value="1" />
						<div class="msg msg-info">
							<p>Just click <strong>Log in</strong>.</p>
						</div>
                        {myinclude file="common/messages" module="global"}
						<table cellspacing="0">
							<tr>
								<th><label for="some1">Username:</label></th>
								<td><input class="txt" type="text" id="uname" name="username" /></td>
							</tr>
							<tr>
								<th><label for="some3">Password:</label></th>
								<td><input class="txt pwd" type="password" id="pass" name="password" /></td><!-- class error for wrong filled inputs -->
							</tr>
							<tr>
								<th></th>
								<td class="tr proceed">
									<input class="button" type="submit" value="Log in" />
								</td>
							</tr>
						</table>
                   		</form>
		         </div>
		
                    <div id="forgot_pass" style="display:none">
			<form id="lost_pass">
						<table cellspacing="0">
							<tr>
                                    <div class="msg msg-info">
                                        <p><strong>Enter your username</strong></p>
                                    </div>
								<td><input class="txt" type="text" id="usr_name" name="usr_name" /></td><!-- class error for wrong filled inputs -->
							</tr>
							<tr>
								<td class="tl proceed"><input class="button" type="button" value="Submit" onclick="return forgot_pass();"/>
								</td>
							</tr>
						</table>
			</form>
                    </div>			
			</div>
		</div>
    </body>
</html>
Return current item: SimpleHRM