@endif
@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.save').button({ icons : { primary : 'ui-icon-disk'}});
$('.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'});
$('[data-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, ''));
});
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]').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('');
}
});
});
/* Show any form fields that have errors */
var bad_fields = new Array();
@if (!is_null($information['submission']))
@endif
for (var i = 0; i < bad_fields.length; i++)
{
$('[name="' + bad_fields[i] + '"]').addClass('ui-state-error');
}
/* Save information */
$('.button.save').click(function ()
{
var form = $(this).parents('form');
var input = $('').attr('type', 'hidden').attr('name', 'save').val('true');
$(form).append($(input));
$(form).submit();
});
$('input[name="sub_division"]').click(function ()
{
updateRosterSize();
});
function updateRosterSize()
{
var max = $('input[name="sub_division"]:checked').attr('data-max-roster');
if (max < 50)
{
for (var i = max; i < 50; i++)
{
$('#roster tbody tr:nth-child(' + i + ')').hide();
}
}
else
{
$('#roster tbody tr').show();
}
/* Show all roster rows */
$('#roster tbody tr').show();
return;
}
updateRosterSize();
$('input[data-coach]').bind('input', function ()
{
updateCoaches();
});
/* Update coach names to certification section */
function updateCoaches ()
{
var coaches = new Array();
for (var i = 0; i <= 4; i++)
{
var v = $('input[data-coach="' + i + '"]').val();
var ph = $('input[data-coach="' + i + '"]').attr('placeholder');
if (v == ph)
{
v = '';
}
coaches[i] = v;
}
for (i = 0; i < coaches.length; i++)
{
$('#coach_certification input[name="coach[' + i + '][name]"]').val(coaches[i]);
}
}
updateCoaches();
// 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);
})
});
@if (Auth::check() and Auth::user()->isOsaaUser())
$('#submissions_report').dialog(
{
dialogClass : 'submission_content',
autoOpen : false,
buttons : [ { text : 'Done', 'class' : 'float_right', click : function () { $(this).dialog('close'); }} ],
draggable : true,
height : 700,
modal : false,
resizable : false,
open : function ()
{
$('#submissions_report').html("");
var jqxhr = $.ajax(
{
type : 'GET',
url : '/reports/dnc-registrations',
dataType : 'html'
})
.done(function (data)
{
$('#submissions_report').html(data);
})
.fail(function ()
{
$('#submissions_report').html('There was an error.');
});
$('.submission_content .ui-dialog-buttonpane').css('padding', '0').css('font-size', '8pt');
$('.submission_content .ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');
},
show : { effect : 'highlight', delay : 0, duration : 400, easing : 'easeInOutSine' },
title : 'OSAA Dance Registrations',
width : 650
}
);
$('.button.submissions').click(function () { $('#submissions_report').dialog('open'); });
$('#entries_report').dialog(
{
dialogClass : 'entry_content',
autoOpen : false,
buttons : [ { text : 'Done', 'class' : 'float_right', click : function () { $(this).dialog('close'); }} ],
draggable : true,
height : 350,
modal : false,
resizable : false,
open : function ()
{
$('#entries_report').html("");
var jqxhr = $.ajax(
{
type : 'GET',
url : '/reports/dnc-entries',
dataType : 'html'
})
.done(function (data)
{
$('#entries_report').html(data);
})
.fail(function ()
{
$('#entries_report').html('There was an error.');
});
$('.entry_content .ui-dialog-buttonpane').css('padding', '0').css('font-size', '8pt');
$('.entry_content .ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');
},
show : { effect : 'highlight', delay : 0, duration : 400, easing : 'easeInOutSine' },
title : 'OSAA Dance Entries',
width : 500
}
);
$('.button.entries').click(function () { $('#entries_report').dialog('open'); });
@endif
@stop
@section('page_functions')
@if (!is_null($information['activity_program']))
Back
@else
Close
@endif
@stop
@section('main_content')
{{-- Success Bar --}}
@if (Session::has('success'))
{{ Session::get('success') }}
@endif
{{-- Past Due Notice --}}
@if ($information['is_past_due'])
This form was due by {{ date('g:i A l, F j, Y', strtotime($information['activity_form']->due_at)) }} and is now past the deadline. Please submit your entries now before the form closes and becomes unavailable.
@endif
{{-- AP Specific: Form Information --}}
@if (!is_null($information['activity_program']))
@endif
For questions, contact {{ $information['staff']->first_name }} {{ $information['staff']->last_name }} at (503) 682-6722 x239 or by e-mail to {{ Helpers::obfuscateEmailLink ($information['staff']->email) }}. For technical assistance, you can email {{ Helpers::obfuscateEmailLink ("support@osaa.org") }}.
@if (Session::has('errors'))
@foreach ($errors->all() as $error){{ $error }} @endforeach