mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
[50019] Fix untranslated 2fa strategies
This commit is contained in:
@@ -91,7 +91,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
|
||||
<% component.with_attribute(
|
||||
key: @application.class.human_attribute_name(:redirect_uri),
|
||||
value: safe_join(@application.redirect_uri.split("\n"), '<br/>'.html_safe)
|
||||
value: safe_join(@application.redirect_uri.split("\n"), tag(:br))
|
||||
) %>
|
||||
|
||||
<% if !@application.client_credentials_user_id %>
|
||||
|
||||
+2
-1
@@ -20,11 +20,12 @@
|
||||
value: if configuration['active_strategies'].empty?
|
||||
t(:label_none)
|
||||
else
|
||||
configuration['active_strategies'].join(content_tag(:br)) do |key|
|
||||
strategies = configuration['active_strategies'].map do |key|
|
||||
content_tag(:span) do
|
||||
t("two_factor_authentication.strategies.#{key}")
|
||||
end
|
||||
end
|
||||
safe_join(strategies, tag(:br))
|
||||
end)
|
||||
|
||||
component.with_attribute(key: t('two_factor_authentication.settings.label_enforced'),
|
||||
|
||||
@@ -38,6 +38,13 @@ RSpec.describe AttributeGroups::AttributeKeyValueComponent, type: :component do
|
||||
have_css('.attributes-key-value--value.-text', text: 'Attribute Value')
|
||||
end
|
||||
|
||||
it "preserve html in the value if it's a safe string" do
|
||||
render_inline(described_class.new(key: 'Attribute Key', value: '<div>Some value</div>'.html_safe))
|
||||
|
||||
expect(page).not_to have_css('.attributes-key-value--value.-text', text: "<div>Some value</div>")
|
||||
expect(page).to have_css('.attributes-key-value--value.-text', text: "Some value")
|
||||
end
|
||||
|
||||
context 'with value and content' do
|
||||
it 'renders the content' do
|
||||
render_inline(described_class.new(key: 'Attribute Key', value: 'Attribute Value')) do
|
||||
|
||||
Reference in New Issue
Block a user