|
23 | 23 | <%= f.text_area(:text, class: "question", spellcheck: true, "aria-required": true) %> |
24 | 24 | </div> |
25 | 25 |
|
| 26 | + <!--Question Identifiers block - This verifies if org has permission to add question Identifiers--> |
| 27 | + <% org = Org.find(question.section.phase.template.org_id)%> |
| 28 | + <% if org.can_add_question_identifiers? %> |
| 29 | + <div class="form-control mb-3 col-md-10" data-attribute="question_identifier"> |
| 30 | + <%= render "/org_admin/question_identifiers/question_identifier_block", f: f, q: question %> |
| 31 | + </div> |
| 32 | + <% end %> |
| 33 | + |
26 | 34 | <!-- Question format --> |
27 | 35 | <div class="form-control mb-3 col-md-4"> |
28 | 36 | <%= f.label(:question_format_id, _('Answer format'), class: "form-label") %> |
|
31 | 39 | :id, |
32 | 40 | :title, |
33 | 41 | question.question_format_id), |
34 | | - {}, |
35 | | - class: "form-select question_format", |
| 42 | + { include_blank: _("--Select--") }, |
| 43 | + { class: "form-select question_format", |
36 | 44 | 'data-toggle': 'tooltip', |
37 | 45 | 'data-html': true, |
38 | 46 | title: _("You can choose from:<ul><li>- text area (large box for paragraphs);</li> <li>- text field (for a short answer);</li> <li>- checkboxes where options are presented in a list and multiple values can be selected;</li> <li>- radio buttons where options are presented in a list but only one can be selected;</li> <li>- dropdown like this box - only one option can be selected;</li> <li>- multiple select box allows users to select several options from a scrollable list, using the CTRL key;</li></ul>") |
| 47 | + } |
39 | 48 | %> |
40 | 49 | </div> |
41 | 50 |
|
|
47 | 56 | </div> |
48 | 57 |
|
49 | 58 | <% if question.id != nil && question.question_options[0].text != nil %> |
50 | | - <% cond_lbl = conditions&.any? ? 'Edit Conditions' : 'Add Conditions' %> |
51 | | - <%= link_to cond_lbl, org_admin_question_open_conditions_path(question_id: question.id, conditions: conditions), class: "add-logic btn btn-secondary", 'data-loaded': (conditions.size > 0).to_s, remote: true %> |
| 59 | + <%= link_to _('Add Conditions'), org_admin_question_open_conditions_path(question_id: question.id, conditions: conditions), class: "add-logic btn btn-secondary", 'data-loaded': (conditions.size > 0).to_s, remote: true %> |
52 | 60 | <div id="content" class="col-md-offset-2"> |
53 | 61 | <p> |
54 | 62 | <%= render partial: 'org_admin/conditions/container', locals: { f: f, question: question, conditions: conditions } %> |
55 | 63 | </p> |
56 | 64 | </div> |
57 | 65 | <% else %> |
58 | 66 | <div class="form-control mb-3" data-toggle="tooltip", title="<%= _('Save this question before adding conditions.') %>" > |
59 | | - <%= link_to _('Edit Conditions'), '#', class: "add-logic btn btn-secondary disabled" %> |
| 67 | + <%= link_to _('Add Conditions'), '#', class: "add-logic btn btn-secondary disabled" %> |
60 | 68 | </div> |
61 | 69 | <% end %> |
62 | 70 | </div> |
|
90 | 98 | <% end %> |
91 | 99 | <% end %> |
92 | 100 | <!-- Themes --> |
93 | | - <div class="form-control mb-3 col-md-10"> |
| 101 | + <div class="form-group mb-3 col-md-10"> |
94 | 102 | <%= render partial: 'org_admin/shared/theme_selector', |
95 | 103 | locals: { f: f, all_themes: Theme.all.order("title"), as_radio: false, |
96 | 104 | popover_message: _('Select one or more themes that are relevant to this question. This will allow similarly themed organisation-level guidance to appear alongside your question.') } %> |
97 | 105 | </div> |
98 | | - <div class="form-control mb-3 col-md-10"> |
| 106 | + <div class="form-group mb-3 col-md-10"> |
99 | 107 | <div class="float-end"> |
100 | 108 | <%= f.submit _('Save'), class: "btn btn-secondary", role:'button' %> |
101 | 109 | <% if question.id.present? %> |
|
0 commit comments