|
2 | 2 | download_coversheet_tickbox_checked = Rails.configuration.x.plans.download_coversheet_tickbox_checked || false |
3 | 3 | %> |
4 | 4 | <%= form_tag(plan_export_path(@plan), method: :get, target: '_blank', id: 'download_form') do |f| %> |
5 | | - |
6 | 5 | <h2><%= _('Format') %></h2> |
7 | 6 | <div class="row"> |
8 | 7 | <div class="form-control mb-3 col-sm-2"> |
9 | 8 | <%= select_tag :format, options_for_select(Settings::Template::VALID_FORMATS, :pdf), |
10 | 9 | class: 'form-select', "aria-labelledby": "format" %> |
11 | 10 | </div> |
12 | 11 | </div> |
13 | | - |
14 | 12 | <div id="download-settings"> |
15 | | - <h2><%= _("Download settings") %></h2> |
16 | | - <%= hidden_field_tag 'export[form]', true %> |
17 | | - <% if @phase_options.length > 1 %> |
18 | | - <div class="form-control mb-5"> |
19 | | - <%= label_tag(:phase_id, _("Select phase to download"), class: 'form-label') %> |
20 | | - <%= select_tag(:phase_id, options_for_select(@phase_options, @phase_options[0]), class: 'form-select') %> |
| 13 | + <div class="row"> |
| 14 | + <div class="col-12"> |
| 15 | + <h2><%= _("Download settings") %></h2> |
21 | 16 | </div> |
22 | | - <% else %> |
23 | | - <%= hidden_field_tag(:phase_id, @phase_options[0][1]) %> |
24 | | - <% end %> |
25 | | - <fieldset> |
26 | | - <legend><%= _("Optional plan components") %></legend> |
27 | | - <div class="form-check"> |
28 | | - <%= label_tag 'export[project_details]', class:'form-check-label' do %> |
29 | | - <%= check_box_tag 'export[project_details]', true, download_coversheet_tickbox_checked %> |
30 | | - <%= _('project details coversheet') %> |
31 | | - <% end %> |
32 | | - </div> |
33 | | - <div class="form-check"> |
34 | | - <%= label_tag 'export[question_headings]', class:'form-check-label' do %> |
35 | | - <%= check_box_tag 'export[question_headings]', true, true %> |
36 | | - <%= _('question text and section headings') %> |
37 | | - <% end %> |
38 | | - </div> |
39 | | - <div class="form-check"> |
40 | | - <%= label_tag 'export[unanswered_questions]', class:'form-check-label' do %> |
41 | | - <%= check_box_tag 'export[unanswered_questions]', true, true %> |
42 | | - <%= _('unanswered questions') %> |
43 | | - <% end %> |
44 | | - </div> |
45 | | - <% if @plan.research_outputs.any? %> |
46 | | - <div class="form-check"> |
47 | | - <%= label_tag 'export[research_outputs]', class:'form-check-label' do %> |
48 | | - <%= check_box_tag 'export[research_outputs]', true, true %> |
49 | | - <%= _('research outputs') %> |
| 17 | + </div> |
| 18 | + <div class="row"> |
| 19 | + <div class="col-sm-12 col-lg-6"> |
| 20 | + <fieldset> |
| 21 | + <legend><%= _("Optional plan components") %></legend> |
| 22 | + <div class="form-check"> |
| 23 | + <%= label_tag 'export[project_details]', class:'form-check-label' do %> |
| 24 | + <%= check_box_tag 'export[project_details]', true, download_coversheet_tickbox_checked %> |
| 25 | + <%= _('project details coversheet') %> |
| 26 | + <% end %> |
| 27 | + </div> |
| 28 | + <div class="form-check"> |
| 29 | + <%= label_tag 'export[question_headings]', class:'form-check-label' do %> |
| 30 | + <%= check_box_tag 'export[question_headings]', true, true %> |
| 31 | + <%= _('question text and section headings') %> |
| 32 | + <% end %> |
| 33 | + </div> |
| 34 | + <div class="form-check"> |
| 35 | + <%= label_tag 'export[unanswered_questions]', class:'form-check-label' do %> |
| 36 | + <%= check_box_tag 'export[unanswered_questions]', true, true %> |
| 37 | + <%= _('unanswered questions') %> |
| 38 | + <% end %> |
| 39 | + </div> |
| 40 | + <% if @plan.research_outputs.any? %> |
| 41 | + <div class="form-check"> |
| 42 | + <%= label_tag 'export[research_outputs]', class:'form-check-label' do %> |
| 43 | + <%= check_box_tag 'export[research_outputs]', true, true %> |
| 44 | + <%= _('research outputs') %> |
| 45 | + <% end %> |
| 46 | + </div> |
50 | 47 | <% end %> |
51 | | - </div> |
52 | | - <% end %> |
53 | | - <% if @plan.template.customization_of.present? %> |
54 | | - <div class="form-check"> |
55 | | - <%= label_tag 'export[custom_sections]', class:'form-check-label' do %> |
56 | | - <%= check_box_tag 'export[custom_sections]', true, false %> |
57 | | - <%= _('supplementary section(s) not requested by funding organisation') %> |
| 48 | + <% if @plan.template.customization_of.present? %> |
| 49 | + <div class="form-check"> |
| 50 | + <%= label_tag 'export[custom_sections]', class:'form-check-label' do %> |
| 51 | + <%= check_box_tag 'export[custom_sections]', true, false %> |
| 52 | + <%= _('supplementary section(s) not requested by funding organisation') %> |
| 53 | + <% end %> |
| 54 | + </div> |
58 | 55 | <% end %> |
| 56 | + </fieldset> |
| 57 | + </div> |
| 58 | + <%= hidden_field_tag 'export[form]', true %> |
| 59 | + <% if @phase_options.length > 1 %> |
| 60 | + <div class="form-control col-sm-12 col-lg-6"> |
| 61 | + <%= label_tag(:phase_id, _("Select phase to download"), class: 'form-label') %> |
| 62 | + <%= select_tag(:phase_id, options_for_select(@phase_options, @phase_options[0]), class: 'form-select') %> |
59 | 63 | </div> |
| 64 | + <% else %> |
| 65 | + <%= hidden_field_tag(:phase_id, @phase_options[0][1]) %> |
60 | 66 | <% end %> |
61 | | - </fieldset> |
| 67 | + </div> |
62 | 68 | </div> |
63 | | - |
64 | 69 | <div id="pdf-formatting" class="py-3"> |
65 | 70 | <h2><%= _('PDF formatting') %></h2> |
66 | 71 | <div class="d-flex flex-row"> |
|
87 | 92 | class: 'form-select', |
88 | 93 | "data-default": @plan.template.settings(:export).formatting[:font_size] %> |
89 | 94 | </div> |
90 | | - |
91 | 95 | <div class="form-control mb-3 px-2 col-sm-1"> |
92 | 96 | <%= label_tag "export[formatting][margin][top]", _('Top'), |
93 | 97 | class: 'form-label' %> |
|
126 | 130 | </div> |
127 | 131 | </div> |
128 | 132 | </div> |
129 | | - |
130 | 133 | <%= button_tag(sanitize(_("Download Plan <em class=\"sr-only\">(new window)</em><span class=\"new-window-popup-info\">%{open_in_new_window_text}</span>") % { open_in_new_window_text: _('Opens in new window') }, |
131 | 134 | tags: %w{ span em }), |
132 | 135 | class: "btn btn-primary has-new-window-popup-info", |
|
0 commit comments