<?php if (count($info['activity_programs']) > 0): ?>

	<img src="<?php echo asset('images/icons/plus_one_64px.png'); ?>" alt="" title="" class="float_right" style="margin: 5px 5px 5px 10px;" />

	<h2 style="color: #1C43A6; font-size: 12pt; margin-top: 0.5em;">Create a New Cooperation</h2>
	
	<br />

	This form is used to create a new coop where <?php echo $info['school']->short_name; ?> will be the host school (the school listed first.)  	

	<br /><br />

	<div class="online_form_instructions ui-corner-all small">
		If you do not want <?php echo $info['school']->short_name; ?> to be listed first, go to the other school's page and click <b>Add Coop</b>.  To modify or change an existing coop, please contact Gibby.
	</div>

	<br />

	<b>The following actions will be preformed in the database:</b>
	<br />
	<ul style='margin-left: 4em; font-size: 9pt;'>
		<li>Delete all contests/meets involving the other school's selected activity program, if any</li>
		<li>Delete all events linked to the other school's activity program, if any</li>
		<li>Delete all teams associated with the other school's activity program, if any</li>
		<li>Create a new coop record</li>
		<li>Update this school's activity program</li>
		<li>Update both schools' school offering records</li>		
		<li>Rename all contests/meets involving this new coop</li>
	</ul>		

	<br />

	<?php echo Form::open(array('url' => '/schools/' . $info['school']->id . '/coops/new', 'style' => 'width: 100%;')); ?>

		<?php echo Form::hidden('school_id', $info['school']->id); ?>

		<div style="float: left; width: 50%;">
			
			<span style="font-weight: bold;">
				Host School
			</span><br />
			
			<?php echo $info['school']->short_name; ?> <small>(<?php echo $info['school']->id; ?>)</small>
			
		</div>
		
		<div style="float: left; width: 50%;">

			<?php echo Form::label('school_2', 'Other School', array('style' => 'font-weight: bold;')); ?>
			<small>(school listed second)</small><br />
			<?php echo Form::select('school_2', $info['schools'], null, array('style' => '')); ?>			

		</div>

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

		<div style="float: left; width: 50%;">

			<?php echo Form::label('activity_program', 'Activity', array('style' => 'font-weight: bold;')); ?><br />
			<?php echo Form::select('activity_program', $info['activity_programs'], null, array('style' => '')); ?>			

		</div>

		<div style="float: left; width: 50%;">

			<?php echo Form::label('school_3', 'Other School #2', array('style' => 'font-weight: bold;')); ?>
			<small>(school listed third)</small><br />			
			<?php echo Form::select('school_3', $info['schools_2'], null, array('style' => '')); ?>			

		</div>

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

		<div style="float: left; width: 100%;">

			<?php echo Form::label('league', 'League', array('style' => 'font-weight: bold;')); ?>
			<small>(only select if the league is different because of this coop)</small><br />
			<?php echo Form::select('league', array_merge(array(null => ''), $info['leagues']), null, array('style' => '')); ?>			

		</div>		

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

		<div style="float: left; width: 50%;">

			<?php echo Form::label('starting_school_year', 'Starting School Year', array('style' => 'font-weight: bold;')); ?><br />
			<?php echo Form::select('starting_school_year', $info['school_years'], Session::get('year'), array('style' => '')); ?>			

		</div>

		<div style="float: left; width: 50%;">

			<?php echo Form::label('ending_school_year', 'Ending School Year', array('style' => 'font-weight: bold;')); ?><br />
			<?php echo Form::select('ending_school_year', $info['school_years'], intval(Session::get('year')) + 3, array('style' => '')); ?>						

		</div>

		

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

<?php else: ?>

	<h2 style="color: #990000; font-size: 12pt;">Unable to Create a Coop</h2>

	<br />

	<div class="small">
		There must be at least one activity program that <?php echo $info['school']->short_name; ?> hosts in order to create a new coop.  If you are attempting to merge <?php echo $info['school']->short_name; ?> into a coop that another school is hosting, you must first go to that school's page and click <b>Add Coop</b>.
	</div>

	<br />

	<div class="online_form_instructions ui-corner-all small ui-state-error">
		<span class="ui-icon ui-icon-alert box_icon"></span> No activity programs found.
	</div>

<?php endif; ?>