mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-27 01:05:21 +08:00
Merge pull request #3384 from artoscinote/ma_SCI_5810
Handle old reports with no templates properly [SCI-5810]
This commit is contained in:
commit
04155f5d60
3 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@
|
|||
<%= t("projects.reports.wizard.statuses.step_#{i + 1}") %>
|
||||
</span>
|
||||
</div>
|
||||
<% if @edit %>
|
||||
<% if @edit && @report.settings["template"].present? %>
|
||||
<div class="change-step" data-step-id="<%= i + 1 %>">
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="project-selector-container">
|
||||
<%= render partial: 'reports/wizard/project_template_selector', locals: {report: report} %>
|
||||
</div>
|
||||
<div class="report-template-values-container <%= 'hidden' if report.new_record? %>">
|
||||
<div class="report-template-values-container <%= 'hidden' if report.settings["template"].blank? %>">
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
options_for_select(@templates.invert, @active_template),
|
||||
prompt: t('projects.reports.wizard.first_step.select_template'),
|
||||
data: {
|
||||
disable_on_load: report.settings[:template].blank?,
|
||||
disable_on_load: report.settings[:template].blank? && report.new_record?,
|
||||
placeholder: t('projects.reports.wizard.first_step.select_template'),
|
||||
selected_template: report.settings[:template],
|
||||
values_editor_path: reports_new_template_values_path(report_id: report.id)
|
||||
|
|
Loading…
Reference in a new issue