@section('page_title') OSAA - Invitational Meet Editor @stop @section('page_sub_title') Edit {{ $information['event']['name'] }} @stop @section('scripts') @parent @stop @section('jquery_init') $('.tooltip').tooltip(); $('.tooltip.above').tooltip({ position : {my: "left bottom-15", at: "left top", collision: "flipfit"}}); $('.tooltip.right').tooltip({ position : {my: "left+15 middle", at: "right middle", collision: "flipfit"}}); $('.button').button(); $('.button.notext').button({text:false}); $('.button.edit').button({ icons : { primary : 'ui-icon-pencil'}}); $('.button.delete').button({ icons : { primary : 'ui-icon-closethick'}}); $('.button.drop').button({ icons : { primary : 'ui-icon-circle-close'}}); $('.button.cancel').button({ icons : { primary : 'ui-icon-circle-minus'}}); $('.button.trash').button({ icons : { primary : 'ui-icon-trash'}}); $('.button.clipboard').button({ icons : { primary : 'ui-icon-clipboard'}}); $('.button.print').button({ icons : { primary : 'ui-icon-print'}}); $('.button.add').button({ icons : { primary : 'ui-icon-plusthick'}}); $('.button.next').button({ icons : { secondary : 'ui-icon-triangle-1-e'}}); $('.button.add_teams').button({ icons : { secondary : 'ui-icon-triangle-1-e'}}); $('.button.join').button({ icons : { secondary : 'ui-icon-triangle-1-e'}}); $('.button.next_add').button({ icons : { secondary : 'ui-icon-plus'}}); $('.button.add_more_team_spots').button({ icons : { primary : 'ui-icon-plus'}}); $('.button.create').button({ icons : { secondary : 'ui-icon-triangle-1-e'}}); $('.button.search').button({ icons : { secondary : 'ui-icon-triangle-1-e'}}); $('.button.reset').button({ icons : { primary : 'ui-icon-triangle-1-w'}}); $('.button.submit_scores').button({ icons : { primary : 'ui-icon-circle-arrow-e' }}); $('.home_button').button({ icons : { primary : 'ui-icon-home'}, text : false}).css('height', '24px').css('margin-top', '3px'); $('.team_view_button').button({ icons : { primary : 'ui-icon-bookmark'}}).css('margin-right', '10px').css('margin-top', '3px'); $('.oos_button').button({ icons : { primary : 'ui-icon-note' }}).css('margin-right', '10px').css('margin-top', '3px'); $('.button_set').buttonset(); $('.button_set label').addClass('ui-corner-all'); $('.submit_button').button(); $('#event_date, #event_date2').datepicker({'dateFormat' : 'mm/dd/yy', 'defaultDate' : '{{ json_encode($information['event']['start_at']) }}'}); $('#event_time, #event_time2').timepicker({ 'timeFormat': 'h:i A' , 'step' : 15, 'maxTime' : '10:00pm'}); function updateOOSState () { if ($('#host_is_oos:checked').length > 0) { $('#state').removeAttr('disabled'); } else { $('#state').attr('disabled', 'disabled'); } } updateOOSState (); $('input[name="host_is_oos"]').change(function () { updateOOSState (); }); availableOpponents = {{ json_encode($information['available_opponents']) }}; $('.school_autocomplete').autocomplete( { source : availableOpponents }); $('.location_autocomplete').autocomplete( { source : {{ json_encode($information['available_locations']) }} }); $('.invitation_list_viewer').dialog({ autoOpen : false, buttons : [ { text : 'Done', 'class' : 'float_right', click : function () { $(this).dialog('close'); } } ], draggable : false, height: 'auto', modal : true, open : function () { $('.invitation_list_viewer').html("
"); populateInvitationList(); }, resizable : false, show : { effect : 'highlight', delay : 0, duration : 400, easing : 'easeInOutSine' }, title : {{json_encode($information['event']['name'])}}, width : 900 }); $('#edit_invitation_list').click(function () { $('.invitation_list_viewer').dialog('open'); }); function populateInvitationList(message) { var meet = {{json_encode($information['id'])}}; var jqxhr = $.ajax({ type : 'GET', url : '/meets/' + meet + '/invitation-list?mode=ajax', dataType : 'html' }) .done(function (data){ $('.invitation_list_viewer').html(data); $('.button').button(); $('.button.cancel[data-action="drop"]').click(function () { $('#confirm_drop_dialog_meet') .attr('data-meet', $(this).attr('data-meet')) .attr('data-team', $(this).attr('data-team')) .attr('data-team-name', $(this).attr('data-team-name')) .dialog('open'); }); $('.school_autocomplete').autocomplete( { source : availableOpponents }); $('#add_new_team').click(function(){invite_add_team()}); $('#team_is_oos').change(function () { if ($('#team_is_oos:checked').length > 0) { $('#new_team_state').removeAttr('disabled'); } else { $('#new_team_state').attr('disabled', 'disabled'); } }); $('#new_team_form').submit(function(){return false;}); if(typeof(message) != "undefined") { $(".invitation_list_viewer .message").html(message); $(".invitation_list_viewer .message-box").fadeIn(); } $('.ui-dialog-buttonpane').css('padding', '0').css('font-size', '8pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }) .fail(function (){ $('.invitation_list_viewer').html('There was an error.'); }); } function invite_add_team() { var n = $('#new_team').val().replace(/<\/?[^>]+(>|$)/g, ""); if (n == '') { alert ('You must enter the name of the new team participating in this meet.'); return false; } $('#new_team_state').removeAttr('disabled'); $.ajax({ type: "POST", url: "/meets/add-team", data: $("#new_team_form").serialize(), success: function(data) { console.log(data); populateInvitationList(data); } }); $('.invitation_list_viewer').html("
"); } $('#confirm_drop_dialog_meet').dialog( { autoOpen: false, resizable: false, height: 250, width: 400, modal: true, open: function(){ $('.dropping_team').html($(this).attr('data-team-name')); $('.dropping_meet').html('{{json_encode($information['event']['name'])}}'); }, buttons: { "Yes": function() { var team = $(this).attr('data-team'); var meet = $(this).attr('data-meet'); var team_name = $(this).attr('data-team-name'); $(this).dialog("close"); $('.invitation_list_viewer').html("
"); $.ajax( { type : "POST", url : '{{ url('/meets/drop') }}', data : { 'team' : team, 'meet' : meet }, success : function(data) { populateInvitationList(data); } }); return true; }, "No": function() { $(this).dialog( "close" ); return false; } } }); $('#confirm_delete_dialog_meet').dialog( { autoOpen: false, resizable: false, height:260, width: 400, modal: true, buttons: { "Yes": function() { var team = $(this).attr('data-team'); var meet = $(this).attr('data-meet'); $.ajax( { type : "POST", url : '{{ url('/meets/delete') }}', data : { 'team' : team, 'meet' : meet }, success : function() { window.location.replace("/activities/{{strtolower($information['activity'])}}"); } }); $(this).dialog("close"); return true; }, "No": function() { $(this).dialog( "close" ); return false; } } }); $('.button.delete[data-action="delete"]').click(function () { $('#confirm_delete_dialog_meet').attr('data-meet', $(this).attr('data-meet')) .dialog('open'); }); @stop @section('page_functions') Exit @stop @section('main_content')

Edit Meet

{{ Form::open(array('url' => url('/meets/edit'), 'class' => 'edit_meet', 'id' => 'meet_adder')) }} @if (Session::has('errors'))

@foreach ($errors->all() as $error){{ $error }} @endforeach

@endif @if (Session::has('success'))

{{ Session::get('success') }}

@endif {{ Form::hidden('event_time_zone', $information['event']['time_zone'], array('style' => 'width:100px;')) }} {{ Form::hidden('action', 'EDIT_INV') }}
Meet Type
{{ ($information['meet_type'] == "DUAL") ? "Dual" : "Invitational" }} {{ Form::hidden('meet_type', $information['meet_type']) }}
Meet ID
{{ $information['id'] }} {{ Form::hidden('meet_id', $information['id']) }}
Event ID
{{ $information['event']["id"] }} {{ Form::hidden('event_id', $information['event']["id"]) }}

 

{{ Form::label('meet_name', 'Name of the Meet', array('class' => 'input_label')) }} {{ Form::text('meet_name', $information['event']['name'], array('style' => 'width:300px;', 'maxlength' => '50'))}}

Give this meet a name, like "Gibson Winter Invitational" or "Reynolds Double-Dual." There is no need to include the invited teams in this name, because teams participating in this meet will be displayed on the schedule.


{{ Form::label('event_date', 'Date', array('class' => 'input_label')) }} {{ Form::text('event_date', $meet_date, array('class' => 'team_name', 'style' => 'width:100px;')) }}


{{ Form::label('event_time', 'Time', array('class' => 'input_label')) }} {{ Form::text('event_time', $meet_time, array('style' => 'width:80px;')) }} Pacific


{{ Form::label('multi_day_event', 'Two Day Meet', array('class' => 'input_label')) }} {{ Form::checkbox('multi_day_event', true, $two_day_event, false, array('style' => 'position: relative; top: 2px;')) }}

{{ Form::label('location', 'Location', array('class' => 'input_label')) }} @if (empty($eventLocation)) {{ Form::text('location', $information['host_team_name'], array('style' => 'width:300px;', 'class'=>'location_autocomplete')) }}
@else {{ Form::text('location', $information['event']['location_name'], array('style' => 'width:300px;', 'class'=>'location_autocomplete')) }}
@endif

If the meet is not being held at the host school, enter in a location


{{ Form::label('host_team', 'Host Team', array('class' => 'input_label')) }} {{ Form::text('host_team', $host_team, array('style' => 'width:215px;', 'class' => 'school_autocomplete')) }}

{{ Form::label('host_is_oos', 'OOS', array('class' => 'input_label')) }} {{ Form::checkbox('host_is_oos', true, $information['host_team_oos']) }}