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

<?php $__env->startSection('page_sub_title'); ?>    
	<?php echo $information['form_name']; ?>
<?php $__env->stopSection(); ?>

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

    <style type="text/css">    	

    	/* Success Bar */
    	.success_bar {
    		position: fixed;
    		top: 600px;
    		left: 0;
    		width: 100%;
    		padding: 0.25em 0;
    		line-height: 1.5em;
    		background-color: rgba(176, 255, 190, 0.0);
    		border-bottom: 2px solid rgba(13, 88, 27, 0.50);
    		border-top: 2px solid rgba(13, 88, 27, 0.50);
    		z-index: 500;
    	}

    	.success_bar .message {
    		width: 1200px;
    		margin: 0 auto;
    		font-size: 14pt;
    		color: #151515;
    	}

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

<?php $__env->startSection('jquery_init'); ?>
	$('.button').button();	
	$('.button.close').button({ icons : { primary : 'ui-icon-circle-close'}});	
	$('.tooltip').tooltip();	 	
	
	
	// Success bar
	$('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function ()
	{		
		$(this).delay(6000).fadeOut(4000);	

		$(this).hover(function ()
		{
			$(this).stop(true).css('opacity', '1.0');
		},
		function ()
		{
			$(this).fadeOut(4000);
		})
	});
   
<?php $__env->stopSection(); ?>

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

	<a href="<?php echo $information['return_url']; ?>" class="button close tooltip" style="font-size:9pt;" title="Discard any unsaved changes and close this form.">Close</a>			

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


<?php $__env->startSection('main_content'); ?>    
	
	<?php /*  Success Bar  */ ?>
 	<?php if (Session::has('success')): ?>
		<div class="success_bar">
			<div class="message">				
				<?php echo Session::get('success'); ?>
			</div>			
		</div>
	<?php endif; ?>  

	<?php if ($information['is_past_due']): ?>
		<div class="online_form_late ui-state-error ui-corner-all">
			<span class="ui-icon ui-icon-alert" style="display:inline-block; position:relative; top:2px;"></span>
			This form was due by <?php echo date('g:i A l, F j, Y', strtotime($information['seasonal_school_form']->due_at)); ?> and is now past the deadline.  Please submit your entries now before the form closes and becomes unavailable.
		</div>
	<?php endif; ?>

	<img src="<?php echo asset('images/icons/checklist_64px.png'); ?>" alt="" title="" style="float: left; width: 64px; height: 64px; margin-right: 1em;" />
	
	<?php if (!is_null($information['submission'])): ?>

		<div class="float_right" style="width: 325px; height: 4em; position: relative; top: 0; text-align: right; color: #7d7b7d;">
			Form entries created at <?php echo date('g:i a m/d/Y', strtotime($information['submission']->created_at)); ?>.<br />
			Last updated at <?php echo date('g:i a m/d/Y', strtotime($information['submission']->updated_at)); ?><br />
			by <?php echo $information['submission']->user_first_name; ?> <?php echo $information['submission']->user_last_name; ?>.
		</div>

	<?php endif; ?>

	<?php
		switch($information['seasonal_school_form']->season)
		{
			case 'F': $season = 'Fall'; break;
			case 'W': $season = 'Winter'; break;
			case 'S': $season = 'Spring'; break;
			default: $season = '';
		}
	?>

	<h1 style="padding-top: 1em;"><?php echo $season; ?> Activity Program Preselection for <?php echo $information['seasonal_school_form']->school_year + 1; ?>-<?php echo substr($information['seasonal_school_form']->school_year, 2, 2) + 2; ?></h1>

	<br /><br />

	<div class="online_form_instructions ui-corner-all">
		<span class="ui-icon ui-icon-info" style="display:inline-block; position:relative; top:2px;"></span>
		<b>Instructions</b> <br />
		<ol>			
			<li>Please check the boxes of the <?php echo strtolower($season); ?> sports / activities that your school plans to offer <b>next year (<?php echo $information['seasonal_school_form']->school_year + 1; ?>-<?php echo substr($information['seasonal_school_form']->school_year, 2, 2) + 2; ?>.)</b></li>
			<li>If your school does not plan to offer any <?php echo strtolower($season); ?> sports or activities, please select the check-box at the bottom.</li>			
			<li>The selections below are based on the information we have for the current school year.</li>
			<li>This information will be used to create special district assignments and will be used to compute the <b>total participation fee</b> for your school for next year.</li>
			<li>When finished, click <b>Submit</b> to turn in this form with the entries provided.  You will receive an e-mail with confirmation.</li>						
			<li><b>Note:</b> All entries must be submitted by <?php echo date('g:i A l, F j, Y', strtotime($information['seasonal_school_form']->due_at)); ?> using this online form.</li>
		</ol>

		<br />

		For questions, contact <?php echo $information['staff']->first_name; ?> <?php echo $information['staff']->last_name; ?> at (503) 682-6722 x228 or by e-mail to <?php echo Helpers::obfuscateEmailLink ($information['staff']->email); ?>.  For technical assistance, you can email <?php echo Helpers::obfuscateEmailLink ("support@osaa.org"); ?>.
	</div>		

	<br />			

	<?php if (Session::has('errors')): ?>                
        <div class="ui-state-error" style="padding: 2px 4px;">
			<span class="ui-icon ui-icon-alert" style="display:inline-block; position:relative; top:2px;"></span>
        	<?php foreach ($errors->all() as $error): ?><?php echo $error; ?> <?php endforeach; ?>
        </div>
        <br />
    <?php endif; ?>        
	
	<?php echo Form::open(array('url'    => url('/forms/submit'),
					    'method' => 'post')); ?>

		<?php echo Form::hidden('form', 'PRESELECTION'); ?>		
		<?php echo Form::hidden('school', $information['school']->id); ?>
		<?php echo Form::hidden('seasonal_school_form', $information['seasonal_school_form']->id); ?>
		<?php echo Form::hidden('season', $information['seasonal_school_form']->season); ?>

		<br />

		<?php foreach ($information['activities'][strtolower($season)] as $slug => $name): ?>

			<div style="width: 180px; height: 2em;">
				<?php echo Form::label($slug, $name, array('style' => 'font-weight: bold; margin-right: 0.5em;')); ?>
				<?php echo Form::checkbox($slug, true, (!is_null($information['school']->getActivityInvolvement($slug))), array('style' => 'float: right; position: relative; top: 2px;')); ?>
			</div>

		<?php endforeach; ?>						

		<br /><br />

		<div style="width: 415px; height: 2em;">
			<?php echo Form::label('none', 'We do not plan to offer any ' . strtolower($season) . ' sports or activities.', array('style' => 'font-weight: bold; margin-right: 0.5em;')); ?>
			<?php echo Form::checkbox('none', true, false, array('style' => 'float: right; position: relative; top: 2px;')); ?>
		</div>

		<br />

		<div class="horizontal_divider" style="width: 100%;"></div><br />

		<?php echo Form::submit('Submit', array('class' => 'button float_right',
									    'style' => 'font-size: 10pt;')); ?>						
					
	<?php echo Form::close(); ?>

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

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

