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

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

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


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

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

	$('#dialog-confirm').dialog({
      autoOpen: false,
      resizable: false,
      height:200,
      modal: true,
      buttons: {
        "Yes": function() {
          
          $('#recovery').submit();

          $(this).dialog("close");

          return true;
        },
        Cancel: function() {
          $(this).dialog( "close" );
          return false;
        }
      }
    });  

    $('#recovery').submit (function ()
    {
    	if ($('#email').val() != '')
    	{
	    	var dia = $('#dialog-confirm');

	    	if (dia.dialog('isOpen'))
	    	{
	    		return true;
	    	}
	    	else
	    	{
	    		dia.dialog('open');
	    	}    	
    	}	


    	return false;
	});

	/* Display any success messages */
    $('.success_message').delay(5000).fadeOut({'duration' : 2500});
    $('.success_message .ui-icon-close').click(function ()
    {
        $('.success_message').hide();
    });
<?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; ?>  

    <br />

    <div class="error ui-state-error" style="padding: 1em 1em; font-size: 12pt;"><span class="ui-icon ui-icon-info box_icon"></span> <b>NOTE:</b> The website will e-mail you your password immediately.  Be sure to check your junk/spam folders if you do not see the e-mail come through to your inbox.</div>


	<h1>Reset Password</h1>
	
	<p>
		For security purposes, passwords are one-way encrypted so they cannot be recovered from our database.  Instead, if you forgot your account password, you can use this form to request the system to reset your password.  In this case, you will receive a temporary password that you can use to login.  After logging in with the temporary password, you will be prompted to enter in a new password.
	</p>	

	<div class="columns">
		<div class="half">
			
			<h2>Request Temporary Password</h2>	

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

			<?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', 'style' => 'width:150px;')); ?>
			<?php echo Form::text('email', null, array('style' => 'width:200px;')); ?>

			<br /><br />		

			<?php echo Form::submit('Recover', array('class' => 'submit button', 'style' => 'margin-left:357px;')); ?>


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

			

		</div>

		<div class="half">
			<p>
				<div class="error ui-state-hover" style="padding:2px 4px;"><span class="ui-icon ui-icon-alert box_icon"></span> <b>Warning:</b> This form will reset your password.  This process cannot be undone after you click "Recover."</div>
			</p>			
		</div>

		<br class="clear" /><br />		
		

		<h4>Temporary passwords</h4>
		<p>
			Your temporary password will be e-mailed to the address you enter above.  This e-mail address must be associated with your user account.  You can repeat this process multiple times, if needed.  The most recently sent password is the only password that will work to recover your account.
		</p>

	</div>

	<div id="dialog-confirm" title="Recover password?" style="display:none;">
	    <p>
	    	<span class="ui-icon ui-icon-alert box_icon"></span>
	    	Are you sure you want to recover your password?
	   	</p>
	</div>

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