diff --git a/app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb b/app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb index 9e7afea..2871097 100644 --- a/app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb +++ b/app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb @@ -63,7 +63,8 @@ def default_font_color_over_bg def default_address_text @default_address_text ||= NewsletterAgenda.default_address_text || - NewsletterAgenda.themes.dig(theme, :default_address_text) + NewsletterAgenda.themes.dig(theme, :default_address_text) || + "" end end end diff --git a/app/cells/decidim/newsletter_agenda/agenda_events_settings_form/show.erb b/app/cells/decidim/newsletter_agenda/agenda_events_settings_form/show.erb index 35aa2a0..6a1b1cd 100644 --- a/app/cells/decidim/newsletter_agenda/agenda_events_settings_form/show.erb +++ b/app/cells/decidim/newsletter_agenda/agenda_events_settings_form/show.erb @@ -16,8 +16,8 @@ <% form.fields_for :settings, settings do |settings_fields| %> <%= settings_fields.translated :text_field, :intro_title, label: t(".intro_title") %> <%= settings_fields.translated :editor, :intro_text, label: t(".intro_text") %> - <%= settings_fields.translated :text_field, :intro_link_text, label: t(".intro_link_text") if theme == "capitalitat" %> - <%= settings_fields.text_field :intro_link_url, label: t(".intro_link_url") if theme == "capitalitat" %> + <%= settings_fields.translated :text_field, :intro_link_text, label: t(".intro_link_text") if theme == :capitalitat %> + <%= settings_fields.text_field :intro_link_url, label: t(".intro_link_url") if theme == :capitalitat %> <% end %> <% form.fields_for :images, form.object.images do |images_fields| %> <%= images_fields.upload :main_image, label: t(".main_image") %> @@ -29,8 +29,8 @@

<%= t(".tab_body_description") %>

<% form.fields_for :settings, settings do |settings_fields| %> - <%= settings_fields.translated :text_field, :body_title, label: t(".body_title") unless theme == "capitalitat" %> - <%= settings_fields.translated :text_field, :body_subtitle, label: t(".body_subtitle") unless theme == "capitalitat" %> + <%= settings_fields.translated :text_field, :body_title, label: t(".body_title") unless theme == :capitalitat %> + <%= settings_fields.translated :text_field, :body_subtitle, label: t(".body_subtitle") unless theme == :capitalitat %> - <%= settings_fields.editor :footer_address_text, label: t(".footer_address") unless theme == "capitalitat" %> + <%= settings_fields.editor :footer_address_text, label: t(".footer_address") unless theme == :capitalitat %> <%= settings_fields.translated :text_field, :footer_social_links_title, label: t(".footer_social_links_title") %> - <%= settings_fields.translated :text_field, :footer_additional_text if theme == "capitalitat" %> + <%= settings_fields.translated :text_field, :footer_additional_text if theme == :capitalitat %>