Allow random selection for ProxyExercise

This commit is contained in:
Sebastian Serth
2023-01-20 20:56:20 +01:00
parent d05d69756d
commit 2679f5fa56
9 changed files with 45 additions and 10 deletions

View File

@@ -6,6 +6,9 @@
.mb-3
= f.label(:description, class: 'form-label')
= f.pagedown :description, input_html: { preview: true, rows: 10 }
.mb-3
= f.label(:algorithm, class: 'form-label')
= f.collection_select(:algorithm, ProxyExercise.algorithms.map { |algorithm, _id| [t("activerecord.attributes.proxy_exercise.algorithm_type.#{algorithm}"), algorithm] }, :second, :first, {}, class: 'form-control form-control-sm')
.form-check.mb-3
label.form-check-label
= f.check_box(:public, class: 'form-check-input')