Skip to content

Commit 335abeb

Browse files
committed
added answer-identifier blocks
1 parent 787f902 commit 335abeb

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

app/views/org_admin/question_options/_option_fields.html.erb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
<!-- Get the org owner of the template -->
2+
<% org = Org.find(q.section.phase.template.org_id)%>
3+
14
<div class="row">
25
<div class="col-md-3 bold mb-2">
36
<%= _('Order')%>
47
</div>
58
<div class="col-md-3 mb-2">
6-
<%= f.label(:text, _('Text'), class: "form-label") %>
9+
<%= f.label(:text, _('Text'), class: "control-label") %>
710
</div>
11+
<!--answer indentifier block-->
12+
<% if org.can_add_question_identifiers? %>
13+
<div class="col-md-3 bold mb-2">
14+
<%= _('Answer Identifier')%>
15+
</div>
16+
<%end%>
817
<div class="col-md-3 bold mb-2">
918
<%= _('Default')%>
1019
</div>
@@ -22,7 +31,7 @@
2231
<% options_q.number = i %>
2332
<div class="row mb-2" data-attribute="question_option">
2433
<div class="col-md-3 pe-2">
25-
<%= op.number_field :number, min: 1, class: 'form-control', readonly: true %>
34+
<%= op.number_field :number, min: 1, class: 'form-control' %>
2635
</div>
2736
<div class="col-md-3 pe-2">
2837
<% if i == 1 %>
@@ -31,6 +40,12 @@
3140
<%= op.text_field :text, as: :string, class: 'form-control', spellcheck: true %>
3241
<% end %>
3342
</div>
43+
<!--answer indentifier block-->
44+
<% if org.can_add_question_identifiers? %>
45+
<div class="col-md-3 pe-2">
46+
<%= op.text_field :answer_identifier, as: :string, class: 'form-control', spellcheck: true %>
47+
</div>
48+
<% end %>
3449
<div class="col-md-3 pe-2">
3550
<%= op.check_box :is_default %>
3651
</div>

0 commit comments

Comments
 (0)