@section('page_title') OSAA - Submit Scores @stop @section('page_sub_title') {{-- Scores for {{ $information['sub_title'] }} --}} Submit a {{ Helpers::getActivityName($information['activity']) }} @if (Helpers::strEqual($information['activity'], array('FBL', 'BBX', 'GBX', 'BBL', 'SBL'))) Game @elseif (Helpers::strEqual($information['activity'], array('VBL', 'BSC', 'GSC'))) Match @endif Result @stop @section('scripts') @parent @stop @section('jquery_init') $('.tooltip').tooltip(); $('.button').button(); $('.button.notext').button({text:false}); $('.button.add').button({ icons : {primary : 'ui-icon-plus'}}); $('.button.edit').button({ icons : {primary : 'ui-icon-pencil'}}); $('#cancel_button').button({ icons : { primary : 'ui-icon-circle-close'}}).css('font-size', '10pt').tooltip().attr('title', 'Cancel editing and do not save changes.'); $('.button.ot_add').click(function () { var i = $(this).attr('extra-data'); {{-- Todo: this needs to be corrected to offset already shown overtimes when editing --}} var a_name = 'ot_A' + i; var h_name = 'ot_H' + i; $("input[name='" + a_name + "']").show(); $("input[name='" + h_name + "']").show(); $(this).attr('extra-data', parseInt(i) + 1); var a_name = 'ot_A' + i; if ($("input[name='" + a_name + "']").size() < 1) { $(this).hide(); } }); $('.button.ot_add_soccer').click(function () { $('input:hidden').show(); $(this).hide(); }); $('[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(''); } }) }); /* Display any success messages */ $('.success_message').delay(5000).fadeOut({'duration' : 2500}); $('.success_message .ui-icon-close').click(function () { $('.success_message').hide(); }); // Update forfeit type description and update notes, if not already noted $('#is_forfeit').on('change', function() { updateForfeitDescription(); var notes = $('[name="notes"]'); var existing_notes = notes.val(); var index = existing_notes.indexOf("Forfeit posted by OSAA"); if (index === -1) { var forfeit_note = "Forfeit posted by OSAA on {{ date('n/j/Y', time()) }}."; if (existing_notes == "" || existing_notes == notes.attr('placeholder')) { notes.val(forfeit_note); } else { notes.val(existing_notes + " " + forfeit_note); } if (notes.hasClass('placeholder')) { notes.removeClass('placeholder'); } notes.focus(); } }); function updateForfeitDescription() { var holder = $('[name="forfeit-description"]'); var select = $('#is_forfeit'); var option = $('option:selected', select); var description = option.attr('data-description'); holder.fadeOut(400, function() { holder.text(description); holder.fadeIn(400); }); } updateForfeitDescription(); // Confirm score submission $('input[type="submit"]').on('click', function(event) { event.preventDefault(); var form = $('#submit_scores'); $('
') .appendTo('body') .dialog( { draggable : false, resizable : false, modal : true, height : 500, width : 600, title : 'Please Confirm', buttons: [ { text : "Submit Scores", 'style' : "float: left;", 'data-autofocus' : "true", icons : { primary : 'ui-icon-check'}, click : function() { form.submit(); // Close the dialog box $(this).dialog("close"); } }, { text : "Cancel", 'style' : "float: right;", icons : { primary : 'ui-icon-close'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var away_score = parseInt($('input[name="away_score"]').val()); var home_score = parseInt($('input[name="home_score"]').val()); var dialog_object = $(this); var html = '
Are You Sure?

Please confirm the following information is correct.


'; html += '
Away Team
'; html += '
' + away_score + '
'; html += '
{{ $information['away_team_name'] }}
'; html += '

'; html += '
Home Team
'; html += '
' + home_score + '
'; html += '
{{ $information['home_team_name'] }}
'; html += '

'; html += '
If this information is not correct, DO NOT ENTER A SCORE! Go back to the contest editor and update any contest details. Once you submit the score, rankings and records will be updated.
' dialog_object.html(html); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); $('[data-autofocus="true"]').focus(); $('.ui-widget-header').css('background', '#f6a828 url(http://download.jqueryui.com/themeroller/images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x').css('border-color', '#f6a828'); $('.ui-widget-content').css('border-color', '#dddddd'); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '10pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, show : { effect : "shake", duration : 200}, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }); @stop @section('page_functions') Exit @stop @section('main_content') @if (Session::get('success'))
{{ Session::get('success') }}
@endif

Contest Information

{{ Form::open(array('url' => url('/contests/submit-scores'), 'class' => 'submitScores', 'id' => 'submit_scores')) }} @if (Session::has('errors'))
@foreach ($errors->all() as $error){{ $error }} @endforeach
@endif {{ Form::hidden('contest_id', $information['contest_id']) }} {{ Form::hidden('exists', true) }} {{ Session::flash('return_from', Session::get('return_from', URL::previous())) }}
Away Team
{{ $information['away_team_name'] }} @if (!is_null($information['away_team']) and !Helpers::strEqual($information['away_team']->level, 'V')) [{{ $information['away_team']->level }}] @endif

Home Team
{{ $information['home_team_name'] }} @if (!is_null($information['home_team']) and !Helpers::strEqual($information['home_team']->level, 'V')) [{{ $information['home_team']->level }}] @endif
Date
{{ $information['date'] }}

Time
{{ $information['time'] }}


Edit Contest If the information is incorrect, please edit the contest before submitting a score.

Submit Scores

For both teams, you must provide the final scores. @if (Helpers::strEqual($information['activity'], 'FBL')) If applicable, you can also optionally enter scores per quarter or overtime. @elseif (Helpers::strEqual($information['activity'], 'VBL')) Please be sure to enter set scores. @elseif (Helpers::strEqual($information['activity'], array('BSC', 'GSC'))) If applicable, you can also optionally enter scores per half, overtime play, and results from kicks from the penalty mark. @elseif (Helpers::strEqual($information['activity'], array('BBX', 'GBX'))) If applicable, you can also optionally enter period scores. @elseif (Helpers::strEqual($information['activity'], array('BBL', 'SBL'))) If applicable, you can also optionally enter scores per inning. @endif You can also enter in notes if you'd like.

H/A Team Final Score @if (Helpers::strEqual($information['activity'], 'FBL')) Score per Quarter
@elseif (Helpers::strEqual($information['activity'], 'VBL')) Set Scores @elseif (Helpers::strEqual($information['activity'], array('BSC', 'GSC'))) Score per Half
@elseif (Helpers::strEqual($information['activity'], array('BBX', 'GBX'))) Period Scores
@elseif (Helpers::strEqual($information['activity'], array('BBL', 'SBL'))) Innings
@endif
Away {{ $information['away_team_name'] }} @if (!is_null($information['away_team']) and !Helpers::strEqual($information['away_team']->level, 'V')) [{{ $information['away_team']->level }}] @endif {{ Form::text('away_score', $information['away_scores']['score'], array('style' => 'width:75px;', 'placeholder' => 'Final')) }} @if (Helpers::strEqual($information['activity'], 'FBL')) {{ Form::text('period_A1', Helpers::getPeriodScore($information['away_scores']['sub_scores'], 1), array('style' => 'width:25px;', 'placeholder' => '1st')) }} {{ Form::text('period_A2', Helpers::getPeriodScore($information['away_scores']['sub_scores'], 2), array('style' => 'width:25px;', 'placeholder' => '2nd')) }} {{ Form::text('period_A3', Helpers::getPeriodScore($information['away_scores']['sub_scores'], 3), array('style' => 'width:25px;', 'placeholder' => '3rd')) }} {{ Form::text('period_A4', Helpers::getPeriodScore($information['away_scores']['sub_scores'], 4), array('style' => 'width:25px;', 'placeholder' => '4th')) }}
Fatal error: Class 'Helpers' not found in /home/osaa/web_app/dev/app/views/contests/edit_scores.blade.php on line 624