mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Link to OIDC settings from error message
The colour of the link is really bad though.
This commit is contained in:
@@ -33,8 +33,12 @@ module Admin
|
||||
flash[:error] = e.message
|
||||
redirect_to admin_product_import_path
|
||||
rescue Rack::OAuth2::Client::Error
|
||||
flash[:error] = t(".connection_invalid")
|
||||
redirect_to admin_oidc_settings_path
|
||||
oidc_settings_link = helpers.link_to(
|
||||
t('spree.admin.tab.oidc_settings'),
|
||||
admin_oidc_settings_path
|
||||
)
|
||||
flash[:error] = t(".connection_invalid_html", oidc_settings_link:)
|
||||
redirect_to admin_product_import_path
|
||||
end
|
||||
|
||||
def import
|
||||
|
||||
@@ -847,9 +847,9 @@ en:
|
||||
map: Map
|
||||
|
||||
dfc_product_imports:
|
||||
connection_invalid: |
|
||||
connection_invalid_html: |
|
||||
Connecting with your OIDC account failed.
|
||||
Please refresh your OIDC connection.
|
||||
Please refresh your OIDC connection at: %{oidc_settings_link}
|
||||
index:
|
||||
title: "DFC product catalog"
|
||||
catalog_url: "%{count} products to be imported from: %{catalog_url}"
|
||||
|
||||
@@ -132,7 +132,8 @@ RSpec.describe "DFC Product Import" do
|
||||
|
||||
click_button "Preview"
|
||||
|
||||
expect(page).to have_content "OIDC Settings"
|
||||
expect(page).to have_content "Product Import"
|
||||
expect(page).to have_content "Connecting with your OIDC account failed."
|
||||
expect(page).to have_content "Please refresh your OIDC connection at: OIDC Settings"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user