From da4069679c254725de71e2d29e52292ada7645fd Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 4 Jan 2023 15:43:12 +1100 Subject: [PATCH] Link relative report path instead of absolute URL You can reach a development server under localhost, 127.0.0.1, 0.0.0.0 or other names you define in your environment. The reports were using absolute links to localhost though and therefore breaking your session (login) while navigating. I'm not sure why this was done though. Sebastian didn't explain this in the commit message and it may have been accidental. --- app/views/admin/reports/_report_subtype.html.haml | 2 +- app/views/admin/reports/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/reports/_report_subtype.html.haml b/app/views/admin/reports/_report_subtype.html.haml index 3f56ca72a9..c043c68e61 100644 --- a/app/views/admin/reports/_report_subtype.html.haml +++ b/app/views/admin/reports/_report_subtype.html.haml @@ -1,5 +1,5 @@ %ul{style: "margin-left: 12pt"} - report_subtypes.each do |report_subtype| %li - - url = main_app.admin_report_url(report_type: report_type, report_subtype: report_subtype[1]) + - url = main_app.admin_report_path(report_type: report_type, report_subtype: report_subtype[1]) = link_to report_subtype[0], url diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index caebd55c83..92de53506a 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = @report_title -= form_for @report.search, :url => url_for(only_path: false) do |f| += form_for @report.search, :url => url_for do |f| %fieldset.no-border-bottom.print-hidden %legend{ align: 'center'}= t(:report_filters) = render partial: "admin/reports/filters/#{@report_type}", locals: { f: f }