<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 (is_null($record->index)): ?>
		Use this utility to create a new student enrollment record.  Click "Add" to save this record to your form.
	<?php else: ?>
		Use this utility to edit this existing student enrollment record.  Click "Save" to save changes to your form.
	<?php endif; ?>	
</div>

<?php echo Form::open(array('url'    => url('/forms/eligibility/' . $object->waiver->id . '/enrollment-records'),
					'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_null($record->index)): ?>
		<?php echo Form::hidden('index', $record->index); ?>
	<?php endif; ?>

	
	<?php echo Form::label('school_year', 'School Year', array('style' => 'width: 125px;')); ?>
	<?php echo Form::select('school_year', $options['school_years'], $record->school_year, array('style' => '')); ?>	
	<span class="small gray" style="margin-left: 20px;">
		Academic school year for this enrollment period.
	</span>

	<br /><br />

	<?php echo Form::label('grade', 'Grade', array('style' => 'width: 125px;')); ?>
	<?php echo Form::select('grade', $options['grades'], $record->grade, array('style' => '')); ?>
	<span class="small gray" style="margin-left: 20px;">
		Student's grade in school during this school year.
	</span>

	<br /><br />

	<?php echo Form::label('period', 'Grading Period', array('style' => 'width: 125px;')); ?>
	<?php echo Form::select('period', $options['periods'], $record->period, array('style' => '')); ?>
	
	<br /><br />

	<div style="float: left; width: 125px; font-weight: bold;">
		Dates Attended		
		<br />
		<span class="small gray">MM/DD/YYYY</span>
	</div>

	<div style="float: left;">
		<?php echo Form::label('first_date', 'First Date', array('style' => 'width: 125px;')); ?><br />
		<?php echo Form::text('first_date', (!Helpers::strIsEmpty($record->first_date)) ? date('m/d/Y', strtotime($record->first_date)) : null, array('style' => 'width: 100px; margin-right: 10px;')); ?>
		
		to
	</div>	

	<div style="float: left; margin-left: 15px;">
		<?php echo Form::label('last_date', 'Last Date', array('style' => 'width: 125px;')); ?><br />
		<?php echo Form::text('last_date', (!Helpers::strIsEmpty($record->last_date)) ? date('m/d/Y', strtotime($record->last_date)) : null, array('style' => 'width: 100px;')); ?>
	</div>
	<div class="small gray" style="float: left; width: 190px; line-height: 1.15em; padding-top: 0.5em;">		
		When did the student attend school for this enrollment period?
	</div>

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

	<?php echo Form::label('school', 'School', array('style' => 'width: 125px;')); ?>
	<?php echo Form::text('school', $record->school, array('style' => 'width: 320px;',
	                                               'data-autocomplete' => true,
	                                               'data-source' => url('/forms/eligibility/' . $object->waiver->id . '/lookup/enrollment-school'))); ?>

    <br /><br />

    <?php echo Form::label('credits_earned', 'Number of Credits Earned', array('style' => 'width: 200px;')); ?>
	<?php echo Form::text('credits_earned', $record->credits_earned, array('style' => 'width: 50px;')); ?>
	<span class="small gray" style="margin-left: 20px;">For example, 3.5</span>

	<br /><br />

	<?php echo Form::label('classes_passed', 'Number of Classes Passed', array('style' => 'width: 200px;')); ?>
	<?php echo Form::text('classes_passed', $record->classes_passed, array('style' => 'width: 50px;', 'maxlength' => 2)); ?>
	<span class="small gray" style="margin-left: 20px;">For example, 6</span>
		
	<br />
	
<?php echo Form::close(); ?>

