Commit 95683620 authored by marcheing's avatar marcheing Committed by Diego de Araújo Martinez Camarinha

Change school_fields to coffee script

parent ec211d59
function school_fields(event){
if($('input[name=student]').first().is(':checked')) {
$('#school_fields').css('display', 'block');
$("#profile_school_type").prop('required', true);
$("#user-school-name").prop('required', true);
} else {
$('#school_fields').css('display', 'none');
$("#profile_school_type").prop('required', false);
$("#user-school-name").prop('required', false);
}
}
$('input[name=student]').on('change', school_fields);
school_fields = (event) ->
if $('input[name=student]').first().is(':checked')
$('#school_fields').css('display', 'block')
$('#profile_school_type').prop('required', true)
$('#user-school-name').prop('required', true)
else
$('#school_fields').css('display', 'none')
$('#profile_school_type').prop('required', false)
$('#user-school-name').prop('required', false)
$('input[name=student]').on('change', school_fields)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment