Merge 73424e1bba into dfe0b8188e
This commit is contained in:
commit
0fc4e0c340
1 changed files with 22 additions and 0 deletions
|
|
@ -1,3 +1,18 @@
|
||||||
|
:javascript
|
||||||
|
$(document).ready(function(){
|
||||||
|
var originalState = true;
|
||||||
|
$('form.splashpage .inputs:first .input.checkbox input[type=checkbox]:not(.select-all)').each(function() {
|
||||||
|
originalState = originalState && $(this).is(':checked');
|
||||||
|
});
|
||||||
|
$('form.splashpage .select-all').prop('checked', originalState);
|
||||||
|
|
||||||
|
$('form.splashpage').on('change', '.select-all', function(e) {
|
||||||
|
var value = $(this).is(':checked');
|
||||||
|
var parent = $(this).parents('.inputs:first');
|
||||||
|
parent.find('.input.checkbox input[type=checkbox]').prop('checked', value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
.page-header
|
.page-header
|
||||||
|
|
@ -8,6 +23,13 @@
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= f.inputs name: 'Components' do
|
= f.inputs name: 'Components' do
|
||||||
%ul.fa-ul
|
%ul.fa-ul
|
||||||
|
%li
|
||||||
|
.boolean.input.optional.form-group.checkbox
|
||||||
|
%span.form-wrapper
|
||||||
|
%label.control-label
|
||||||
|
%input.select-all{ type: 'checkbox' }
|
||||||
|
%em Select all
|
||||||
|
|
||||||
%li
|
%li
|
||||||
= f.input :include_cfp, label: 'Display call for papers and call for tracks, while open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) }
|
= f.input :include_cfp, label: 'Display call for papers and call for tracks, while open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) }
|
||||||
%li
|
%li
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue