<div style="font-size: 10pt; margin: 1em 0;">
	<span class="ui-icon ui-icon-info" style="display: inline-block; vertical-align: middle;"></span>

	<?php if (Helpers::strEqual($index, 'new')): ?>
		Use this utility to create a new appeal record.  Click "Add" to save this appeal to the form.	
	<?php else: ?>
		Use this utility to edit this existing appeal record.  Click "Save" to save changes to the form.
	<?php endif; ?>	
</div>

<?php echo Form::open(array('url'    => url('/forms/eligibility/' . $object->waiver->id . '/appeals'),
					'method' => 'POST',					
					'style'  => 'font-size: 10pt;')); ?>

	<?php echo Form::hidden('redirect', url('/forms/eligibility/' . $object->waiver->id . '/edit')); ?>
	<?php echo Form::hidden('waiver_id', $object->waiver->id); ?>
	<?php if (is_numeric($index)): ?>
		<?php echo Form::hidden('index', $appeal->index); ?>	
	<?php endif; ?>
	
	
	<?php /*  Add/Edit an Appeal  */ ?>

	<?php echo Form::label('type', 'Appeal Type', array('style' => 'width: 125px;')); ?>
	<?php echo Form::select('type', $options['appeal_types'], $appeal->type, array('style' => '')); ?>	
	<span class="small gray" style="margin-left: 20px;">
		Who will hear the appeal?
	</span>

	<br /><br />
	
	<?php echo Form::label('requested_at', 'Requested At', array('style' => 'width: 125px;')); ?>
	<?php echo Form::text('requested_at',
	              (!Helpers::strIsEmpty($appeal->requested_at)) ? date('m/d/y', strtotime($appeal->requested_at)) : null,
	              array('style' => 'width: 100px;',
	                    'data-date-picker' => true)); ?>
	<span class="small gray" style="margin-left: 20px;">
		When was the appeal requested?
	</span>
		
	<br /><br />

	<?php echo Form::label('scheduled_at_date', 'Scheduled At', array('style' => 'width: 125px;')); ?>
	<?php echo Form::text('scheduled_at_date',
	              (!Helpers::strIsEmpty($appeal->scheduled_at)) ? date('m/d/y', strtotime($appeal->scheduled_at)) : null,
	              array('style' => 'width: 100px;',
	                    'data-date-picker' => true)); ?>
	<span class="small gray" style="margin-left: 20px;">
		On what date is the appeal scheduled to occur?
	</span>		

	<br />

	<?php echo Form::text('scheduled_at_time',
	              (!Helpers::strIsEmpty($appeal->scheduled_at)) ? date('g:i a', strtotime($appeal->scheduled_at)) : null,
	              array('style' => 'width: 100px; margin-left: 125px; margin-top: 0.5em;')); ?>
	<span class="small gray" style="margin-left: 20px;">
		At what time is the appeal scheduled to occur?
	</span>		

	<br /><br />

	<?php echo Form::label('attending', 'Attending', array('style' => 'width: 125px;')); ?>
	<?php echo Form::select('attending', $options['attending_options'], $appeal->attending, array('style' => '')); ?>	
	<span class="small gray" style="margin-left: 20px;">
		Is the party representing the student attending the appeal?
	</span>	
		
	<br /><br />

	<?php echo Form::label('notes', 'Notes', array('style' => 'width: 125px;')); ?>
	<?php echo Form::textarea('notes',
	                  $appeal->notes,
	                  array('style' => 'width: 500px; height: 5em;')); ?>
	                  
	<br /><br />

	This is a record of a requested appeal to a decision already made regarding this student's eligibility waiver.

	<?php if (is_null($appeal->index)): ?>

		When you add this appeal, the waiver form's status will change from DONE to APPL.  Add a new decision once the appeal is over.	

	<?php endif; ?>
		

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

