<div class="content login m-0-b">
	<div class="row section-title p-5-l p-5-r p-5-t p-0-b text-center">
		<div class="col">
			<h1 class="m-0-t font-weight-bold">Login into <span class="hidden-md hidden-lg hidden-xl"><br /></span>SPS E-Voting</h1>
			<p class="m-0-b">Login now to manage your online voting</p>
		</div>
	</div>
	
	<div class="row m-5-y">
		<div class="col-md-offset-4 col-md-4">
			<form class="form-horizontal registration-form" method="post" action="<?php echo base_url(); ?>login/index" id="login_form1">
				<input type="hidden" name="redirect" id="redirect" value="<?php echo ($redirect) ? $redirect : NULL; ?>" />
			
				<div class="box box-flat">
					<div class="box-body">
						<div class="row">
							<div class="col message <?php echo ($error) ? "fail" : NULL; ?> text-center" id="message" <?php echo ($error) ? "style=\"display:block;\"" : NULL; ?>>
							<?php echo ($error) ? $error : NULL; ?>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-xs-12 required registration-form-label">Email</label>
							<div class="col-xs-12">
								<input type="text" class="form-control validate[required, custom[email]] registration-form-input" name="useremail" id="email_login_input_2" value="" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-xs-12 required registration-form-label">Password</label>
							<div class="col-xs-12">
								<input type="password" class="form-control validate[required] registration-form-input" name="userpassword" id="password_login_input_2" value="" />
							</div>
						</div>
					</div>
					
					<div class="box-footer p-1-l p-1-r">
						<div class="flex-btn-group">
							<button type="submit" class="btn btn-success"><i class="fa fa-check"></i>&nbsp;Login</button>
							<a href="<?php echo base_url(); ?>" class="btn btn-danger"><i class="fa fa-backward"></i>&nbsp;Back</a>
						</div>
						
						<div class="text-center m-1-t"><a href="<?php echo base_url(); ?>login/forgotpassword">Forgot Password</a></div>
						<div class="text-center m-1-t">Don't have an account? <a href="<?php echo base_url(); ?>registration">Sign Up now for FREE!!!</a></div>
					</div>
				</div>
	
			</form>
		</div>
	</div>

	<!-- SIGN UP -->
	<div class="signup-button p-5-l p-5-r p-2-t p-2-b text-center">
		<a href="<?php echo base_url(); ?>registration" class="btn btn-success"><i class="fa fa-check"></i>&nbsp;Free Sign Up Now</a>
	</div>
</div>

<script>
$(function() {
	$('form#login_form1').off('submit').on('submit',function() {
		
		if ($(this).validationEngine('validate')) {
			var proceed = true;
			
			var email = $.trim(	$('#email_login_input_2').val()	);
			if(email == "") { proceed =  false; $('#email_login_input_2').validationEngine('showPrompt', 'Please enter Email', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			var password = $.trim(	$('#password_login_input_2').val()	);
			if(password == "") { proceed =  false; $('#password_login_input_2').validationEngine('showPrompt', 'Please enter Password', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			return true;
		} else {
			return false;
		}
		return true;
	});
});
</script>




























