@section('page_title') OSAA - Eligibility @stop @section('page_sub_title') Create a New Student Eligibility Request Form @stop @section('scripts') @parent @stop @section('jquery_init') // 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); }) }); // Placeholder functionality $('[data-placeholder]').focus(function() { var input = $(this); if (input.val() == input.attr('data-placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $(this); if (input.val() == '' || input.val() == input.attr('data-placeholder')) { input.addClass('placeholder'); input.val(input.attr('data-placeholder')); } }).blur(); $('[data-placeholder]').parents('form').submit(function() { $(this).find('[data-placeholder]').each(function() { var input = $(this); if (input.val() == input.attr('data-placeholder')) { input.val(''); } }) }); // Shake action items function shakeActionImages (object) { $(object).effect("shake", {distance : 5, times : 1}, 600, function () { $(this).delay(Math.floor(Math.random() * 4000) + 2000); shakeActionImages($(this)); }); } // Info text $('.info_text') .each(function () { var item = $(this); item.prepend(''); // Info icons $('.info_icon') .addClass('ui-icon ui-icon-info') .css({'position' : 'absolute'}); }) .css({'font-size' : '9pt', 'line-height' : '1.25em', 'text-indent' : '20px'}); // Buttons $('.cancel_button') .button({'icons':{'primary':' ui-icon-circle-close'}}) .css({'font-size':'9pt'}) .click(function(event) { return confirm('Are you sure you want to cancel the creation of a new student eligibility request?'); }); $('.submit_button') .button(); /* Help button * */ $('.help_button') .button({'icons':{'primary':'ui-icon-help'}}) .css({'font-size':'9pt', 'margin-right':'10px'}) .click(function(event) { var object = $(this); event.preventDefault(); var topic = object.attr('data-topic'); $('
') .appendTo('body') .dialog( { draggable : true, resizable : true, height : 725, minHeight : 400, width : 615, minWidth : 330, modal : false, title : 'Help', open : function () { var dialog_object = $(this); dialog_object.html(""); var jqxhr = $.ajax( { type : 'GET', url : '{{ url('forms/eligibility/00000000/help') }}?topic=' + topic, dataType : 'html' }) .done(function (returned_data) { dialog_object.html(returned_data); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error looking up help information.\n\nThis page will be reloaded."); location.reload(); }) .complete(function () { }); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }); $('.types_button') .button({'icons':{'primary':'ui-icon-help'}}) .css({'font-size':'9pt','text-indent':'0','float':'right'}) .click(function(event) { var object = $(this); event.preventDefault(); var topic = 'waiver-types'; $('') .appendTo('body') .dialog( { draggable : false, resizable : false, modal : true, height : 550, width : 650, title : 'Types of Waivers', open : function () { var dialog_object = $(this); dialog_object.html(""); var jqxhr = $.ajax( { type : 'GET', url : '{{ url('forms/eligibility/00000000/help') }}?topic=' + topic, dataType : 'html' }) .done(function (returned_data) { dialog_object.html(returned_data); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error looking up help information.\n\nThis page will be reloaded."); location.reload(); }) .complete(function () { }); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }); // Show waiver type information $('#waiver_type').on("change", function() { var select = $(this); // Remove the first option and action item $('option[value="null"]', select).remove(); $('#waiver_action_image').remove(); checkReadiness(); var option = $('option:selected', select); var data = $.parseJSON($(option).attr('data-info')); var html = data.name + '