<?php $__env->startSection('page_title'); ?>
    OSAA - Login
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
   OSAA Account Login
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent

    <style type="text/css">
    	.user-not-found {
    		margin: 0 0 2em 0;
    		padding: 2px 4px 2px 0;
    		border-right: 4px solid #990000;
    	}
    </style>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>
	$('.button').button();

	/* Display any success messages */
    $('.success_message').delay(5000).fadeOut({'duration' : 2500});
    $('.success_message .ui-icon-close').click(function ()
    {
        $('.success_message').hide();
    });

    /*
     * Flash the unknown email icon
     */
    function animateUnknownEmail(step)
    {
    	var element = $('.user-not-found img');
    	var delay = 0;

    	if (step < 2)
    	{
    		if (step == 1)
    		{
    			delay = 800;
    		}    		

    		element.delay(delay).animate({ 'background-color' : '#FF0000'}, 400, 'swing', function() { animateUnknownEmail(2) });
    	}
    	if (step == 2)
    	{
    		element.animate({ 'background-color' : '#ffffff'}, 500, 'linear', function () { animateUnknownEmail(1) });
    	}
    }
    animateUnknownEmail(0);


<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?>
    
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>    	
	<?php if (Session::get('success')): ?>
        <div class="success_message"><span class="ui-icon ui-icon-close box_icon"></span><span class="ui-icon ui-icon-check" style="display:inline-block;"></span><?php echo Session::get('success'); ?></div>
    <?php endif; ?>  

	<h1>Welcome</h1>
	<p>
		Please use the login form to gain access to the OSAA website.  You can also create an account if you don't have one already.
	</p>

	<div class="columns">
		<div class="half">
			<h2>Login</h2>

			<p>
				Login with your existing account.
			</p>			

			<?php echo Form::open(array('url' => url('/account/login'), 'class' => 'login')); ?>

				<?php if (Session::has('user-not-found') or Session::has('user-not-found-2')): ?>
					
					<?php echo Form::hidden('previous-attempt', Session::get('user-not-found')); ?>
				
				<?php endif; ?>

				<?php if (Session::has('errors')): ?>                
	                <div class="error ui-state-error">
	                	<span class="ui-icon ui-icon-alert box_icon"></span>
	                	<?php foreach ($errors->all() as $error): ?>
	                		<?php echo $error; ?>
	                	<?php endforeach; ?>
	               	</div>                        
	            <?php endif; ?>
	    		
				<?php echo Form::label('email', 'E-Mail Address', array('class' => 'input_label')); ?>
				<?php echo Form::text('email'); ?>

				<br /><br />

				<?php echo Form::label('password', 'Password', array('class' => 'input_label')); ?>
				<?php echo Form::password('password'); ?>

				<br /><br />

				<?php echo Form::checkbox('remember_me', 'true', true, array('class' => 'check_box')); ?> Remember me?

				<br />

				<?php echo Form::submit('Login', array('class' => 'submit button')); ?>

			<?php echo Form::close(); ?>

			<br />

			<div class="horizontal_divider"></div>

			<br />

			<p>
				<a href="<?php echo url('/account/recover'); ?>">I forgot my account information.</a>
			</p>

			<br />

			<b>Having Trouble Logging In?</b>
			<br />
			Are you a coach?  Are you looking for a login to update your online coaching certifications?<br />
			<div style="margin-left: 30px;">
				&raquo; <a href="<?php echo url('/coaches#requirements'); ?>">Coach's Login thru the NFHS Learning Center</a>
			</div>
			<br />
			<a href="http://www.nfhslearn.com" target="_blank" style="margin: 2em 0 0 30px;">
                <img src="<?php echo asset('images/icons/NFHSlearningcenter.jpg'); ?>" height="42px" border="0" />
            </a>

		</div>

		<div class="half">
			<?php if (Session::has('user-not-found-2') or Input::has('test')): ?>
				<div class="user-not-found">
					<img src="<?php echo asset('/images/icons/unknown_32px.png'); ?>" alt="" title="" style="float: left; vertical-align: middle; margin-right: 8px; margin-bottom: 0.5em;" />
					<h2 style="color: #990000; display: inline; line-height: 32px;">Unknown Email Address</h2>
					<br class="clear" />
					The email address you entered is not in the database.<br />
					<ul>
						<li class="small gray note">Please ensure you are using the same email address that you used when you registered your OSAA website user account.</li>
						<li class="small gray note">If you are attempting to take an online training course, your login may be associated with the <a href="http://www.nfhslearn.com" target="_blank">NFHS Learning Center</a>.</li>
					</ul>
				</div>
			<?php endif; ?>


			<h2>Register</h2>

			<p>
				If you are a school administrator, coach, or other website user, you'll need to create an account and attach yourself
				to a school to edit schedules, rosters, and to access forms. Setting up an account only takes a few seconds.
			</p>

			<h3>Here's what you'll need:</h3>
			<ul>
				<li><b>E-Mail Address</b><br /><span class="small gray note">All users must have a unique e-mail address which will be used in combination with a password to log you into your account.</span></li>

				<li><b>Password</b><br /><span class="small gray note">To secure your account, you will need a password.  Passwords must be 8-16 characters and can include letters, numbers, or special characters.</span></li>

				<li><b>School Key Code</b><br /><span class="small gray note">A school key code is used to attach yourself to a school. Your school administrator can provide you with your school's key code if you don't know it.</span></li>
			</ul>

			<br />

			<a href="<?php echo url('/account/register'); ?>">Register for a new account.</a>
		</div>

		<br class="clear" />

		<p class="small gray note">
			<br /><br /><br /><br /><br /><br /><br /><br />
			Please refer to the <a href="<?php echo url ('/privacy'); ?>">privacy policy</a> for additional information regarding data collection and information security.
		</p>


	</div>


	


	
<?php $__env->stopSection(); ?>