Form check passed, now please wait while your form is submitted, this may take a while to process...
');
// Submit the form
window.location.href = "{{ url('/forms/coop-application/' . $info['form']->id . '/submit') }}";
}
},
{
text : "Cancel",
'class' : "float_right",
'data-autofocus' : "true",
icons : { primary : 'ui-icon-cancel'},
click : function()
{
// Close the dialog box
$(this).dialog("close");
}
}
],
open : function ()
{
var dialog_object = $(this);
var html = '
';
html += '';
html += 'Are you sure you want to submit this application??';
html += '
';
html += '
Your form has passed initial inspection for all of the required information. Please note that once you submit this form, you will not be able to make any changes.
';
html += '
';
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();
},
close : function ()
{
var dialog_object = $(this);
$(dialog_object).remove();
}
});
})
.fail(function (jqXHR, status, error)
{
var response = jqXHR.responseText;
var errorData = $.parseJSON(response);
//console.log(errorData);
alert("There was an error checking form's data.\n\n" + errorData.error.message + "\n\nThis page will be reloaded.");
location.reload();
});
});
/*
* Withdraw Button
*/
$('[data-action="withdraw"]')
.click(function(event)
{
event.preventDefault();
var button = $(this);
$('')
.appendTo('body')
.dialog(
{
modal : true,
draggable : true,
resizable : false,
height : 375,
width : 600,
title : 'Confirm Form Withdrawal',
buttons: [
{
text : "Withdraw Form",
'class' : "float_left",
icons : { primary : 'ui-icon-check'},
click : function()
{
var reason = $('[name="withdraw_notes"]').val();
if (reason == '')
{
alert('In order to withdraw this form, you must provide a reason.');
return;
}
if ($('[name="send_notification_wtdn"]', $(this)).is('[type="hidden"]'))
{
var notify = 1;
}
else
{
if ($('[name="send_notification_wtdn"]', $(this)).is(':checked'))
{
var notify = 1;
}
else
{
var notify = 0;
}
}
var data = { 'reason' : reason,
'notify' : notify,
'form_id' : {{ $info['form']->id }} };
$('
');
// Submit the change
var jqxhr = $.ajax(
{
type : 'POST',
url : '{{ url('/forms/coop-application/' . $info['form']->id . '/withdraw') }}',
data : data,
dataType : 'html'
})
.done(function (data)
{
// Reload of refresh is specified
window.location.href = "{{ url('/forms/coop-application/') }}";
})
.fail(function (jqXHR, status, error)
{
var response = jqXHR.responseText;
var errorData = $.parseJSON(response);
//console.log(errorData);
alert ("There was an error saving changes.\n\nThis page will be reloaded.");
location.reload();
});
}
},
{
text : "Cancel",
'class' : "float_right",
'data-autofocus' : "true",
icons : { primary : 'ui-icon-cancel'},
click : function()
{
// Close the dialog box
$(this).dialog("close");
}
}
],
open : function ()
{
var dialog_object = $(this);
var html = '
';
html += '';
html += 'Are you sure you want to withdraw your coop application form?';
html += '
';
html += '
This cannot be undone. If you withdraw your form, your application cannot be reinstated. If you do want to withdraw this form, please provide a reason below.
';
html += ' Suggested Reasons:';
html += '';
@if (Auth::check() and Auth::user()->isOsaaUser())
html += '';
@else
html += '';
@endif
html += '
Reason for Withdrawal ';
html += ''
html += '
';
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();
$('[name="withdraw_reasons"]', dialog_object).change(function()
{
var value = $(this).val();
$('[name="withdraw_notes"]').text(value);
});
},
close : function ()
{
var dialog_object = $(this);
$(dialog_object).remove();
}
});
});
@if (Auth::user()->isOsaaUser())
@endif
/* showCheckResults
*
* Shows the results of the form check operation.
*/
function showCheckResults(check)
{
var pass = check[0];
if (pass)
{
$('')
.appendTo('body')
.dialog(
{
draggable : true,
resizable : false,
height : 280,
width : 400,
modal : true,
title : 'Form Check: Pass',
open : function ()
{
var dialog_object = $(this);
var html = '
';
html += '
';
html += '';
html += 'Your Form Passed Inspection';
html += '
';
html += 'All required information has been provided. This coop application form is ready to be submitted.
When you are ready, click the "Submit" button submit your form to the OSAA.
';
dialog_object.html(html);
$('.close_button', dialog_object)
.button({'icons' : {'secondary' : 'ui-icon-check'}})
.css({'font-size' : '9pt'})
.focus()
.click(function(event)
{
event.preventDefault();
dialog_object.dialog('close');
});
},
close : function ()
{
var dialog_object = $(this);
$(dialog_object).remove();
}
});
}
}
/* Positioned elements
*
* Elements that contain the attribute data-position="true" will be positioned
* using JQuery's UI positioning utility. Other expected attributes define the
* element's position:
* data-position-my
* data-position-at
* data-position-of
*/
$('[data-position="true"]').each(function()
{
var element = $(this);
var my = element.attr('data-position-my');
var at = element.attr('data-position-at');
var of = element.attr('data-position-of');
var options = $.parseJSON('{ "my" : "' + my + '", "at": "' + at + '", "of": "' + of + '"}');
element.position(options);
});
// Required field marker
$('[data-required]:not([data-required-indicator])').after('*');
// Date picker
$('[data-date-picker]').datepicker({'dateFormat':'mm/dd/yy'});
// Table row highlighter
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();
/* alertRequiredField
*
* Shows an alert box when attempting to save a blank value to a required field.
*/
function alertRequiredField()
{
$('')
.appendTo('body')
.dialog(
{
modal : true,
draggable : false,
resizable : false,
height : 275,
width : 415,
title : 'Required Field',
buttons: [
{
text : "OK",
'class' : "float_right",
icons : { primary : 'ui-icon-check'},
click : function()
{
// Close the dialog box
$(this).dialog("close");
}
}
],
open : function ()
{
var dialog_object = $(this);
dialog_object.html(' You\'ve entered in a blank value for a required field. Required fields cannot be empty.
You can check to see if you have provided all of the required information by clicking the Run Check button at the top of the form. Once you have provided all of the required information, click Submit to submit your application to the OSAA. If you have any questions, please contact OSAA Associate Director Kelly Foster, {{ Helpers::obfuscateEmailLink('kellyf@osaa.org') }} or (503) 682-6722 x233.
Your form has been submitted and the OSAA is reviewing your coop application. If you have any questions, please contact OSAA Associate Director Kelly Foster, {{ Helpers::obfuscateEmailLink('kellyf@osaa.org') }} or (503) 682-6722 x233.
This form has been marked as finished. The OSAA office has received all of the required information and has mailed a reimbursement check to your school. No further action is required for this report. If you have any questions, please contact OSAA Business Operations Manager Candy Posey, {{ Helpers::obfuscateEmailLink('candyp@osaa.org') }} or (503) 682-6722 x225.
@endif
Required fields are indicated with a red asterisk, *.
{{-- Coop Application Form --}}
Coop Information - {{ implode(' / ', $info['coop_names']) }}
Select the league in which you wish to join and compete.
@foreach ($info['school_data_objects'] as $index => $data_object_name)
Fatal error: Cannot break/continue 1 level in /home/osaa/web_app/dev/app/views/coop_form/edit.blade.php on line 1930