<?php $__env->startSection('page_title'); ?>
    OSAA - Scholar Program
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
    Order OSAA Foundation Scholar Program Certificates
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent

    <style type="text/css">
        /* Success Bar */
        .success_bar {
          position: fixed;
          top: 600px;
          left: 0;
          width: 100%;
          padding: 0.25em 0;
          line-height: 1.5em;
          background-color: rgba(176, 255, 190, 0.0);
          border-bottom: 2px solid rgba(13, 88, 27, 0.50);
          border-top: 2px solid rgba(13, 88, 27, 0.50);
          z-index: 500;
        }

        .success_bar .message {
          width: 1200px;
          margin: 0 auto;
          font-size: 14pt;
          color: #151515;
        }
    </style>

	
<?php $__env->stopSection(); ?>

<?php $__env->startSection('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);
      })
    });

    /* Update school address */
    $('#school').on('change', function ()
    {
        var select = $(this);
        var option = $(':selected', select);
        var line_1 = option.attr('data-address-line_1');
        var line_2 = option.attr('data-address-line_2');
        var city = option.attr('data-address-city');
        var state = option.attr('data-address-state');
        var zip = option.attr('data-address-zip');

        var address = 'ATTN: <?php echo $info['addressee']; ?>';
        address = address + '<br />' + line_1;
        if (line_2 != '')
        {
            address = address + '<br />' + line_2;
        }
        address = address + '<br />' + city + ', ' + state + ' ' + zip;

        $('#address').html(address);


    }).change();

    /* Limit input to numbers only */ 
    $('[data-numbers-only]').bind('input', function()
    {
          $(this).val($(this).val().replace(/[^0-9]/gi, ''));
    }); 

    $('#date').datepicker();

    $('#submit')
        .button()
        .css({'margin-left' : '50px',
              'font-size' : '10pt',
              'position' : 'relative',
              'top' : '-1.5em'});
	

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?>
    
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>    		
	 
    <?php /*  Success Bar  */ ?>
    <?php if (Session::has('success')): ?>
      <div class="success_bar">
        <div class="message">       
          <?php echo Session::get('success'); ?>
        </div>      
      </div>
    <?php endif; ?>

    <?php if (Session::has('errors')): ?>                
        <div class="ui-state-error" style="padding: 1em 0.5em;">
            <span class="ui-icon ui-icon-alert" style="display:inline-block; position:relative; top:2px;"></span>
            <?php foreach ($errors->all() as $error): ?><?php echo $error; ?> <?php endforeach; ?>
            </div>
        <br />
    <?php endif; ?>

    <br />

    <img src="<?php echo asset('/images/logos/foundation.jpg'); ?>" alt="" title="" style="float: right; margin: 0 0 1em 1em;" />

    <?php if (!$info['logged_in']): ?>

        <h1>Login Required</h1>

        <p>
            You must be logged in to your OSAA website account with administrative access in order to request certificates for the OSAA Foundation Scholar Program.
        </p>
        <p>
            <a href="<?php echo url('/account/login?redirect=/forms/awards/scholar'); ?>">&raquo; Login</a>
        </p>


    <?php elseif (count($info['schools']) == 0): ?>

        <h1>Insufficient Access</h1>

        <p>
            Your OSAA account is not linked to any school with administrative access.  Only school administrators (Principal, Athletic Director, AD Secretary, Activities Director, etc.) are allowed to order certificates.
        </p>
        <p>
            <a href="<?php echo url('/help'); ?>">&raquo; Help</a>
        </p>

    <?php else: ?>

        <h1>About the Scholar Program</h1>
        <p>
            The OSAA Foundation sponsors the Scholar Program, focusing on graduating seniors at OSAA member schools. Seniors who have achieved a 3.50 or higher cumulative GPA and earned a varsity letter in an OSAA-sanctioned sport (Scholar Athletes) or competed in an OSAA-sanctioned activity (Activity Scholars) are eligible. Each senior receives a certificate of achievement from the OSAA. Graduating seniors who earned varsity letters or participated in activities during freshman, sophomore or junior years, but not during senior year, are still eligible.
        </p>
        <p>
            OSAA-sanctioned sports: Cross Country, Volleyball, Soccer, Football, Wrestling, Swimming, Basketball, Golf, Tennis, Track & Field, Baseball and Softball
        </p>
        <p>
            OSAA-sanctioned activities: Cheerleading, Dance/Drill, Speech, Solo Music, Choir, Band, Orchestra
        </p>      

        <h2>Frequently Asked Questions</h2>

        <p>
            Can a student earn both a Scholar Athlete and an Activity Scholar certificate?<br />
            Yes, students are eligible to receive both certificates if he/she meets the criteria.
        </p>
        <p>
            Can we get certificates for students who have participated in water polo or lacrosse?<br />
            No, the OSAA Scholar Program only recognizes students who have participated in OSAA-sanctioned activities (see above listing).
        </p>

        <br />

        <?php echo Form::open(array('url' => '/forms/awards/scholar')); ?>
            <h1>Order Form</h1>

            <div class="columns">
                <div class="half">
                    <b>Select Your School</b><br />
                    <select id="school" name="school">
                        <?php foreach ($info['school_objects'] as $school_object): ?>

                            <?php if (!is_null($school_object->address)): ?>
                                <option value="<?php echo $school_object->school->id; ?>"
                                        data-address-line_1="<?php echo $school_object->address->line_1; ?>"
                                        data-address-line_2="<?php echo $school_object->address->line_2; ?>"
                                        data-address-city="<?php echo $school_object->address->city; ?>"
                                        data-address-state="<?php echo $school_object->address->state; ?>"
                                        data-address-zip="<?php echo $school_object->address->zip; ?>"><?php echo $school_object->school->short_name; ?></option>
                            <?php else: ?>
                                <option value="<?php echo $school_object->school->id; ?>"><?php echo $school_object->school->short_name; ?></option>
                            <?php endif; ?>

                        <?php endforeach; ?>
                    </select>

                    <div class="small gray note">
                        Select your school from the drop-down list above and your school's mailing address will be updated on the right.
                    </div>
                </div>

                <div class="fourth">
                    <b>Mailing Address</b><br />
                    <div id="address"></div>              
                </div>
            </div>

            <br class="clear" /><br />

            <div class="columns">
                <div class="fifth">
                    <b># of Scholar Athletes</b><br />
                    <input type="text" id="number_scholar_athletes" name="number_scholar_athletes" maxlength="3" style="width: 50px;" data-numbers-only="true" />
                    <?php /* <span class="small gray note">Out of Stock</span> */ ?>
                </div>

                <div class="fifth">
                    <b># of Activity Scholars</b><br />
                    <input type="text" id="number_activity_scholars" name="number_activity_scholars" maxlength="3" style="width: 50px;" data-numbers-only="true" />
                </div>

                <div class="third">
                    <b>Date of Awards Banquet</b><br />
                    <input type="text" id="date" name="date" style="width: 90px;" />
                </div>
            </div>

            <br class="clear" /><br />

            <b>Notes</b><br />
            <textarea id="notes" name="notes" style="height: 4em; width: 60%;"></textarea>

            <?php echo Form::submit('Submit', array('id' => 'submit')); ?>

            <br class="clear" />

            <div class="small gray note">
                When you submit this form, an e-mail will be sent to the OSAA with your order.  You will also be copied on this e-mail for confirmation.  Your order will be processed within 3 business days.  Expect certificates in the mail to be delivered within one week of your order.
            </div>

        <?php echo Form::close(); ?>

    <?php endif; ?>

<?php $__env->stopSection(); ?>