19 lines
559 B
HTML
19 lines
559 B
HTML
<div id="visibility-form-{{cell.get_reference}}">
|
|
{{ visibility_form.as_p }}
|
|
<script>
|
|
$(function() {
|
|
var $form = $('#visibility-form-{{cell.get_reference}}');
|
|
$form.find('select').first().on('change', function() {
|
|
var val = $(this).val();
|
|
var $groups = $form.find('select').last().parent('p');
|
|
if (val == 'groups-any' || val == 'groups-none') {
|
|
$groups.show();
|
|
} else {
|
|
$groups.hide();
|
|
}
|
|
});
|
|
$form.find('select').first().trigger('change');
|
|
});
|
|
</script>
|
|
</div>
|