Merge pull request #3322 from okriuchykhin/ok_SCI_5726

Fix default selection of results in reports wizard [SCI-5726]
This commit is contained in:
Alex Kriuchykhin 2021-05-14 12:02:49 +02:00 committed by GitHub
commit 5e06768fa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View file

@ -46,7 +46,7 @@ class Report < ApplicationRecord
step_tables: true,
step_comments: true
},
file_results: false,
file_results: true,
file_results_previews: false,
table_results: true,
text_results: true,

View file

@ -99,12 +99,14 @@
<label>
<%= t("projects.reports.wizard.third_step.order_results") %>
</label>
<select class="order-results" id="taskResultsOrder">
<option value="atoz"><%= t("projects.reports.wizard.third_step.atoz") %></option>
<option value="ztoa"><%= t("projects.reports.wizard.third_step.ztoa") %></option>
<option value="new"><%= t("projects.reports.wizard.third_step.new_results") %></option>
<option value="old"><%= t("projects.reports.wizard.third_step.old_results") %></option>
</select>
<%= select_tag :taskResultsOrder,
options_for_select([
[t('projects.reports.wizard.third_step.atoz'), 'atoz'],
[t('projects.reports.wizard.third_step.ztoa'), 'ztoa'],
[t('projects.reports.wizard.third_step.new_results'), 'new'],
[t('projects.reports.wizard.third_step.old_results'), 'old']
], selected: report.settings.dig(:task, :result_order)),
class: 'order-results' %>
</div>
</span>
</div>