@extends('layouts.site')
@section('meta_title', 'Enrollment')
@section('content_header')
    @include('partials._components._heading', ['heading' => 'Enroll'])
@endsection
@section('content')
    <section class="site-main-section">
        <div class="container-centered-large">
            <div class="site-card">
                <div class="panel-heading">
                    @if ($page->hasContent())
                        {!! $page->getContent() !!}
                    @endif
                </div>
                <div class="panel-body clearfix">
                    {!! form($form) !!}
                </div>
            </div>
        </div>
    </section>
@endsection

@section('js')
    @parent
    @include('partials._participant.conditionals')
    <script type="text/javascript">
        jQuery(function($) {
            $('#enrollment-form').find('select').each(function () {
                var $select = $(this);

                $select.attr('data-native-select', 'true');

                if ($select.hasClass('select2-hidden-accessible')) {
                    $select.select2('destroy');
                }
            });
        });
    </script>
@endsection
