@section('page_title') OSAA - Forms @stop @section('tool_box') @stop @section('page_sub_title') {{ $information['form_name'] }} @stop @section('scripts') @parent @stop @section('jquery_init') $('.button').button(); $('.button.notext').button({text:false}); $('.button.close').button({ icons : { primary : 'ui-icon-circle-close'}}); $('.button.switch').button({ icons : { primary : 'ui-icon-transferthick-e-w'}}); $('.button.back').button({ icons : { primary : 'ui-icon-arrowthick-1-w'}}); $('.button.delete').button({ icons : { primary : 'ui-icon-closethick'}}); $('.button.add').button({ icons : { primary : 'ui-icon-plusthick'}}); $('.button.edit').button({ icons : { primary : 'ui-icon-pencil'}}); $('.button_set').buttonset(); $('.button_set label').addClass('ui-corner-all'); $('.tooltip').tooltip(); $('.date_picker').datepicker({'dateFormat' : 'mm/dd/yy', 'minDate' : '11/01/13', 'maxDate' : '1/24/14'}); $('[required]').after('*'); /* Limit input to numbers only */ $('.numbers_only').bind('input', function() { $(this).val($(this).val().replace(/[^0-9]/gi, '')); }); /* Limit input to letters only */ $('.alphas_only').bind('input', function() { $(this).val($(this).val().replace(/[^A-Za-z]/gi, '')); }); // 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); }) }); // Color table rows function colorRows () { $('table').each(function () { var i = 0; $('tbody tr:visible', $(this)).each(function () { if (i % 2 == 1) { $(this).addClass('odd'); } else { $(this).removeClass('odd'); } i = i + 1; }); }); } colorRows(); // Placeholder $('[placeholder]').focus(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $(this); if (input.val() == '' || input.val() == input.attr('placeholder')) { input.addClass('placeholder'); input.val(input.attr('placeholder')); } }).blur(); $('[placeholder]').parents('form').submit(function() { $(this).find('[placeholder]').each(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); } }); }); // Shake action items function shakeActionImages (object) { var direction; if ($(object).has('[data-direction]')) { var direction = $(object).attr('data-direction'); } if (typeof direction == 'undefined') { var direction = 'left'; } $(object).effect("shake", {direction : direction, distance : 5, times : 1}, 600, function () { $(this).delay(Math.floor(Math.random() * 4000) + 2000); shakeActionImages($(this)); }); } $('img.action_item').each(function() { var img = $(this); shakeActionImages(img); }); @if (Auth::check() and Auth::user()->isOsaaUser()) // Download drop-down menu $('#grabber_list') .menu() .css({'display' : 'none', 'z-index' : '200', 'position' : 'absolute', 'right' : '0', 'top' : '23px', 'margin' : '0', 'padding' : '0', 'width' : '150px'}); $('#grabber_list li ul') .css({'margin' : '0', 'padding' : '0', 'width' : '160px'}); $('#grabber_list img') .css({'position' : 'relative', 'top' : '2px', 'margin-right' : '6px'}); $('.grabber_button') .button({ icons : { secondary : 'ui-icon-triangle-1-s'}}) .css({'float':'right', 'font-size':'8pt'}) .click(function (event) { if ($('#grabber_list').is(':visible')) { $('#grabber_list').slideUp(400); $(this).button({icons : { secondary : 'ui-icon-triangle-1-s'}}); } else { $('#grabber_list').slideDown(400); $(this).button({icons : { secondary : 'ui-icon-triangle-1-n'}}); } }); @endif @if (!is_null($information['submission'])) /* saveFormData * * Given a form field and a value, this function will do a * JSON POST request to save the form's information. The optional * third parameter will determine if the page will be reloaded or not. */ function saveFormData(field, value, type, reload) { // Ensure the field and value parameters are provided if (typeof field == 'undefined' || typeof value == 'undefined' || typeof type == 'undefined') { alert('Scripting error. Unable to save form data.'); } // Get the optional reload parameter reload = typeof reload !== 'undefined' ? reload : false; // Get the form ID (same across all pages for this form) var form_id = {{ $information['submission']->id }}; $('*').css({'cursor':'wait'}); var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/activity-program-forms') }}/' + form_id + '/update', data : { 'field' : field, 'value' : value, 'type' : type }, dataType : 'html' }) .done(function(returned_data) { // Success console.log("Successfully saved {'" + form_id + "|" + field + "' : '" + value + "'}"); var info = $.parseJSON(returned_data); $('#updated_at').html(info.updated_at); $('#updated_by').html(info.updated_by); if (info.force_reload) { reload = true; } }) .fail(function(jqXHR, status, error) { // Error var response = jqXHR.responseText; var errorData = $.parseJSON(response); console.log(errorData); alert("There was an error saving this form's data.\n\n" + errorData.error.message + "\n\nPlease try again. Please note, that if you try to reload this page, your unsaved data to be lost."); }) .complete(function () { // Reload if necessary if (reload) { location.reload(); } $('*').css({'cursor':''}); }); } /* updateRosterSize * * Update the size of the number of spaces for the roster participants. */ function updateRosterSize() { var max = $('input[name="sub_division"]:checked').attr('data-max-roster'); if (max < 20) { for (var i = max; i < 20; i++) { //$('#roster tbody tr:nth-child(' + i + ')').hide(); $('input[name="participant[' + i + '][name]"]').parents('tr').hide(); } } else { $('#roster tbody tr').show(); } return; } updateRosterSize(); // Sub-Division option $('input[name="sub_division"]').click(function () { updateRosterSize(); var item = $('input[name="sub_division"]:checked'); var value = item.val(); saveFormData('sub_division', value, 'string', false); }); // Reserve seating option $('input[name="reserve_seating"]').change(function() { var item = $(this); var value = item.is(':checked'); saveFormData('reserve_seating', value, 'bool', false); }); // Reserve room option $('input[name="reserve_room"]').change(function() { var item = $(this); var value = item.is(':checked'); saveFormData('reserve_room', value, 'bool', false); }); // Music agreement option $('input[name="music_agreement"]').change(function() { var item = $(this); var value = item.is(':checked'); saveFormData('music_agreement', value, 'bool', false); }); // Sanctioned competitions option $('select[name^="competition"]').change(function(event) { var item = $(this); var id = item.attr('data-id'); var selected = $(':selected', item); var value = selected.val(); // Ensure the selections are different if not empty if (id == '0') { var other = $('select[name^="competition"][data-id="1"]'); } else { var other = $('select[name^="competition"][data-id="0"]'); } var other_value = $(':selected', other).val(); if (other_value == value && value != '') { alert('The sanctioned competition options must be different.'); item.val($.data(item, 'current')); return false; } saveFormData('competitions[' + id + ']', value, 'int', false); }); // Alternates $('[name^="alternate"]').blur(function(event) { var item = $(this); var id = item.attr('data-id'); var part = item.attr('data-part'); if (part == 'grade') { var selected = $(':selected', item); var grade = selected.val(); var name_field = $('[name^="alternate"][data-part="name"][data-id="' + id + '"'); var name = name_field.val(); } else { var name = item.val(); var grade_field = $('[name^="alternate"][data-part="grade"][data-id="' + id + '"'); var selected = $(':selected', grade_field); var grade = selected.val(); } if (grade == '' || grade == ' ') { grade = null; } if (name == '') { name = ''; } var data = '{"name":"' + name + '","grade":' + grade + '}'; saveFormData('alternates[' + id + ']', data, 'object', false); }); // Do not allow special characters in alternates' names $('input[name^="alternate"][data-part="name"]').bind('input', function() { $(this).val($(this).val().replace(/[^A-Za-z \-'\.]/gi, '')); }); // Choreographers $('input[name^="choreographer"]') .blur(function(event) { var item = $(this); var id = item.attr('data-id'); var value = item.val(); saveFormData('choreographers[' + id + ']', value, 'string', false); }) .bind('input', function() { $(this).val($(this).val().replace(/[^A-Za-z \-'\.]/gi, '')); }); // Routine theme $('input[name="routine_theme"]').blur(function() { var item = $(this); var value = item.val(); saveFormData('routine_theme', value, 'string', false); }); // Participants $('[name^="participant"]') .blur(function(event) { var item = $(this); var field_name = item.attr('name'); var matches = field_name.match(/participant\[([0-9]+)\]\[(.*)\]/); var id = matches[1]; var part = matches[2]; if (part == 'name') { var name_item = item; } else { var name_item = $('input[name="participant[' + id + '][name]"]'); } if (part == 'grade') { var grade_item = item; } else { var grade_item = $('select[name="participant[' + id + '][grade]"]'); } if (part == 'is_captain') { var captain_item = item; } else { var captain_item = $('input[name="participant[' + id + '][is_captain]"]'); } var name = name_item.val(); var grade = $(':selected', grade_item).val(); var is_captain = captain_item.is(':checked'); if (grade == '' || grade == ' ') { grade = 'null'; } if (name == '') { name = 'null'; } else { name = '"' + name + '"'; } if (is_captain) { is_captain = 'true'; } else { is_captain = 'false'; } var data = '{"name":' + name + ',"grade":' + grade + ',"is_captain":' + is_captain + '}'; console.log(data); saveFormData('participants[' + id + ']', data, 'object', false); }); // Do not allow special characters in participant names $('input[name^="participant"]').bind('input', function() { $(this).val($(this).val().replace(/[^A-Za-z \-'\.]/gi, '')); }); // Delete team photo button $('.delete_photo') .button({'icons':{'primary':'ui-icon-trash'}}) .css({'font-size':'8pt'}) .click(function () { $('
') .appendTo('body') .dialog({ modal : true, draggable : false, resizable : false, height : 275, width : 400, title : 'Confirm Team Photo Removal', buttons: [ { text : "Yes", 'class' : "float_left", icons : { primary : 'ui-icon-check'}, click : function() { var team = {{ $information['team']->id }}; $.ajax({ type : "POST", url : '{{ url('/teams/remove-photo') }}', data : { 'team' : team }, success : function() { location.reload(); } }); $(this).dialog("close"); } }, { text : "No", 'class' : "float_right", icons : { primary : 'ui-icon-cancel'}, click : function() { $(this).dialog( "close" ); } }], open : function () { var dialog_object = $(this); dialog_object.html('The following list shows the registration status for each school. If a school is not listed, it has not started its registration process.
| School | Status | Head Coach | @if (Auth::check() and Auth::user()->isOsaaUser())# Participants | # Alternates | # Coaches | Total # Passes | @endifPhoto |
|---|---|---|---|---|---|---|---|
| @if (Auth::user()->isOsaaUser()) @endif {{ $apf->ap_name }} |
@if ($apf->registered)
|
@if (!is_null($apf->head_coach)) @if (Auth::check() and Auth::user()->isOsaaUser()) {{ $apf->head_coach->school_staff->getDisplayName() }} @else {{ $apf->head_coach->school_staff->getDisplayName() }} @endif @endif | @if (Auth::check() and Auth::user()->isOsaaUser())@if($apf->registered) {{ $apf->number_participants }} @else - - @endif | @if($apf->registered) {{ $apf->number_alternates }} @else - - @endif | @if($apf->registered) {{ $apf->number_coaches }} @else - - @endif | @if($apf->registered) {{ $apf->total_passes }} @else - - @endif | @endif
@if (!is_null($apf->team_photo))
|
Please select one of the applicable sub-divisions your team will compete in.
The following information is provided by your school's Athletic Director or AD Secretary. A Head Coach with an e-mail address and a phone number is required for this form to be submitted. Only one (1) Head Coach will appear in the program with up to four (4) optional Assistant Coaches. To add, modify, or remove information in this table, contact your AD or AD Secretary.
| Position | Name | Phone |
Certifications
|
|
|---|---|---|---|---|
| Head Coach |
@if (Helpers::strEqual($information['ap_staff']->coach->certification_status, 'OK'))
|
{{ $information['ap_staff']->coach->school_staff->email }} |
@if (!is_null($information['ap_staff']->coach->school_staff->work_phone))
W: {{ $information['ap_staff']->coach->school_staff->getDisplayPhone('WORK') }}
@if (!is_null($information['ap_staff']->coach->school_staff->mobile_phone))
@endif @endif @if (!is_null($information['ap_staff']->coach->school_staff->mobile_phone)) M: {{ $information['ap_staff']->coach->school_staff->getDisplayPhone('MOBILE') }} @endif |
@foreach ($information['ap_staff']->coach->certs as $cert)
Fatal error: Cannot break/continue 1 level in /home/osaa/web_app/dev/app/views/forms/che_registration.blade.php on line 1424 |