diff --git a/app/views/branded/org_admin/question_options/_option_fields.html.erb b/app/views/branded/org_admin/question_options/_option_fields.html.erb new file mode 100644 index 0000000..1bb60f2 --- /dev/null +++ b/app/views/branded/org_admin/question_options/_option_fields.html.erb @@ -0,0 +1,43 @@ +
+
+ <%= _('Order')%> +
+
+ <%= _('Text')%> +
+
+ <%= _('Default')%> +
+
+
+
+<% if q.question_options.count == 0 %> + <% 2.times {q.question_options.build } %> +<% end %> +<% i = 0 %> + <% q.question_options.to_a.sort_by{|op| op['number']}.each do |options_q| %> + <%= f.fields_for :question_options, options_q do |op|%> + <% i = i + 1 %> + <% options_q.number = i %> +
+
+ <%= op.number_field :number, min: 1, class: 'form-control' %> +
+
+ <%= op.text_field :text, as: :string, class: 'form-control' %> +
+
+ <%= op.check_box :is_default %> +
+
+ <%= op.hidden_field :_destroy, class: 'destroy-question-option' %> + <%= _('Remove') %> +
+
+ <% end %> + <% end %> +
+
+ <%= _('Add option') %> +
+