From 3d169b5e6f67830a712cc4753e07cc4b70cd1b91 Mon Sep 17 00:00:00 2001 From: Vaidehi Joshi Date: Tue, 6 Oct 2020 10:34:34 -0700 Subject: [PATCH] Do not require SiteConfig.tagline (#10623) [deploy] * Fix incorrect formatting in admin/configs/show.html.erb * Only render SiteConfig.tagline if it exists * Fix typo in _signup_modal.html.erb * Remove tagline from VerifySetupCompleted::MANDATORY_CONFIGS * Improve signup_modal tagline specs * Tiny fixes to address @citizen428's comments --- .../concerns/verify_setup_completed.rb | 1 - app/views/admin/configs/show.html.erb | 1728 +++++++++-------- app/views/devise/invitations/edit.html.erb | 4 +- app/views/layouts/_signup_modal.html.erb | 2 +- .../layouts/signup_modal.html.erb_spec.rb | 11 +- 5 files changed, 882 insertions(+), 864 deletions(-) diff --git a/app/controllers/concerns/verify_setup_completed.rb b/app/controllers/concerns/verify_setup_completed.rb index e009dfeb2..b7cba402b 100644 --- a/app/controllers/concerns/verify_setup_completed.rb +++ b/app/controllers/concerns/verify_setup_completed.rb @@ -7,7 +7,6 @@ module VerifySetupCompleted community_name community_description community_action - tagline main_social_image logo_png diff --git a/app/views/admin/configs/show.html.erb b/app/views/admin/configs/show.html.erb index adc95a2d4..17210ff5a 100644 --- a/app/views/admin/configs/show.html.erb +++ b/app/views/admin/configs/show.html.erb @@ -25,7 +25,7 @@ <%= form_for(SiteConfig.new, url: admin_config_path) do |f| %> <% VerifySetupCompleted::MANDATORY_CONFIGS.each do |config_key| %> - + <%# we need to list the config as separate fields if the data structure is a Hash %> <% if SiteConfig.public_send(config_key).is_a?(Hash) %> <%= admin_config_label config_key.to_s %>
@@ -39,7 +39,7 @@ placeholder: Constants::SiteConfig::DETAILS[config_key][:placeholder] %>
<%= "#{key} #{config_key.to_s.tr! '_', ' '}" %>
- <% end %> + <% end %> <% end %> <% elsif SiteConfig.public_send(config_key).is_a?(Array) %> @@ -64,12 +64,12 @@ <% end %> <% if current_user.has_role?(:single_resource_admin, Config) %> -
- <%= label_tag "Please type out the sentence below to submit:" %> - <%= text_field_tag :confirmation, nil, class: "form-control", placeholder: "Confirmation text", autocomplete: "off", required: true, pattern: @confirmation_text %> -
Type the sentence: <%= @confirmation_text %>
- <%= f.submit "Update Site Configuration", class: "btn btn-danger btn-lg" %> -
+
+ <%= label_tag "Please type out the sentence below to submit:" %> + <%= text_field_tag :confirmation, nil, class: "form-control", placeholder: "Confirmation text", autocomplete: "off", required: true, pattern: @confirmation_text %> +
Type the sentence: <%= @confirmation_text %>
+ <%= f.submit "Update Site Configuration", class: "btn btn-danger btn-lg" %> +
<% end %> <% end %> @@ -87,749 +87,738 @@
<%= form_for(SiteConfig.new, url: admin_config_path) do |f| %> - -
- <%= render partial: "card_header", - locals: { - header: "API Tokens", - state: "collapse", - target: "apiBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :health_check_token %> - <%= f.text_field :health_check_token, - class: "form-control", - value: SiteConfig.health_check_token, - placeholder: Constants::SiteConfig::DETAILS[:health_check_token][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:health_check_token][:description] %>
+
+ <%= render partial: "card_header", + locals: { + header: "API Tokens", + state: "collapse", + target: "apiBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :health_check_token %> + <%= f.text_field :health_check_token, + class: "form-control", + value: SiteConfig.health_check_token, + placeholder: Constants::SiteConfig::DETAILS[:health_check_token][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:health_check_token][:description] %>
+
-
-
- <%= render partial: "card_header", - locals: { - header: "Authentication", - state: "collapse", - target: "authenticationBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :allow_email_password_registration %> - <%= f.check_box :allow_email_password_registration, checked: SiteConfig.allow_email_password_registration %> -
<%= Constants::SiteConfig::DETAILS[:allow_email_password_registration][:description] %>
-
-
- <%= admin_config_label :authentication_providers %> - <%= select_tag "site_config[authentication_providers]", - options_from_collection_for_select( - authentication_available_providers, - :provider_name, - :official_name, - authentication_enabled_providers.map(&:provider_name), - ), - multiple: true, - class: "form-control selectpicker" %> -
<%= Constants::SiteConfig::DETAILS[:authentication_providers][:description] %>
-
-
- Notice: Changing authentication keys will not take affect until devops restarts the app (about once per day). This will soon be instant. -
-
- <%= admin_config_label :twitter_key %> - <%= f.text_field :twitter_key, - class: "form-control", - value: SiteConfig.twitter_key, - placeholder: Constants::SiteConfig::DETAILS[:twitter_key][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:twitter_key][:description] %>
-
-
- <%= admin_config_label :twitter_secret %> - <%= f.text_field :twitter_secret, - class: "form-control", - value: SiteConfig.twitter_secret, - placeholder: Constants::SiteConfig::DETAILS[:twitter_secret][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:twitter_secret][:description] %>
-
-
- <%= admin_config_label :github_key %> - <%= f.text_field :github_key, - class: "form-control", - value: SiteConfig.github_key, - placeholder: Constants::SiteConfig::DETAILS[:github_key][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:github_key][:description] %>
-
-
- <%= admin_config_label :github_secret %> - <%= f.text_field :github_secret, - class: "form-control", - value: SiteConfig.github_secret, - placeholder: Constants::SiteConfig::DETAILS[:github_secret][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:github_secret][:description] %>
-
-
- <%= admin_config_label :facebook_key %> - <%= f.text_field :facebook_key, - class: "form-control", - value: SiteConfig.facebook_key, - placeholder: Constants::SiteConfig::DETAILS[:facebook_key][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:facebook_key][:description] %>
-
-
- <%= admin_config_label :facebook_secret %> - <%= f.text_field :facebook_secret, - class: "form-control", - value: SiteConfig.facebook_secret, - placeholder: Constants::SiteConfig::DETAILS[:facebook_secret][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:facebook_secret][:description] %>
+
+ <%= render partial: "card_header", + locals: { + header: "Authentication", + state: "collapse", + target: "authenticationBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :allow_email_password_registration %> + <%= f.check_box :allow_email_password_registration, checked: SiteConfig.allow_email_password_registration %> +
<%= Constants::SiteConfig::DETAILS[:allow_email_password_registration][:description] %>
+
+
+ <%= admin_config_label :authentication_providers %> + <%= select_tag "site_config[authentication_providers]", + options_from_collection_for_select( + authentication_available_providers, + :provider_name, + :official_name, + authentication_enabled_providers.map(&:provider_name), + ), + multiple: true, + class: "form-control selectpicker" %> +
<%= Constants::SiteConfig::DETAILS[:authentication_providers][:description] %>
+
+
+ Notice: Changing authentication keys will not take affect until devops restarts the app (about once per day). This will soon be instant. +
+
+ <%= admin_config_label :twitter_key %> + <%= f.text_field :twitter_key, + class: "form-control", + value: SiteConfig.twitter_key, + placeholder: Constants::SiteConfig::DETAILS[:twitter_key][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:twitter_key][:description] %>
+
+
+ <%= admin_config_label :twitter_secret %> + <%= f.text_field :twitter_secret, + class: "form-control", + value: SiteConfig.twitter_secret, + placeholder: Constants::SiteConfig::DETAILS[:twitter_secret][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:twitter_secret][:description] %>
+
+
+ <%= admin_config_label :github_key %> + <%= f.text_field :github_key, + class: "form-control", + value: SiteConfig.github_key, + placeholder: Constants::SiteConfig::DETAILS[:github_key][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:github_key][:description] %>
+
+
+ <%= admin_config_label :github_secret %> + <%= f.text_field :github_secret, + class: "form-control", + value: SiteConfig.github_secret, + placeholder: Constants::SiteConfig::DETAILS[:github_secret][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:github_secret][:description] %>
+
+
+ <%= admin_config_label :facebook_key %> + <%= f.text_field :facebook_key, + class: "form-control", + value: SiteConfig.facebook_key, + placeholder: Constants::SiteConfig::DETAILS[:facebook_key][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:facebook_key][:description] %>
+
+
+ <%= admin_config_label :facebook_secret %> + <%= f.text_field :facebook_secret, + class: "form-control", + value: SiteConfig.facebook_secret, + placeholder: Constants::SiteConfig::DETAILS[:facebook_secret][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:facebook_secret][:description] %>
+
-
-
- <%= render partial: "card_header", - locals: { - header: "Campaign", - state: "collapse", - target: "campaignBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :campaign_hero_html_variant_name, "Campaign hero HTML variant name" %> - <%= f.text_field :campaign_hero_html_variant_name, - class: "form-control", - value: SiteConfig.campaign_hero_html_variant_name, - placeholder: Constants::SiteConfig::DETAILS[:campaign_hero_html_variant_name][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:campaign_hero_html_variant_name][:description] %>
-
-
- <%= admin_config_label :campaign_articles_require_approval %> - <%= f.check_box :campaign_articles_require_approval, checked: SiteConfig.campaign_articles_require_approval %> -
<%= Constants::SiteConfig::DETAILS[:campaign_articles_require_approval][:description] %>
-
+
+ <%= render partial: "card_header", + locals: { + header: "Campaign", + state: "collapse", + target: "campaignBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :campaign_hero_html_variant_name, "Campaign hero HTML variant name" %> + <%= f.text_field :campaign_hero_html_variant_name, + class: "form-control", + value: SiteConfig.campaign_hero_html_variant_name, + placeholder: Constants::SiteConfig::DETAILS[:campaign_hero_html_variant_name][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:campaign_hero_html_variant_name][:description] %>
+
-
- <%= admin_config_label :campaign_sidebar_enabled %> - <%= f.check_box :campaign_sidebar_enabled, checked: SiteConfig.campaign_sidebar_enabled %> -
<%= Constants::SiteConfig::DETAILS[:campaign_sidebar_enabled][:description] %>
-
+
+ <%= admin_config_label :campaign_articles_require_approval %> + <%= f.check_box :campaign_articles_require_approval, checked: SiteConfig.campaign_articles_require_approval %> +
<%= Constants::SiteConfig::DETAILS[:campaign_articles_require_approval][:description] %>
+
+
+ <%= admin_config_label :campaign_sidebar_enabled %> + <%= f.check_box :campaign_sidebar_enabled, checked: SiteConfig.campaign_sidebar_enabled %> +
<%= Constants::SiteConfig::DETAILS[:campaign_sidebar_enabled][:description] %>
+
+ +
+ <%= admin_config_label :campaign_sidebar_image %> + <% if SiteConfig.campaign_sidebar_image.present? %> +
+
+ Campaign sidebar image +
+
+ <% end %> + <%= f.text_field :campaign_sidebar_image, + class: "form-control", + value: SiteConfig.campaign_sidebar_image, + placeholder: Constants::SiteConfig::DETAILS[:campaign_sidebar_image][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:campaign_sidebar_image][:description] %>
+
+ +
+ <%= admin_config_label :campaign_url, "Campaign URL" %> + <%= f.text_field :campaign_url, + class: "form-control", + value: SiteConfig.campaign_url, + placeholder: Constants::SiteConfig::DETAILS[:campaign_url][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:campaign_url][:description] %>
+
+ +
+ <%= admin_config_label :campaign_featured_tags %> + <%= f.text_field :campaign_featured_tags, + class: "form-control", + value: SiteConfig.campaign_featured_tags.join(","), + placeholder: Constants::SiteConfig::DETAILS[:campaign_featured_tags][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:campaign_featured_tags][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Community Content", + state: "collapse", + target: "contentBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :community_name %> + <%= f.text_field :community_name, + class: "form-control", + value: SiteConfig.community_name, + placeholder: Constants::SiteConfig::DETAILS[:community_name][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:community_name][:description] %>
+
+ +
+ <%= admin_config_label :tagline %> + <%= f.text_field :tagline, + class: "form-control", + value: SiteConfig.tagline, + placeholder: Constants::SiteConfig::DETAILS[:tagline][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:tagline][:description] %>
+
+ +
+ <%= admin_config_label :community_description %> + <%= f.text_field :community_description, + class: "form-control", + value: SiteConfig.community_description, + placeholder: Constants::SiteConfig::DETAILS[:community_description][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:community_description][:description] %>
+
+ +
+ <%= admin_config_label :community_member_label %> + <%= f.text_field :community_member_label, + class: "form-control", + value: SiteConfig.community_member_label, + placeholder: Constants::SiteConfig::DETAILS[:community_member_label][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:community_member_label][:description] %>
+
+ +
+ <%= admin_config_label :community_action %> + <%= f.text_field :community_action, + class: "form-control", + value: SiteConfig.community_action, + placeholder: Constants::SiteConfig::DETAILS[:community_action][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:community_action][:description] %>
+
+ +
+ <%= admin_config_label :community_copyright_start_year %> + <%= f.text_field :community_copyright_start_year, + class: "form-control", + value: SiteConfig.community_copyright_start_year, + placeholder: Constants::SiteConfig::DETAILS[:community_copyright_start_year][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:community_copyright_start_year][:description] %>
+
+ +
+ <%= admin_config_label :staff_user_id %> + <%= f.text_field :staff_user_id, + class: "form-control", + value: SiteConfig.staff_user_id, + placeholder: Constants::SiteConfig::DETAILS[:staff_user_id][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:staff_user_id][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Credits", + state: "collapse", + target: "creditsBodyContainer", + expanded: "false" + } %> + +
+ <%= f.fields_for :credit_prices_in_cents do |price_field| %> +
+ <%= price_field.label "Credit price in cents (S)" %> + <%= price_field.number_field :small, + class: "form-control", + value: SiteConfig.credit_prices_in_cents[:small] %> +
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:small][:description] %>
+ <%= price_field.label "Credit price in cents (M)" %> + <%= price_field.number_field :medium, + class: "form-control", + value: SiteConfig.credit_prices_in_cents[:medium] %> +
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:medium][:description] %>
+
+
+ <%= price_field.label "Credit price in cents (L)" %> + <%= price_field.number_field :large, + class: "form-control", + value: SiteConfig.credit_prices_in_cents[:large] %> +
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:large][:description] %>
+
+
+ <%= price_field.label "Credit price in cents (XL)" %> + <%= price_field.number_field :xlarge, + class: "form-control", + value: SiteConfig.credit_prices_in_cents[:xlarge] %> +
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:xlarge][:description] %>
+
+ <% end %> +
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Emails", + state: "collapse", + target: "emailBodyContainer", + expanded: "false" + } %> +
- <%= admin_config_label :campaign_sidebar_image %> - <% if SiteConfig.campaign_sidebar_image.present? %> +
+ + " class="form-control" readonly> +
Default (set via DEFAULT_EMAIL environment variable)
+
+ <%= f.fields_for :email_addresses do |email_field| %> + <% SiteConfig.email_addresses.except(:default).each do |type, address| %> +
+ <%= email_field.label type %> + <%= email_field.text_field type, + class: "form-control", + value: SiteConfig.email_addresses[type], + placeholder: Constants::SiteConfig::DETAILS[:email_addresses][:placeholder] %> +
<%= type.capitalize %><%= Constants::SiteConfig::DETAILS[:email_addresses][:description] %>
+
+ <% end %> + <% end %> +
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Email digest frequency", + state: "collapse", + target: "emailDigestBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :periodic_email_digest_max %> + <%= f.number_field :periodic_email_digest_max, + class: "form-control", + value: SiteConfig.periodic_email_digest_max, + placeholder: Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:description] %>
+
+ +
+ <%= admin_config_label :periodic_email_digest_min %> + <%= f.number_field :periodic_email_digest_min, + class: "form-control", + value: SiteConfig.periodic_email_digest_min, + placeholder: Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Jobs", + state: "collapse", + target: "jobsBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :jobs_url, "Jobs URL" %> + <%= f.text_field :jobs_url, + class: "form-control", + value: SiteConfig.jobs_url, + placeholder: Constants::SiteConfig::DETAILS[:jobs_url][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:jobs_url][:description] %>
+
+
+ <%= admin_config_label :display_jobs_banner %> + <%= f.check_box :display_jobs_banner, checked: SiteConfig.display_jobs_banner %> +
<%= Constants::SiteConfig::DETAILS[:display_jobs_banner][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Google Analytics Reporting API v4", + state: "collapse", + target: "gaBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :ga_tracking_id, "View ID" %> + <%= f.text_field :ga_tracking_id, + class: "form-control", + value: SiteConfig.ga_tracking_id %> +
<%= Constants::SiteConfig::DETAILS[:ga_tracking_id][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Images", + state: "collapse", + target: "imagesBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :main_social_image %> + <%= f.text_field :main_social_image, + class: "form-control", + value: SiteConfig.main_social_image, + placeholder: Constants::SiteConfig::DETAILS[:main_social_image][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:main_social_image][:description] %>
+ <% if SiteConfig.main_social_image.present? %> + main social image + <% end %> + +
+ <%= admin_config_label :favicon_url, "Favicon URL" %> + <%= f.text_field :favicon_url, + class: "form-control", + value: SiteConfig.favicon_url, + placeholder: Constants::SiteConfig::DETAILS[:favicon_url][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:favicon_url][:description] %>
+ favicon +
+ +
+ <%= admin_config_label :logo_png %> + <%= f.text_field :logo_png, + class: "form-control", + value: SiteConfig.logo_png, + placeholder: Constants::SiteConfig::DETAILS[:logo_png][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:logo_png][:description] %>
+ <% if SiteConfig.logo_png.present? %> + + <% end %> +
+ +
+ <%= admin_config_label :logo_svg %> + <%= f.text_area :logo_svg, + class: "form-control", + value: SiteConfig.logo_svg, + rows: 6, + placeholder: Constants::SiteConfig::DETAILS[:logo_svg][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:logo_svg][:description] %>
+ <% if SiteConfig.logo_svg.present? %> + <%= SiteConfig.logo_svg.html_safe %> + <% end %> +
+ +
+ <%= admin_config_label :secondary_logo_url %> + <%= f.text_field :secondary_logo_url, + class: "form-control", + value: SiteConfig.secondary_logo_url, + placeholder: Constants::SiteConfig::DETAILS[:secondary_logo_url][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:secondary_logo_url][:description] %>
+ <% if SiteConfig.secondary_logo_url.present? %> + secondary logo image + <% end %> +
+ +
+ <%= admin_config_label :left_navbar_svg_icon %> + <%= f.text_area :left_navbar_svg_icon, + class: "form-control", + value: SiteConfig.left_navbar_svg_icon, + rows: 6, + placeholder: Constants::SiteConfig::DETAILS[:left_navbar_svg_icon][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:left_navbar_svg_icon][:description] %>
+ <%= SiteConfig.left_navbar_svg_icon.html_safe %> +
+ +
+ <%= admin_config_label :right_navbar_svg_icon %> + <%= f.text_area :right_navbar_svg_icon, + class: "form-control", + value: SiteConfig.right_navbar_svg_icon, + rows: 6, + placeholder: Constants::SiteConfig::DETAILS[:right_navbar_svg_icon][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:right_navbar_svg_icon][:description] %>
+ <%= SiteConfig.right_navbar_svg_icon.html_safe %> +
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Mascot", + state: "collapse", + target: "mascotBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :mascot_user_id, "Mascot user ID" %> + <%= f.text_field :mascot_user_id, + class: "form-control", + value: SiteConfig.mascot_user_id, + min: 1, + placeholder: Constants::SiteConfig::DETAILS[:mascot_user_id][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:mascot_user_id][:description] %>
+
+ +
+ <%= admin_config_label :mascot_image_url, "Mascot Image URL" %> + <%= f.text_field :mascot_image_url, + class: "form-control", + value: SiteConfig.mascot_image_url, + placeholder: Constants::SiteConfig::DETAILS[:mascot_image_url][:placeholder] %> + +
+ <%= SiteConfig.mascot_image_description %> +
+ +
<%= Constants::SiteConfig::DETAILS[:mascot_image_url][:description] %>
+
+ +
+ <%= admin_config_label :mascot_footer_image_url %> + <%= f.text_field :mascot_footer_image_url, + class: "form-control", + value: SiteConfig.mascot_footer_image_url, + placeholder: Constants::SiteConfig::DETAILS[:mascot_footer_image_url][:placeholder] %> + +
+ <%= SiteConfig.mascot_image_description %> +
+ +
<%= Constants::SiteConfig::DETAILS[:mascot_footer_image_url][:description] %>
+
+ +
+ <%= admin_config_label :mascot_footer_image_width %> + <%= f.text_field :mascot_footer_image_width, + class: "form-control", + value: SiteConfig.mascot_footer_image_width %> +
<%= Constants::SiteConfig::DETAILS[:mascot_footer_image_width][:description] %>
+
+ +
+ <%= admin_config_label :mascot_footer_image_height %> + <%= f.text_field :mascot_footer_image_height, + class: "form-control", + value: SiteConfig.mascot_footer_image_height %> +
<%= Constants::SiteConfig::DETAILS[:mascot_footer_image_height][:description] %>
+
+ +
+ <%= admin_config_label :mascot_image_description %> + <%= f.text_field :mascot_image_description, + class: "form-control", + value: SiteConfig.mascot_image_description %> +
<%= Constants::SiteConfig::DETAILS[:mascot_image_description][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Meta Keywords", + state: "collapse", + target: "metaKeywordsBodyContainer", + expanded: "false" + } %> +
+
+ <%= f.fields_for :meta_keywords do |meta_keywords_field| %> + <% SiteConfig.meta_keywords.each do |area, keywords| %> +
+ <%= meta_keywords_field.label "#{area}*" %> + <%= meta_keywords_field.text_field area, + class: "form-control", + value: SiteConfig.meta_keywords[area], + placeholder: Constants::SiteConfig::DETAILS[:meta_keywords][:placeholder] %> +
<%= area.capitalize %><%= " page" unless area == "default" %> keywords
+
+ <% end %> + <% end %> +
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Monetization", + state: "collapse", + target: "monetizationBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :shop_url %> + <%= f.text_field :shop_url, + class: "form-control", + value: SiteConfig.shop_url, + placeholder: Constants::SiteConfig::DETAILS[:shop_url][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:shop_url][:description] %>
+
+ +
+ <%= admin_config_label :stripe_api_key %> + <%= f.text_field :stripe_api_key, + class: "form-control", + value: SiteConfig.stripe_api_key, + placeholder: Constants::SiteConfig::DETAILS[:stripe_api_key][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:stripe_api_key][:description] %>
+
+ +
+ <%= admin_config_label :stripe_publishable_key %> + <%= f.text_field :stripe_publishable_key, + class: "form-control", + value: SiteConfig.stripe_publishable_key, + placeholder: Constants::SiteConfig::DETAILS[:stripe_publishable_key][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:stripe_publishable_key][:description] %>
+
+ +
+ <%= admin_config_label :payment_pointer %> + <%= f.text_field :payment_pointer, + class: "form-control", + value: SiteConfig.payment_pointer, + placeholder: Constants::SiteConfig::DETAILS[:payment_pointer][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:payment_pointer][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Newsletter", + state: "collapse", + target: "newsletterBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :mailchimp_newsletter_id, "Main Newsletter" %> + <%= f.text_field :mailchimp_newsletter_id, + class: "form-control", + value: SiteConfig.mailchimp_newsletter_id %> +
<%= Constants::SiteConfig::DETAILS[:mailchimp_newsletter_id][:description] %>
+
+ +
+ <%= admin_config_label :mailchimp_sustaining_members_id, "Sustaining Members Newsletter" %> + <%= f.text_field :mailchimp_sustaining_members_id, + class: "form-control", + value: SiteConfig.mailchimp_sustaining_members_id %> +
<%= Constants::SiteConfig::DETAILS[:mailchimp_sustaining_members_id][:description] %>
+
+ +
+ <%= admin_config_label :mailchimp_tag_moderators_id, "Tag Moderators Newsletter" %> + <%= f.text_field :mailchimp_tag_moderators_id, + class: "form-control", + value: SiteConfig.mailchimp_tag_moderators_id %> +
<%= Constants::SiteConfig::DETAILS[:mailchimp_tag_moderators_id][:description] %>
+
+ +
+ <%= admin_config_label :mailchimp_community_moderators_id, "Community Moderators Newsletter" %> + <%= f.text_field :mailchimp_community_moderators_id, + class: "form-control", + value: SiteConfig.mailchimp_community_moderators_id %> +
<%= Constants::SiteConfig::DETAILS[:mailchimp_community_moderators_id][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Onboarding", + state: "collapse", + target: "onboardingBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :onboarding_logo_image %> + <%= f.text_field :onboarding_logo_image, + class: "form-control", + value: SiteConfig.onboarding_logo_image, + placeholder: Constants::SiteConfig::DETAILS[:onboarding_logo_image][:placeholder] %>
- Campaign sidebar image + main social image +
+
+
<%= Constants::SiteConfig::DETAILS[:onboarding_logo_image][:description] %>
- <% end %> - <%= f.text_field :campaign_sidebar_image, - class: "form-control", - value: SiteConfig.campaign_sidebar_image, - placeholder: Constants::SiteConfig::DETAILS[:campaign_sidebar_image][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:campaign_sidebar_image][:description] %>
-
- -
- <%= admin_config_label :campaign_url, "Campaign URL" %> - <%= f.text_field :campaign_url, - class: "form-control", - value: SiteConfig.campaign_url, - placeholder: Constants::SiteConfig::DETAILS[:campaign_url][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:campaign_url][:description] %>
-
- -
- <%= admin_config_label :campaign_featured_tags %> - <%= f.text_field :campaign_featured_tags, - class: "form-control", - value: SiteConfig.campaign_featured_tags.join(","), - placeholder: Constants::SiteConfig::DETAILS[:campaign_featured_tags][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:campaign_featured_tags][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Community Content", - state: "collapse", - target: "contentBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :community_name %> - <%= f.text_field :community_name, - class: "form-control", - value: SiteConfig.community_name, - placeholder: Constants::SiteConfig::DETAILS[:community_name][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:community_name][:description] %>
-
- -
- <%= admin_config_label :community_description %> - <%= f.text_field :community_description, - class: "form-control", - value: SiteConfig.community_description, - placeholder: Constants::SiteConfig::DETAILS[:community_description][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:community_description][:description] %>
-
- -
- <%= admin_config_label :community_member_label %> - <%= f.text_field :community_member_label, - class: "form-control", - value: SiteConfig.community_member_label, - placeholder: Constants::SiteConfig::DETAILS[:community_member_label][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:community_member_label][:description] %>
-
- -
- <%= admin_config_label :community_action %> - <%= f.text_field :community_action, - class: "form-control", - value: SiteConfig.community_action, - placeholder: Constants::SiteConfig::DETAILS[:community_action][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:community_action][:description] %>
-
- -
- <%= admin_config_label :tagline %> - <%= f.text_field :tagline, - class: "form-control", - value: SiteConfig.tagline, - placeholder: Constants::SiteConfig::DETAILS[:tagline][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:tagline][:description] %>
-
- -
- <%= admin_config_label :community_copyright_start_year %> - <%= f.text_field :community_copyright_start_year, - class: "form-control", - value: SiteConfig.community_copyright_start_year, - placeholder: Constants::SiteConfig::DETAILS[:community_copyright_start_year][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:community_copyright_start_year][:description] %>
-
- -
- <%= admin_config_label :staff_user_id %> - <%= f.text_field :staff_user_id, - class: "form-control", - value: SiteConfig.staff_user_id, - placeholder: Constants::SiteConfig::DETAILS[:staff_user_id][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:staff_user_id][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Credits", - state: "collapse", - target: "creditsBodyContainer", - expanded: "false" - } %> - -
- <%= f.fields_for :credit_prices_in_cents do |price_field| %> -
- <%= price_field.label "Credit price in cents (S)" %> - <%= price_field.number_field :small, - class: "form-control", - value: SiteConfig.credit_prices_in_cents[:small] %> -
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:small][:description] %>
- <%= price_field.label "Credit price in cents (M)" %> - <%= price_field.number_field :medium, - class: "form-control", - value: SiteConfig.credit_prices_in_cents[:medium] %> -
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:medium][:description] %>
-
- <%= price_field.label "Credit price in cents (L)" %> - <%= price_field.number_field :large, - class: "form-control", - value: SiteConfig.credit_prices_in_cents[:large] %> -
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:large][:description] %>
-
-
- <%= price_field.label "Credit price in cents (XL)" %> - <%= price_field.number_field :xlarge, - class: "form-control", - value: SiteConfig.credit_prices_in_cents[:xlarge] %> -
<%= Constants::SiteConfig::DETAILS[:credit_prices_in_cents][:xlarge][:description] %>
-
- <% end %> -
-
-
- <%= render partial: "card_header", - locals: { - header: "Emails", - state: "collapse", - target: "emailBodyContainer", - expanded: "false" - } %> -
-
-
- - " class="form-control" readonly> -
Default (set via DEFAULT_EMAIL environment variable)
-
- <%= f.fields_for :email_addresses do |email_field| %> - <% SiteConfig.email_addresses.except(:default).each do |type, address| %> -
- <%= email_field.label type %> - <%= email_field.text_field type, - class: "form-control", - value: SiteConfig.email_addresses[type], - placeholder: Constants::SiteConfig::DETAILS[:email_addresses][:placeholder] %> -
<%= type.capitalize %><%= Constants::SiteConfig::DETAILS[:email_addresses][:description] %>
-
- <% end %> - <% end %> -
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Email digest frequency", - state: "collapse", - target: "emailDigestBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :periodic_email_digest_max %> - <%= f.number_field :periodic_email_digest_max, +
+ <%= admin_config_label :onboarding_background_image %> + <%= f.text_field :onboarding_background_image, class: "form-control", - value: SiteConfig.periodic_email_digest_max, - placeholder: Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:description] %>
-
- -
- <%= admin_config_label :periodic_email_digest_min %> - <%= f.number_field :periodic_email_digest_min, - class: "form-control", - value: SiteConfig.periodic_email_digest_min, - placeholder: Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:periodic_email_digest_max][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Jobs", - state: "collapse", - target: "jobsBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :jobs_url, "Jobs URL" %> - <%= f.text_field :jobs_url, - class: "form-control", - value: SiteConfig.jobs_url, - placeholder: Constants::SiteConfig::DETAILS[:jobs_url][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:jobs_url][:description] %>
-
-
- <%= admin_config_label :display_jobs_banner %> - <%= f.check_box :display_jobs_banner, checked: SiteConfig.display_jobs_banner %> -
<%= Constants::SiteConfig::DETAILS[:display_jobs_banner][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Google Analytics Reporting API v4", - state: "collapse", - target: "gaBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :ga_tracking_id, "View ID" %> - <%= f.text_field :ga_tracking_id, - class: "form-control", - value: SiteConfig.ga_tracking_id %> -
<%= Constants::SiteConfig::DETAILS[:ga_tracking_id][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Images", - state: "collapse", - target: "imagesBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :main_social_image %> - <%= f.text_field :main_social_image, - class: "form-control", - value: SiteConfig.main_social_image, - placeholder: Constants::SiteConfig::DETAILS[:main_social_image][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:main_social_image][:description] %>
- <% if SiteConfig.main_social_image.present? %> - main social image - <% end %> - -
- <%= admin_config_label :favicon_url, "Favicon URL" %> - <%= f.text_field :favicon_url, - class: "form-control", - value: SiteConfig.favicon_url, - placeholder: Constants::SiteConfig::DETAILS[:favicon_url][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:favicon_url][:description] %>
- favicon -
- -
- <%= admin_config_label :logo_png %> - <%= f.text_field :logo_png, - class: "form-control", - value: SiteConfig.logo_png, - placeholder: Constants::SiteConfig::DETAILS[:logo_png][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:logo_png][:description] %>
- <% if SiteConfig.logo_png.present? %> - - <% end %> -
- -
- <%= admin_config_label :logo_svg %> - <%= f.text_area :logo_svg, - class: "form-control", - value: SiteConfig.logo_svg, - rows: 6, - placeholder: Constants::SiteConfig::DETAILS[:logo_svg][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:logo_svg][:description] %>
- <% if SiteConfig.logo_svg.present? %> - <%= SiteConfig.logo_svg.html_safe %> - <% end %> -
- -
- <%= admin_config_label :secondary_logo_url %> - <%= f.text_field :secondary_logo_url, - class: "form-control", - value: SiteConfig.secondary_logo_url, - placeholder: Constants::SiteConfig::DETAILS[:secondary_logo_url][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:secondary_logo_url][:description] %>
- <% if SiteConfig.secondary_logo_url.present? %> - secondary logo image - <% end %> -
- -
- <%= admin_config_label :left_navbar_svg_icon %> - <%= f.text_area :left_navbar_svg_icon, - class: "form-control", - value: SiteConfig.left_navbar_svg_icon, - rows: 6, - placeholder: Constants::SiteConfig::DETAILS[:left_navbar_svg_icon][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:left_navbar_svg_icon][:description] %>
- <%= SiteConfig.left_navbar_svg_icon.html_safe %> -
- -
- <%= admin_config_label :right_navbar_svg_icon %> - <%= f.text_area :right_navbar_svg_icon, - class: "form-control", - value: SiteConfig.right_navbar_svg_icon, - rows: 6, - placeholder: Constants::SiteConfig::DETAILS[:right_navbar_svg_icon][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:right_navbar_svg_icon][:description] %>
- <%= SiteConfig.right_navbar_svg_icon.html_safe %> -
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Mascot", - state: "collapse", - target: "mascotBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :mascot_user_id, "Mascot user ID" %> - <%= f.text_field :mascot_user_id, - class: "form-control", - value: SiteConfig.mascot_user_id, - min: 1, - placeholder: Constants::SiteConfig::DETAILS[:mascot_user_id][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:mascot_user_id][:description] %>
-
- -
- <%= admin_config_label :mascot_image_url, "Mascot Image URL" %> - <%= f.text_field :mascot_image_url, - class: "form-control", - value: SiteConfig.mascot_image_url, - placeholder: Constants::SiteConfig::DETAILS[:mascot_image_url][:placeholder] %> - -
- <%= SiteConfig.mascot_image_description %> -
- -
<%= Constants::SiteConfig::DETAILS[:mascot_image_url][:description] %>
-
- -
- <%= admin_config_label :mascot_footer_image_url %> - <%= f.text_field :mascot_footer_image_url, - class: "form-control", - value: SiteConfig.mascot_footer_image_url, - placeholder: Constants::SiteConfig::DETAILS[:mascot_footer_image_url][:placeholder] %> - -
- <%= SiteConfig.mascot_image_description %> -
- -
<%= Constants::SiteConfig::DETAILS[:mascot_footer_image_url][:description] %>
-
- -
- <%= admin_config_label :mascot_footer_image_width %> - <%= f.text_field :mascot_footer_image_width, - class: "form-control", - value: SiteConfig.mascot_footer_image_width %> -
<%= Constants::SiteConfig::DETAILS[:mascot_footer_image_width][:description] %>
-
- -
- <%= admin_config_label :mascot_footer_image_height %> - <%= f.text_field :mascot_footer_image_height, - class: "form-control", - value: SiteConfig.mascot_footer_image_height %> -
<%= Constants::SiteConfig::DETAILS[:mascot_footer_image_height][:description] %>
-
- -
- <%= admin_config_label :mascot_image_description %> - <%= f.text_field :mascot_image_description, - class: "form-control", - value: SiteConfig.mascot_image_description %> -
<%= Constants::SiteConfig::DETAILS[:mascot_image_description][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Meta Keywords", - state: "collapse", - target: "metaKeywordsBodyContainer", - expanded: "false" - } %> -
-
- <%= f.fields_for :meta_keywords do |meta_keywords_field| %> - <% SiteConfig.meta_keywords.each do |area, keywords| %> -
- <%= meta_keywords_field.label "#{area}*" %> - <%= meta_keywords_field.text_field area, - class: "form-control", - value: SiteConfig.meta_keywords[area], - placeholder: Constants::SiteConfig::DETAILS[:meta_keywords][:placeholder] %> -
<%= area.capitalize %><%= " page" unless area == "default" %> keywords
+ value: SiteConfig.onboarding_background_image, + placeholder: Constants::SiteConfig::DETAILS[:onboarding_background_image][:placeholder] %> +
+
+ main social image +
+
+
<%= Constants::SiteConfig::DETAILS[:onboarding_background_image][:description] %>
- <% end %> - <% end %> -
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Monetization", - state: "collapse", - target: "monetizationBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :shop_url %> - <%= f.text_field :shop_url, - class: "form-control", - value: SiteConfig.shop_url, - placeholder: Constants::SiteConfig::DETAILS[:shop_url][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:shop_url][:description] %>
-
- -
- <%= admin_config_label :stripe_api_key %> - <%= f.text_field :stripe_api_key, - class: "form-control", - value: SiteConfig.stripe_api_key, - placeholder: Constants::SiteConfig::DETAILS[:stripe_api_key][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:stripe_api_key][:description] %>
-
- -
- <%= admin_config_label :stripe_publishable_key %> - <%= f.text_field :stripe_publishable_key, - class: "form-control", - value: SiteConfig.stripe_publishable_key, - placeholder: Constants::SiteConfig::DETAILS[:stripe_publishable_key][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:stripe_publishable_key][:description] %>
-
- -
- <%= admin_config_label :payment_pointer %> - <%= f.text_field :payment_pointer, - class: "form-control", - value: SiteConfig.payment_pointer, - placeholder: Constants::SiteConfig::DETAILS[:payment_pointer][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:payment_pointer][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Newsletter", - state: "collapse", - target: "newsletterBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :mailchimp_newsletter_id, "Main Newsletter" %> - <%= f.text_field :mailchimp_newsletter_id, - class: "form-control", - value: SiteConfig.mailchimp_newsletter_id %> -
<%= Constants::SiteConfig::DETAILS[:mailchimp_newsletter_id][:description] %>
-
- -
- <%= admin_config_label :mailchimp_sustaining_members_id, "Sustaining Members Newsletter" %> - <%= f.text_field :mailchimp_sustaining_members_id, - class: "form-control", - value: SiteConfig.mailchimp_sustaining_members_id %> -
<%= Constants::SiteConfig::DETAILS[:mailchimp_sustaining_members_id][:description] %>
-
- -
- <%= admin_config_label :mailchimp_tag_moderators_id, "Tag Moderators Newsletter" %> - <%= f.text_field :mailchimp_tag_moderators_id, - class: "form-control", - value: SiteConfig.mailchimp_tag_moderators_id %> -
<%= Constants::SiteConfig::DETAILS[:mailchimp_tag_moderators_id][:description] %>
-
- -
- <%= admin_config_label :mailchimp_community_moderators_id, "Community Moderators Newsletter" %> - <%= f.text_field :mailchimp_community_moderators_id, - class: "form-control", - value: SiteConfig.mailchimp_community_moderators_id %> -
<%= Constants::SiteConfig::DETAILS[:mailchimp_community_moderators_id][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Onboarding", - state: "collapse", - target: "onboardingBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :onboarding_logo_image %> - <%= f.text_field :onboarding_logo_image, - class: "form-control", - value: SiteConfig.onboarding_logo_image, - placeholder: Constants::SiteConfig::DETAILS[:onboarding_logo_image][:placeholder] %> -
-
- main social image -
-
-
<%= Constants::SiteConfig::DETAILS[:onboarding_logo_image][:description] %>
-
-
- <%= admin_config_label :onboarding_background_image %> - <%= f.text_field :onboarding_background_image, - class: "form-control", - value: SiteConfig.onboarding_background_image, - placeholder: Constants::SiteConfig::DETAILS[:onboarding_background_image][:placeholder] %> -
-
- main social image -
-
-
<%= Constants::SiteConfig::DETAILS[:onboarding_background_image][:description] %>
+
+ <%= admin_config_label :onboarding_taskcard_image %> + <%= f.text_field :onboarding_taskcard_image, + class: "form-control", + value: SiteConfig.onboarding_taskcard_image, + placeholder: Constants::SiteConfig::DETAILS[:onboarding_taskcard_image][:placeholder] %> +
+
+ main social image +
+
+
<%= Constants::SiteConfig::DETAILS[:onboarding_taskcard_image][:description] %>
+
-
-
- <%= admin_config_label :onboarding_taskcard_image %> - <%= f.text_field :onboarding_taskcard_image, - class: "form-control", - value: SiteConfig.onboarding_taskcard_image, - placeholder: Constants::SiteConfig::DETAILS[:onboarding_taskcard_image][:placeholder] %> -
-
- main social image -
-
-
<%= Constants::SiteConfig::DETAILS[:onboarding_taskcard_image][:description] %>
-
+
+ <%= admin_config_label :suggested_users %> + <%= f.text_field :suggested_users, + class: "form-control", + value: SiteConfig.suggested_users.join(","), + placeholder: Constants::SiteConfig::DETAILS[:suggested_users][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:suggested_users][:description] %>
-
- -
- <%= admin_config_label :suggested_users %> - <%= f.text_field :suggested_users, - class: "form-control", - value: SiteConfig.suggested_users.join(","), - placeholder: Constants::SiteConfig::DETAILS[:suggested_users][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:suggested_users][:description] %>
-
- -
- <%= admin_config_label :suggested_tags %> - <%= f.text_field :suggested_tags, - class: "form-control", - value: SiteConfig.suggested_tags.join(","), - placeholder: Constants::SiteConfig::DETAILS[:suggested_tags][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:suggested_tags][:description] %>
-
-
-
<%= render partial: "card_header", @@ -842,13 +831,12 @@
<% configurable_rate_limits.each do |key, field_hash| %>
- <%= admin_config_label key %> - <%= f.number_field key, - class: "form-control", - value: SiteConfig.public_send(key), - min: field_hash[:min], - placeholder: field_hash[:placeholder] %> -
<%= field_hash[:description] %>
+ <%= admin_config_label :suggested_tags %> + <%= f.text_field :suggested_tags, + class: "form-control", + value: SiteConfig.suggested_tags.join(","), + placeholder: Constants::SiteConfig::DETAILS[:suggested_tags][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:suggested_tags][:description] %>
<% end %>
@@ -860,145 +848,166 @@
<%= Constants::SiteConfig::DETAILS[:spam_trigger_terms][:description] %>
-
-
- <%= render partial: "card_header", - locals: { - header: "Social Media", - state: "collapse", - target: "socialMediaBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :twitter_hashtag %> - <%= f.text_field :twitter_hashtag, - class: "form-control", - value: SiteConfig.twitter_hashtag.to_s, - placeholder: Constants::SiteConfig::DETAILS[:twitter_hashtag][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:twitter_hashtag][:description] %>
-
-
- <%= f.fields_for :social_media_handles do |social_media_field| %> - <% SiteConfig.social_media_handles.each do |platform, username| %> -
- <%= social_media_field.label platform %> - <%= social_media_field.text_field platform, - class: "form-control", - value: SiteConfig.social_media_handles[platform], - placeholder: "" %> -
<%= platform.capitalize %> Username
-
- <% end %> +
+ <%= render partial: "card_header", + locals: { + header: "Rate limits", + state: "collapse", + target: "rateLimitsBodyContainer", + expanded: "false" + } %> +
+ <% configurable_rate_limits.each do |key, field_hash| %> +
+ <%= admin_config_label key %> + <%= f.number_field key, + class: "form-control", + value: SiteConfig.public_send(key), + min: field_hash[:min], + placeholder: field_hash[:placeholder] %> +
<%= field_hash[:description] %>
+
<% end %>
-
-
- <%= render partial: "card_header", - locals: { - header: "Sponsors", - state: "collapse", - target: "sponsorsContainer", - expanded: "false" - } %> -
-
- <%= f.label :sponsor_headline %> - <%= f.text_field :sponsor_headline, - class: "form-control", - value: SiteConfig.sponsor_headline, - placeholder: Constants::SiteConfig::DETAILS[:sponsor_headline][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:sponsor_headline][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "Tags", - state: "collapse", - target: "tagsBodyContainer", - expanded: "false" - } %> -
-
- <%= admin_config_label :sidebar_tags %> - <%= f.text_field :sidebar_tags, - class: "form-control", - value: SiteConfig.sidebar_tags.join(","), - placeholder: Constants::SiteConfig::DETAILS[:sidebar_tags][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:sidebar_tags][:description] %>
-
-
-
- -
- <%= render partial: "card_header", - locals: { - header: "User Experience and Brand", - state: "collapse", - target: "uxBodyContainer", - expanded: "false" - } %> -
-
- <%= f.label :feed_style %> - <%= f.text_field :feed_style, - class: "form-control", - value: SiteConfig.feed_style, - placeholder: Constants::SiteConfig::DETAILS[:feed_style][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:feed_style][:description] %>
-
-
- <%= f.label :default_font %> - <%= select_tag "site_config[default_font]", - options_for_select( - [%w[sans-serif sans_serif], %w[serif serif], %w[open-dyslexic open_dyslexic]], - SiteConfig.default_font, - ), - multiple: false, - class: "form-control selectpicker" %> -
<%= Constants::SiteConfig::DETAILS[:default_font][:description] %>
-
-
- <%= f.label :primary_brand_color_hex %> - <%= f.text_field :primary_brand_color_hex, - class: "form-control", - value: SiteConfig.primary_brand_color_hex, - pattern: "^#+([a-fA-F0-9]{6})$", - placeholder: Constants::SiteConfig::DETAILS[:primary_brand_color_hex][:placeholder] %> -
<%= Constants::SiteConfig::DETAILS[:primary_brand_color_hex][:description] %>
-
-
- <%= admin_config_label :public %> - <%= f.check_box :public, checked: SiteConfig.public %> -
Are most of the site pages (posts, profiles, etc. public?) — BE VERY CAUTIOUS IN CHANGING THIS
-
-
-
- - <% if current_user.has_role?(:single_resource_admin, Config) %>
-
Confirm and Submit
-
+ <%= render partial: "card_header", + locals: { + header: "Social Media", + state: "collapse", + target: "socialMediaBodyContainer", + expanded: "false" + } %> +
- <%= label_tag :confirmation %> - <%= text_field_tag :confirmation, nil, class: "form-control", placeholder: "Confirmation text", autocomplete: "off", required: true, pattern: @confirmation_text %> -
Type the sentence: <%= @confirmation_text %>
- <%= f.submit "Update Site Configuration", class: "btn btn-danger btn-lg" %> + <%= admin_config_label :twitter_hashtag %> + <%= f.text_field :twitter_hashtag, + class: "form-control", + value: SiteConfig.twitter_hashtag.to_s, + placeholder: Constants::SiteConfig::DETAILS[:twitter_hashtag][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:twitter_hashtag][:description] %>
+
+
+ <%= f.fields_for :social_media_handles do |social_media_field| %> + <% SiteConfig.social_media_handles.each do |platform, username| %> +
+ <%= social_media_field.label platform %> + <%= social_media_field.text_field platform, + class: "form-control", + value: SiteConfig.social_media_handles[platform], + placeholder: "" %> +
<%= platform.capitalize %> Username
+
+ <% end %> + <% end %>
+ +
+ <%= render partial: "card_header", + locals: { + header: "Sponsors", + state: "collapse", + target: "sponsorsContainer", + expanded: "false" + } %> +
+
+ <%= f.label :sponsor_headline %> + <%= f.text_field :sponsor_headline, + class: "form-control", + value: SiteConfig.sponsor_headline, + placeholder: Constants::SiteConfig::DETAILS[:sponsor_headline][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:sponsor_headline][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "Tags", + state: "collapse", + target: "tagsBodyContainer", + expanded: "false" + } %> +
+
+ <%= admin_config_label :sidebar_tags %> + <%= f.text_field :sidebar_tags, + class: "form-control", + value: SiteConfig.sidebar_tags.join(","), + placeholder: Constants::SiteConfig::DETAILS[:sidebar_tags][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:sidebar_tags][:description] %>
+
+
+
+ +
+ <%= render partial: "card_header", + locals: { + header: "User Experience and Brand", + state: "collapse", + target: "uxBodyContainer", + expanded: "false" + } %> +
+
+ <%= f.label :feed_style %> + <%= f.text_field :feed_style, + class: "form-control", + value: SiteConfig.feed_style, + placeholder: Constants::SiteConfig::DETAILS[:feed_style][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:feed_style][:description] %>
+
+
+ <%= f.label :default_font %> + <%= select_tag "site_config[default_font]", + options_for_select( + [%w[sans-serif sans_serif], %w[serif serif], %w[open-dyslexic open_dyslexic]], + SiteConfig.default_font, + ), + multiple: false, + class: "form-control selectpicker" %> +
<%= Constants::SiteConfig::DETAILS[:default_font][:description] %>
+
+
+ <%= f.label :primary_brand_color_hex %> + <%= f.text_field :primary_brand_color_hex, + class: "form-control", + value: SiteConfig.primary_brand_color_hex, + pattern: "^#+([a-fA-F0-9]{6})$", + placeholder: Constants::SiteConfig::DETAILS[:primary_brand_color_hex][:placeholder] %> +
<%= Constants::SiteConfig::DETAILS[:primary_brand_color_hex][:description] %>
+
+
+ <%= admin_config_label :public %> + <%= f.check_box :public, checked: SiteConfig.public %> +
Are most of the site pages (posts, profiles, etc. public?) — BE VERY CAUTIOUS IN CHANGING THIS
+
+
+
+ + <% if current_user.has_role?(:single_resource_admin, Config) %> +
+
Confirm and Submit
+
+
+ <%= label_tag :confirmation %> + <%= text_field_tag :confirmation, nil, class: "form-control", placeholder: "Confirmation text", autocomplete: "off", required: true, pattern: @confirmation_text %> +
Type the sentence: <%= @confirmation_text %>
+ <%= f.submit "Update Site Configuration", class: "btn btn-danger btn-lg" %> +
+
+
+ <% end %> <% end %> - <% end %>
- <% if current_user.has_role?(:single_resource_admin, Config) && current_user.has_role?(:super_admin) %>
<% end %> -
diff --git a/app/views/devise/invitations/edit.html.erb b/app/views/devise/invitations/edit.html.erb index f1b6a1ae0..155a6ea7c 100644 --- a/app/views/devise/invitations/edit.html.erb +++ b/app/views/devise/invitations/edit.html.erb @@ -2,7 +2,9 @@

Welcome to <%= community_name %>

-

<%= SiteConfig.tagline %>

+ <% if SiteConfig.tagline.present? %> +

<%= SiteConfig.tagline %>

+ <% end %>

Set a password to access your account

diff --git a/app/views/layouts/_signup_modal.html.erb b/app/views/layouts/_signup_modal.html.erb index f1e543638..5248b84c6 100644 --- a/app/views/layouts/_signup_modal.html.erb +++ b/app/views/layouts/_signup_modal.html.erb @@ -19,7 +19,7 @@ <% if SiteConfig.tagline.present? %> <%= SiteConfig.tagline %> <% else %> - We’d love for you to be apart of this community. + We’d love for you to be a part of this community. <% end %>

diff --git a/spec/views/layouts/signup_modal.html.erb_spec.rb b/spec/views/layouts/signup_modal.html.erb_spec.rb index 39e1f65f5..b74b72216 100644 --- a/spec/views/layouts/signup_modal.html.erb_spec.rb +++ b/spec/views/layouts/signup_modal.html.erb_spec.rb @@ -1,8 +1,17 @@ require "rails_helper" RSpec.describe "layouts/_signup_modal.html.erb", type: :view do - it "has the tagline" do + let(:tagline_text) { "the best community" } + + it "renders the tagline if it is set" do + allow(SiteConfig).to receive(:tagline).and_return(tagline_text) render expect(rendered).to have_text(SiteConfig.tagline) end + + it "does not render the tagline if it is not set" do + allow(SiteConfig).to receive(:tagline).and_return(nil) + render + expect(rendered).not_to have_text(tagline_text) + end end