@section('page_title') OSAA Staff @stop @section('header') Mass E-mail Lists @stop @section('jquery_init') $('input[type="checkbox"]').css('vertical-align', 'middle'); $('.button.all').button({ icons : { primary : 'ui-icon-check'}}); $('.button.none').button({ icons : { primary : 'ui-icon-cancel'}}); $('.button.create') .button({ icons : { primary : 'ui-icon-play'}}) .css('font-size', '11pt'); $('.button.create_contacts') .button({ icons : { primary : 'ui-icon-play'}}) .css('font-size', '11pt'); $('table tbody tr:even').css('background-color', '#f2f2f2'); $("#schools tbody tr[is_retired]").css('background-color', '#7d7b7d'); function update_select_info () { var total = {{ count($information['schools']) }}; var selected = $('input[data-school]:checked').size(); var text = "(" + selected + " of " + total + " selected)"; $('#select_info').html(text); } update_select_info(); $('input[data-school]').change(function () { update_select_info(); }); $('.button.all').click(function () { $('input[data-school]').each(function () { if (!$(this).is(':checked')) { $(this).click(); } }); update_select_info(); }); $('.button.none').click(function () { $('input[data-school]').each(function () { if ($(this).is(':checked')) { $(this).click(); } }); update_select_info(); }); $('.button.create').click(function () { $('form.mail_list_creator').submit(); }).hover( function () { $(this).addClass('ui-state-active'); }, function () { $(this).removeClass('ui-state-active'); } ); $('.button.create_contacts') .hover( function () { $(this).addClass('ui-state-active'); }, function () { $(this).removeClass('ui-state-active'); } ) .click(function () { var form = $('form.mail_list_creator'); var input = $('') .attr('type', 'hidden') .attr('name', 'contacts') .attr('value', 'true') .appendTo(form); form.submit(); }); $('.button.classification').click(function () { var classification = $(this).attr('data-classification'); $("input[data-school][data-classification='" + classification + "']").each(function () { if (!$(this).is(':checked')) { $(this).click(); } }); update_select_info(); }); @stop @section('content')

Create a Mass E-mail List

{{ Form::open(array('url' => url('/admin/downloadEmailList'), 'method' => 'POST', 'class' => 'mail_list_creator')) }}

Select School(s)

Select All
Select None


Add All Schools in Classification
6A
5A
4A
3A
2A
1A


@if (count($information['schools']) > 0) @foreach ($information['schools'] as $school)
{{ Form::checkbox('school_' . $school->id, true, false, array('data-school' => 'true', 'id' => 'school_' . $school->id, 'data-classification' => $school->classification)) }} {{ Form::label('school_' . $school->id, $school->name) }}
@endforeach @else There are no member schools to select. @endif

Select Administrative Role(s)

@foreach ($information['admin_role_select'] as $key => $value) {{ Form::checkbox('role_' . $value, true, false, array('data-role-admin' => 'true', 'id' => 'role_' . $value)) }} {{ Form::label('role_' . $value, $value) }}
@endforeach



Select Activity Specific Role(s)

@foreach ($information['coach_role_select'] as $key => $value)
{{ Form::checkbox('coach_' . $value, true, false, array('data-role-admin' => 'true', 'id' => 'coach_' . $value)) }} {{ Form::label('coach_' . $value, $value) }}
@endforeach



Select Activity(ies)

@foreach ($information['activities'] as $key => $value) @if (Helpers::strEqual($key, array('BBX', 'BBL')))
@endif {{ Form::checkbox('act_' . $key, true, false, array('data-role-admin' => 'true', 'id' => 'act_' . $key)) }} {{ Form::label('act_' . $key, $value) }}
@endforeach

Filter Schools Offering an Activity

{{ Form::checkbox('filter_activity', true, false, array('class' => 'button', 'id' => 'filter_activity')) }} {{ Form::label('filter_activity', 'Filter Activity', array('style' => 'font-size: 10pt;')) }}
Select this option to further filter the list of selected schools to only those that are also offering the activity or activities selected above.

Instructions

First, select the schools you want to e-mail. Click "Select All" to select all member schools. Click "Select None" to clear all selections and essentially start over. The total number of schools selected is shown below the list of schools.


You can also add to your school selections all schools within one or more classifications by clicking the corresponding buttons.


Next, you need to specify who should be receiving the e-mail for the selected schools. Selecting an administrative role will add all individuals matching that position for each selected school.


You can also select activity specific roles. If you do not specify any activities, then all sport coaches or managers will be collected and added to the list.


If you want to limit the select schools further to only those that offer a specific activity or several activities, you can click the "Filter Activity" button.



@if (Session::has('errors'))
@foreach ($errors->all() as $error){{ $error }} @endforeach

@endif

Create List

Download BCC List


This will download a text file with the compiled e-mail list (showing names and skipping duplicates.) Select all (CTRL + A), copy (CTRL + C), then paste (CTRL + V) into the BCC filed in a new e-mail.


Download Contacts


This will download a CSV file with the compiled e-mail contacts that you can upload into Outlook.

{{ Form::close() }}
@stop