Orbit/app/assets/javascripts/user_form.js

10 lines
253 B
JavaScript

$(document).ready(function(){
$('#user_role_id').change(function(){
$('#roles .attributes_block').hide();
$('#'+this.value+'_block').toggle();
});
$('.sub_role_select').change(function(){
$('#sub_role_' + this.value).toggle();
});
});