|
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 | | - class: 'form-control', "aria-labelledby": "format" %> |
| 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])) %> |
| 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="form-control col-sm-12 col-lg-6"> |
| 20 | + <fieldset> |
| 21 | + <legend class="col-form-label"><%= _("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: 'col-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"> |
|
77 | 82 | <%= select_tag "export[formatting][font_face]", |
78 | 83 | options_for_select(Settings::Template::VALID_FONT_FACES, |
79 | 84 | @export_settings.formatting[:font_face]), |
80 | | - class: 'form-control', |
| 85 | + class: 'form-select', |
81 | 86 | "data-default": @plan.template.settings(:export).formatting[:font_face] %> |
82 | 87 | </div> |
83 | 88 | <div class="form-control mb-3 px-2 col-sm-2"> |
84 | 89 | <%= label_tag "export[formatting][font_size]", _('Size') + " (pt)", class: 'form-label' %> |
85 | 90 | <%= select_tag "export[formatting][font_size]", |
86 | 91 | options_for_select(Settings::Template::VALID_FONT_SIZE_RANGE.to_a, @export_settings.formatting[:font_size]), |
87 | | - class: 'form-control', |
| 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' %> |
94 | 98 | <%= select_tag "export[formatting][margin][top]", |
95 | 99 | options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a, |
96 | 100 | @export_settings.formatting[:margin][:top]), |
97 | | - class: 'form-control', |
| 101 | + class: 'form-select', |
98 | 102 | "data-default": @plan.template.settings(:export).formatting[:margin][:top] %> |
99 | 103 | </div> |
100 | 104 | <div class="form-control mb-3 px-2 col-sm-1"> |
|
103 | 107 | <%= select_tag "export[formatting][margin][bottom]", |
104 | 108 | options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a, |
105 | 109 | @export_settings.formatting[:margin][:bottom]), |
106 | | - class: 'form-control', |
| 110 | + class: 'form-select', |
107 | 111 | "data-default": @plan.template.settings(:export).formatting[:margin][:bottom] %> |
108 | 112 | </div> |
109 | 113 | <div class="form-control mb-3 px-2 col-sm-1"> |
|
112 | 116 | <%= select_tag "export[formatting][margin][left]", |
113 | 117 | options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a, |
114 | 118 | @export_settings.formatting[:margin][:left]), |
115 | | - class: 'form-control', |
| 119 | + class: 'form-select', |
116 | 120 | "data-default": @plan.template.settings(:export).formatting[:margin][:left] %> |
117 | 121 | </div> |
118 | 122 | <div class="form-control mb-3 px-2 col-sm-1"> |
|
121 | 125 | <%= select_tag "export[formatting][margin][right]", |
122 | 126 | options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a, |
123 | 127 | @export_settings.formatting[:margin][:right]), |
124 | | - class: 'form-control', |
| 128 | + class: 'form-select', |
125 | 129 | "data-default": @plan.template.settings(:export).formatting[:margin][:right] %> |
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