@section('page_title') OSAA - Contest Editor @stop @section('page_sub_title') Edit {{ $information['event']->name }} @stop @section('scripts') @parent @stop @section('jquery_init') $('.tooltip').tooltip(); $('.button').button(); $('#cancel_button').button({ icons : { primary : 'ui-icon-circle-close'}}).css('font-size', '10pt').tooltip().attr('title', 'Cancel editing and do not save changes.'); $('#event_date').datepicker({'dateFormat' : 'mm/dd/yy', 'minDate' : '{{ $information['first_event_at'] }}', 'maxDate' : '{{ $information['last_event_at'] }}'}); $('#event_time').timepicker({ 'timeFormat': 'h:i A' , 'step' : 15}); $('#contest_type').buttonset(); function updateOOSState () { if ($('#is_home_oos:checked').length > 0) { $('#home_state').removeAttr('disabled'); } else { $('#home_state').attr('disabled', 'disabled'); } if ($('#is_away_oos:checked').length > 0) { $('#away_state').removeAttr('disabled'); } else { $('#away_state').attr('disabled', 'disabled'); } } updateOOSState (); $('#is_home_oos, #is_away_oos').change(function () { updateOOSState (); }); var original_status = '{{ $information['event']->event_status }}'; var original_endowment = {{ $information['contest']->is_endowment }}; function updateEndowmentNotes () { /* Endowment: Checked */ if ($('#is_endowment:checked').size() > 0) { /* Original: SCHD */ if (original_status == 'SCHD') { /* Original: SCHD , Yes Endowment = Approved */ if (original_endowment == 1) { $("input[name='event_status']").attr('value', 'SCHD'); $('#event_status_value').html('Scheduled'); $('#new_endowment_note').css('display', 'none'); $('#remove_endowment_note').css('display', 'none'); $('#pending_endowment_note').css('display', 'none'); } /* Original: SCHD , No Endowment = New Request */ else { $("input[name='event_status']").attr('value', 'PND'); $('#event_status_value').html('Pending'); $('#new_endowment_note').css('display', 'block'); $('#remove_endowment_note').css('display', 'none'); $('#pending_endowment_note').css('display', 'none'); } } /* Original: PND */ else if (original_status == 'PND') { /* Original: PND , Yes Endowment = Currently Waiting */ if (original_endowment == 1) { $("input[name='event_status']").attr('value', 'PND'); $('#event_status_value').html('Pending'); $('#new_endowment_note').css('display', 'none'); $('#remove_endowment_note').css('display', 'none'); $('#pending_endowment_note').css('display', 'block'); } /* Original: PND , No Endowment = New Request */ else { $("input[name='event_status']").attr('value', 'PND'); $('#event_status_value').html('Pending'); $('#new_endowment_note').css('display', 'block'); $('#remove_endowment_note').css('display', 'none'); $('#pending_endowment_note').css('display', 'none'); } } } /* Endowment Unchecked */ else { /* Original: SCHD */ if (original_status == 'SCHD') { /* Original: SCHD , Yes Endowment = Remove Approved */ if (original_endowment == 1) { $("input[name='event_status']").attr('value', 'SCHD'); $('#event_status_value').html('Scheduled'); $('#new_endowment_note').css('display', 'none'); $('#remove_endowment_note').css('display', 'block'); $('#pending_endowment_note').css('display', 'none'); } /* Original: SCHD , No Endowment = Nothing new */ else { $("input[name='event_status']").attr('value', 'SCHD'); $('#event_status_value').html('Scheduled'); $('#new_endowment_note').css('display', 'none'); $('#remove_endowment_note').css('display', 'none'); $('#pending_endowment_note').css('display', 'none'); } } /* Original: PND */ else if (original_status == 'PND') { /* Original: PND , Yes Endowment = Remove Currently Waiting */ if (original_endowment == 1) { $("input[name='event_status']").attr('value', 'SCHD'); $('#event_status_value').html('Scheduled'); $('#new_endowment_note').css('display', 'none'); $('#remove_endowment_note').css('display', 'block'); $('#pending_endowment_note').css('display', 'none'); } /* Original: PND , No Endowment = Nothing new */ else { $("input[name='event_status']").attr('value', 'PND'); $('#event_status_value').html('Pending'); $('#new_endowment_note').css('display', 'none'); $('#remove_endowment_note').css('display', 'none'); $('#pending_endowment_note').css('display', 'none'); } } } } $('#is_endowment').change (function () { updateEndowmentNotes(); }); updateEndowmentNotes(); $('#swap_home_away') .button({text : false, icons : { primary : 'ui-icon-shuffle'}}) .click(function () { var home_team = $("input[name='home_team_name']").val(); var away_team = $("input[name='away_team_name']").val(); home_team = home_team.replace(/(<([^>]+)>)/ig,""); away_team = away_team.replace(/(<([^>]+)>)/ig,""); var home_level = $("select[name='home_team_level'] option:selected").val(); var away_level = $("select[name='away_team_level'] option:selected").val(); var home_state = $("select[name='home_state'] option:selected").val(); var away_state = $("select[name='away_state'] option:selected").val(); var home_oos = $("#is_home_oos:checked").size() > 0; var away_oos = $("#is_away_oos:checked").size() > 0; $("input[name='home_team_name']").val(away_team); $("input[name='away_team_name']").val(home_team); $("select[name='home_team_level']").val(away_level); $("select[name='away_team_level']").val(home_level); $("select[name='home_state']").val(away_state); $("select[name='away_state']").val(home_state); if (home_oos && !away_oos) { $('#is_away_oos').click(); $('#is_home_oos').click(); } else if (!home_oos && away_oos) { $('#is_away_oos').click(); $('#is_home_oos').click(); } $('input[name="swapping"]').val($('input[name="swapping"]').val() * -1); }); var availableOpponents = [ {{ $information['available_opponents'] }} ]; var availableLocations = [ {{ $information['available_locations'] }} ]; var availableTournaments = [ {{ $information['available_tournaments'] }} ]; $(".team_name" ).autocomplete({source : availableOpponents}); $('#location').autocomplete({source : availableLocations}); $('#tournament').autocomplete({source : availableTournaments}); $('#is_tournament').change(function () { if ($('#is_tournament:checked').size() > 0 && $('#is_neutral_location:checked').size() < 1) { $('#is_neutral_location').click(); } }); $('#confirm_dialog').dialog({ autoOpen: false, resizable: false, height:275, width: 400, modal: true, buttons: [{ text : "No", 'class' : "float_right", icons : { primary : 'ui-icon-cancel'}, click : function() { $(this).dialog( "close" ); return false; } }, { text : "Yes", 'class' : "float_left", icons : { primary : 'ui-icon-check'}, click : function() { $('#editContest').submit(); $(this).dialog("close"); return true; } }], open : function() { $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '10pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); } }); $('.button[data-confirm]').click(function () { var button_id = $(this).attr('id'); var action = $(this).attr('data-confirm'); var input = $('').attr('type', 'hidden').attr('name', 'special_action').val(button_id); $('#editContest').append($(input)); $('#confirm_dialog').html(action).dialog('open'); }); $('#is_postpone').click(function () { $('
') .appendTo('body') .html('Are you sure you want to postpone this contest?

A postponed contest will be played at a later date that you can enter below. If you don\'t know the time, leave it blank.

Rechedule Contest To:

{{ Form::label('postpone_date', 'Date', array('class' => 'input_label', 'style' => '')) }} {{ Form::text('postpone_date', null, array('style' => 'width:100px;')) }} MM/DD/YYYY

{{ Form::label('postpone', 'Time', array('class' => 'input_label', 'style' => '')) }} {{ Form::text('postpone_time', null, array('style' => 'width:80px;')) }}') .dialog( { autoOpen: true, draggable: false, resizable: false, height: 360, width: 400, title: 'Confirm Postpone', modal: true, buttons: [ { text : "Postpone", 'class' : "float_left", icons : { primary : 'ui-icon-check'}, click : function() { if ($('input[name="postpone_date"]').val() == '') { alert('You must enter in the date this contest will be postponed to.'); return false; } var input = $('') .attr('type', 'hidden') .attr('name', 'special_action') .val('is_postpone'); $('#editContest').append($(input)); var input = $('') .attr('type', 'hidden') .attr('name', 'postpone_date') .val($('input[name="postpone_date"]').val()); $('#editContest').append($(input)); var input = $('') .attr('type', 'hidden') .attr('name', 'postpone_time') .val($('input[name="postpone_time"]').val()); $('#editContest').append($(input)); $('#editContest').submit(); $(this).dialog( "close"); $(this).remove(); } }, { text : "Cancel", 'class' : "float_right", 'autofocus' : 'true', icons : { primary : 'ui-icon-cancel'}, click : function() { $(this).dialog( "close");; $(this).remove(); } } ], open : function () { $(this).parent().find('[autofocus]').focus(); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '10pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); //$('.ui-dialog-titlebar').addClass('ui-state-highlight'); $('input[name="postpone_date"]').datepicker({'dateFormat' : 'mm/dd/yy', 'minDate' : '{{ $information['first_event_at'] }}', 'maxDate' : '{{ $information['last_event_at'] }}'}); $('input[name="postpone_time"]').timepicker({ 'timeFormat': 'h:i A' , 'step' : 15}); } }); }); // Lock contest type if this is a playoff var lock_contest_type = false; @if (Helpers::strEqual($information['contest']->contest_type, array('PO', 'A', 'EX')) and !Auth::user()->isOsaaUser()) var lock_contest_type = true; @endif if (lock_contest_type) { $('input[type="radio"][name="contest_type"]').each(function(index, element) { var item = $(element); var value = item.val(); if (item.is('[checked]')) { return; } if (value != "{{ $information['contest']->contest_type }}") { item.attr('disabled', 'disabled'); item.button('disable'); } }); } @if (!Auth::user()->isOsaaUser()) @foreach (array('A', 'EX', 'PO') as $type) @if ($information['contest']->contest_type != $type) var item = $('input[type="radio"][name="contest_type"][value="{{ $type }}"]'); item.attr('disabled', 'disabled'); item.button('disable'); @endif @endforeach @endif // Disable cancel, postpone, and delete for playoff contests @if (Helpers::strEqual($information['contest']->contest_type, array('PO'))) $('[data-button-type="reinstate"]').button('disable'); $('[data-button-type="cancel"]').button('disable'); $('[data-button-type="delete"]').button('disable'); $('[data-button-type="postpone"]').button('disable'); @endif // Disable cancel, postpone, and delete for done contests with CTS records @if (!Auth::user()->isOsaaUser() and count($information['ctss']) > 0) $('[data-button-type="reinstate"]').button('disable'); $('[data-button-type="cancel"]').button('disable'); $('[data-button-type="delete"]').button('disable'); $('[data-button-type="postpone"]').button('disable'); @endif // Notify selections: check all or none $('input[type="checkbox"][name="notify_check_all"]').on('change', function() { var action = $(this); var group = action.attr('data-group'); var state = action.is(':checked'); $('input[type="checkbox"][data-group="' + group + '"]').each(function(index, element) { var this_state = $(element).is(':checked'); if (this_state != state) { $(element).click(); } }); }); @stop @section('page_functions') @if ($information['contest']->contest_type == 'PO') Exit @else Exit @endif @stop @section('main_content')

Edit Contest

{{ Form::open(array('url' => url('/contests/edit'), 'class' => 'editContest', 'id' => 'editContest')) }} @if (Session::has('errors'))
@foreach ($errors->all() as $error){{ $error }} @endforeach
@endif {{ Form::hidden('my_team', $information['my_team']) }} {{ Form::hidden('swapping', -1) }}
Status
{{ Helpers::getEventStatusName ($information['event']->event_status) }} {{ Form::hidden('event_status', $information['event']->event_status) }}
Contest ID
{{ $information['contest']->id }} {{ Form::hidden('contest', $information['contest']->id) }}
Event ID
{{ $information['event']->id }} {{ Form::hidden('event', $information['event']->id) }}
@if (!is_null($information['contest']->is_forfeit))
Forfeit

Fatal error: Class 'forfeittype' not found in /home/osaa/web_app/dev/app/views/contests/edit.blade.php on line 518