<script type="text/javascript">

	<?php if (count($info['school_staff']) > 0): ?>
		var staff_info = new Array();

		<?php foreach ($info['school_staff'] as $staff): ?>
			staff_info.push(<?php echo json_encode($staff); ?>);
		<?php endforeach; ?>
	<?php else: ?>
		var staff_info = '';
	<?php endif; ?>
	
</script>

<p style="font-size: 10pt; line-height: 10pt;">
	<b>Instructions:</b> Use this form to create a new activity program staff contact.
	<br /><br />
	If you want to reuse an existing staff person in a new role, select his/her name from the <b>Use Existing Staff</b> drop-down list to auto-fill the form fields
	<br /><br />
	<span class="ui-icon ui-icon-alert box_icon"></span><b>Note:</b> Once you provide a name for this contact, it cannot be changed.  You will be prompted to confirm your entry before saving.  To request a correction to a saved name, contact <?php echo Helpers::obfuscateEmailLink('support@osaa.org'); ?>.
</p>

<br />

<?php echo Form::open(array('url' => '/schools/' . $info['school']->id . '/activity-staff/new', 'style' => 'font-size: 10pt; line-height: 10pt;')); ?>

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

	<div style="float: left;">
		<?php echo Form::label('activity_program', 'Activity Program', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::select('activity_program', $info['activity_programs'], null, array('style' => '')); ?>
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('school_staff_list', 'Use Existing Staff', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::select('school_staff_list', $info['school_staff_list'], null, array('style' => '')); ?>
	</div>

	<div style="float: left; margin-left: 20px;">
		<br />
		<div class="clear_existing_staff_info">Clear &amp; Reset</div>
	</div>

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

	<div style="float: left;">
		<?php echo Form::label('name_prefix', 'Prefix', array('style' => 'font-weight: bold; font-size: 8pt;')); ?> <span class="small gray" style="position: absolute;">(i.e. "Dr.")</span><br />
		<?php echo Form::text('name_prefix', null, array('style' => 'width: 90px;')); ?>		
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('first_name', 'First Name', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::text('first_name', null, array('style' => 'width: 120px;')); ?>		
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('middle_name', 'Middle Name', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::text('middle_name', null, array('style' => 'width: 90px;')); ?>		
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('last_name', 'Last Name', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::text('last_name', null, array('style' => 'width: 120px;')); ?>		
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('name_suffix', 'Suffix', array('style' => 'font-weight: bold; font-size: 8pt;')); ?> <span class="small gray" style="position: absolute;">(i.e. "III")</span><br />
		<?php echo Form::text('name_suffix', null, array('style' => 'width: 90px;')); ?>		
	</div>

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

	<div style="float: left;">
		<?php echo Form::label('role', 'Role', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::select('role', $info['roles'], null, array('style' => '')); ?>
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('level', 'Level', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::select('level', $info['levels'], 'V', array('style' => '')); ?>
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('staff_type', 'Staff Type', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::select('staff_type', $info['staff_types'], null, array('style' => '')); ?>
	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('is_on_rosters', 'Shown on Rosters?', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />		
		<?php echo Form::select('is_on_rosters', array(0 => 'No', 1 => 'Yes'), 1, array('style' => '')); ?>		
	</div>

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

	<div style="float: left;">
		<?php echo Form::label('email', 'Email Address', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::text('email', null, array('style' => 'width: 250px;')); ?><br />

		<?php echo Form::label('is_email_public', 'Email address is public:', array('style' => 'font-size: 8pt;')); ?>
		<?php echo Form::checkbox('is_email_public', 1, 0, array('style' => 'vertical-align: middle;')); ?>

	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('work_phone', 'Work Phone Number', array('style' => 'font-weight: bold;')); ?><br />
		<?php echo Form::text('work_phone', null, array('style' => 'width: 135px;')); ?><br />

		<?php echo Form::label('is_work_phone_public', 'Phone is public:', array('style' => 'font-size: 8pt; margin-top: 0.5em;')); ?>
		<?php echo Form::checkbox('is_work_phone_public', 1, 0, array('style' => 'vertical-align: middle;')); ?>

	</div>

	<div style="float: left; margin-left: 20px;">
		<?php echo Form::label('mobile_phone', 'Mobile Phone Number', array('style' => 'font-weight: bold; font-size: 8pt;')); ?><br />
		<?php echo Form::text('mobile_phone', null, array('style' => 'width: 135px;')); ?><br />

		<span style="font-size: 8pt;">Mobile phone is never public</span>
	</div>

	<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>

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

		<div style="float: left;">
			<?php echo Form::label('staff_notes', 'OSAA Staff Notes', array('style' => 'font-weight: bold; font-size: 8pt;')); ?> <span class="small gray" style="position: absolute;">(only visible to OSAA staff)</span><br />
			<?php echo Form::textarea('staff_notes', null, array('style' => 'width: 650px; height: 3em;')); ?>
		</div>

	<?php endif; ?>

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