mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 06:01:12 +00:00
Merge pull request #531 from differentreality/questions_fixed_answers_for_yes_no
Do not require answers if it is a yes or no question.
This commit is contained in:
commit
dfc7fccc07
2 changed files with 17 additions and 1 deletions
|
|
@ -5,6 +5,18 @@
|
|||
= f.input :question_type
|
||||
= f.input :global, label: 'Make Global',
|
||||
hint: '(Global questions are available for selection to all conferences)'
|
||||
.col-md-6
|
||||
.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
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue