@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 $('[data-placeholder]').focus(function() { var input = $(this); if (input.val() == input.attr('data-placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $(this); if (input.val() == '' || input.val() == input.attr('data-placeholder')) { input.addClass('placeholder'); input.val(input.attr('data-placeholder')); } }).blur(); $('[data-placeholder]').parents('form').submit(function() { $(this).find('[data-placeholder]').each(function() { var input = $(this); if (input.val() == input.attr('data-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 (!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':''}); }); } // Sub-Division option $('input[name="sub_division"]').click(function () { var item = $('input[name="sub_division"]:checked'); var value = item.val(); saveFormData('sub_division', value, 'string', false); }); // Reserve seating option $('select[name="reserve_seating"]').change(function() { var item = $(this); var value = item.val(); saveFormData('reserve_seating', value, 'int', false); }); // Estimated participants $('input[name="estimated_participants"]').blur(function (event) { var item = $(this); var value = item.val(); saveFormData('estimated_participants', value, 'integer', false); }); // Final number of participants $('input[name="final_number_participants"]').blur(function (event) { var item = $(this); var value = item.val(); saveFormData('final_number_participants', value, 'integer', false); }); // Final number of participants $('input[name="final_grand_finale_participants"]').blur(function (event) { var item = $(this); var value = item.val(); saveFormData('final_grand_finale_participants', value, 'integer', false); }); // Music agreement option $('input[name="legal_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 selected = $(':selected', item); var value = selected.val(); saveFormData('competition', value, 'int', false); }); // Reserve room option $('input[name="reserve_room"]').change(function() { var item = $(this); var value = item.is(':checked'); saveFormData('reserve_room', value, 'bool', false); }); // Share room with option $('input[name="share_room_with"]').blur(function () { var item = $(this); var value = item.val(); saveFormData('share_room_with', value, 'string', false); }); // Musical selections $('input[name^="music_"]').blur(function(event) { var item = $(this); var id = item.attr('data-id'); var value = item.val(); if (value == item.attr('data-placeholder')) { value = ''; } saveFormData('music[' + id + ']', value, 'string', false); }); // Team Name $('input[name="team_name"]').blur(function() { var item = $(this); var value = item.val(); saveFormData('team_name', value, 'string', false); }); // Routine Theme $('input[name="routine_theme"]').blur(function() { var item = $(this); var value = item.val(); saveFormData('routine_theme', value, 'string', false); }); // Team Managers $('input[name^="manager"]') .blur(function(event) { var item = $(this); var id = item.attr('data-id'); var value = item.val(); saveFormData('managers[' + id + ']', value, 'string', false); }) .on('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); }) .on('input', function() { $(this).val($(this).val().replace(/[^A-Za-z \-'\.]/gi, '')); }); // Team Intro / Cue Sheet $('textarea[name="team_intro"]').blur(function() { var item = $(this); var value = item.val(); saveFormData('team_intro', 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('Entires are no longer being accepted.
@else InstructionsPlease select the applicable division 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/dnc_registration.blade.php on line 1513 |