mirror of
https://github.com/openSUSE/osem.git
synced 2026-05-24 16:43:03 -04:00
30 lines
898 B
Plaintext
30 lines
898 B
Plaintext
.row
|
|
.col-md-6
|
|
%legend Question
|
|
.form-group
|
|
= f.label :title, 'Your Question'
|
|
= f.text_field :title, class: 'form-control'
|
|
.form-group
|
|
= f.select :question_type_id, QuestionType.all.pluck(:title, :id), {}, { class: 'form-control' }
|
|
.checkbox
|
|
%label
|
|
= f.check_box :global
|
|
Make Global
|
|
%span.help-block
|
|
Global questions are available for selection to all conferences
|
|
.col-md-6.hidden{id: 'answers_col'}
|
|
= dynamic_association :answers, 'Answers', f,
|
|
hint: 'Insert your answers in the order you want them to appear'
|
|
|
|
:javascript
|
|
$("#question_question_type_id").change(function () {
|
|
|
|
var selected_type = $(this).find('option:selected').text();
|
|
|
|
if (selected_type == 'Yes/No')
|
|
$('#answers_col').addClass('hidden');
|
|
else
|
|
$('#answers_col').removeClass('hidden');
|
|
end
|
|
});
|