diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb
index b4bb604ae..e319e49ce 100644
--- a/app/controllers/admin/settings_controller.rb
+++ b/app/controllers/admin/settings_controller.rb
@@ -3,6 +3,10 @@ module Admin
# /admin/customization/config. The actual updates get handled by the settings
# controllers in the Admin::Settings namespace.
class SettingsController < Admin::ApplicationController
+ # NOTE: The "show" action uses a lot of partials, this makes it easier to
+ # reference them.
+ prepend_view_path("app/views/admin/settings")
+
layout "admin"
def show
diff --git a/app/views/admin/settings/forms/_api_tokens.html.erb b/app/views/admin/settings/forms/_api_tokens.html.erb
new file mode 100644
index 000000000..9a1cc2264
--- /dev/null
+++ b/app/views/admin/settings/forms/_api_tokens.html.erb
@@ -0,0 +1,32 @@
+<%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
+
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "API Tokens",
- state: "collapse",
- target: "apiBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :health_check_token %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:health_check_token][:description] %>
- <%= f.text_field :health_check_token,
- class: "crayons-textfield",
- value: Settings::General.health_check_token,
- placeholder: Constants::Settings::General::DETAILS[:health_check_token][:placeholder] %>
-
-
- <%= admin_config_label :video_encoder_key %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:video_encoder_key][:description] %>
- <%= f.text_field :video_encoder_key,
- class: "crayons-textfield",
- value: Settings::General.video_encoder_key,
- placeholder: Constants::Settings::General::DETAILS[:video_encoder_key][:placeholder] %>
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::Authentication.new, url: admin_settings_authentications_path, html: { data: { action: "submit->config#configUpdatePrecheck", "config-target": "authSectionForm", testid: "authSectionForm" } }) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Authentication",
- state: "collapse",
- target: "authenticationBodyContainer",
- expanded: false
- } %>
-
-
-
- General settings
-
- "
- data-tooltip="Unchecking this will enable Email Registration">
- <%= f.check_box :invite_only_mode,
- checked: invite_only_mode_or_no_enabled_auth_options,
- data: { action: "config#adjustAuthenticationOptions", "config-target": "inviteOnlyMode" },
- class: "crayons-checkbox" %>
-
- <%= admin_config_label :invite_only_mode, "Invite-only mode", model: Settings::Authentication %>
- <%= admin_config_description Constants::Settings::Authentication::DETAILS[:invite_only_mode][:description] %>
-
-
-
-
-
-
-
-
- <%= inline_svg_tag("email.svg", class: "crayons-icon", aria: true, title: "Email icon") %>
-
-
-
-
-
-
- <%= f.check_box :allow_email_password_registration,
- checked: Settings::Authentication.allow_email_password_registration,
- id: "email-registration-checkbox",
- class: "crayons-checkbox" %>
-
-
- <%= admin_config_label :allowed_registration_email_domains, "Allowed email domains", model: Settings::Authentication %>
- <%= admin_config_description Constants::Settings::Authentication::DETAILS[:allowed_registration_email_domains][:description] %>
- <%= f.text_field :allowed_registration_email_domains,
- class: "crayons-textfield",
- value: Settings::Authentication.allowed_registration_email_domains.join(","),
- placeholder: Constants::Settings::Authentication::DETAILS[:allowed_registration_email_domains][:placeholder] %>
-
-
- <%= f.check_box :display_email_domain_allow_list_publicly,
- checked: Settings::Authentication.display_email_domain_allow_list_publicly,
- id: "email-display-emails-publicly-checkbox",
- class: "crayons-checkbox mt-2" %>
-
- <%= admin_config_label :display_email_domain_allow_list_publicly, model: Settings::Authentication %>
- <%= admin_config_description Constants::Settings::Authentication::DETAILS[:display_email_domain_allow_list_publicly][:description] %>
-
-
-
- <%= f.check_box :require_captcha_for_email_password_registration,
- checked: Settings::Authentication.require_captcha_for_email_password_registration,
- data: {
- action: "config#toggleGoogleRecaptchaFields",
- "config-target": "requireCaptchaForEmailPasswordRegistration"
- },
- class: "crayons-checkbox mt-2" %>
-
- <%= admin_config_label :require_captcha_for_email_password_registration, "Enable Google reCAPTCHA for email password registration", model: Settings::Authentication %>
- <%= admin_config_description Constants::Settings::Authentication::DETAILS[:require_captcha_for_email_password_registration][:description] %>
-
-
- " aria-labelledby="recaptchaContainer">
-
- <%= admin_config_label :recaptcha_site_key, "Google reCAPTCHA site key", model: Settings::Authentication %>
- <%= admin_config_description Constants::Settings::Authentication::DETAILS[:recaptcha_site_key][:description] %>
- <%= f.text_field :recaptcha_site_key,
- class: "crayons-textfield",
- value: Settings::Authentication.recaptcha_site_key,
- placeholder: Constants::Settings::Authentication::DETAILS[:recaptcha_site_key][:placeholder] %>
-
-
- <%= admin_config_label :recaptcha_secret_key, "Google reCAPTCHA secret key", model: Settings::Authentication %>
- <%= admin_config_description Constants::Settings::Authentication::DETAILS[:recaptcha_secret_key][:description] %>
- <%= f.text_field :recaptcha_secret_key,
- class: "crayons-textfield",
- value: Settings::Authentication.recaptcha_secret_key,
- placeholder: Constants::Settings::Authentication::DETAILS[:recaptcha_secret_key][:placeholder] %>
-
-
-
- <% if Settings::Authentication.allow_email_password_registration %>
-
- Disable
-
-
- Close
-
- <% else %>
-
- Undo
-
- <% end %>
-
-
-
-
-
-
-
-
-
- <%= f.text_field :auth_providers_to_enable,
- id: "auth_providers_to_enable",
- class: "form-control hidden",
- value: Settings::Authentication.providers.join(","),
- readonly: true %>
-
- <% authentication_available_providers.each do |provider| %>
- <% next if provider.provider_name == :apple && !Flipper.enabled?(:apple_auth) %>
-
-
- <%= inline_svg_tag("#{provider.provider_name}.svg", class: "crayons-icon", aria: true, title: "#{provider.official_name} logo") %>
-
-
-
-
- <% auth_partial = provider.provider_name == :apple ? "apple_auth_provider_settings" : "auth_provider_settings" %>
- <%= render partial: auth_partial,
- locals: {
- f: f,
- provider: provider
- } %>
-
-
-
-
- <% end %>
-
-
-
- Changing authentication keys will not take effect until this Forem instance is restarted.
-
-
- <%= render "form_submission", f: f %>
-
-
- <% end %>
-
- <%= form_for(Settings::Campaign.new, url: admin_settings_campaigns_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Campaign",
- state: "collapse",
- target: "campaignBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :hero_html_variant_name, "Campaign hero HTML variant name" %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:hero_html_variant_name][:description] %>
- <%= f.text_field :hero_html_variant_name,
- class: "crayons-textfield",
- value: Settings::Campaign.hero_html_variant_name,
- placeholder: Constants::Settings::Campaign::DETAILS[:hero_html_variant_name][:placeholder] %>
-
-
-
- <%= f.check_box :articles_require_approval, checked: Settings::Campaign.articles_require_approval, class: "crayons-checkbox" %>
- <%= admin_config_label :articles_require_approval %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:articles_require_approval][:description] %>
-
-
-
- <%= f.check_box :sidebar_enabled, checked: Settings::Campaign.sidebar_enabled, class: "crayons-checkbox" %>
- <%= admin_config_label :sidebar_enabled %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:sidebar_enabled][:description] %>
-
-
-
- <%= admin_config_label :sidebar_image %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:sidebar_image][:description] %>
- <% if Settings::Campaign.sidebar_image.present? %>
-
-
-
-
-
- <% end %>
- <%= f.text_field :sidebar_image,
- class: "crayons-textfield",
- value: Settings::Campaign.sidebar_image,
- placeholder: Constants::Settings::Campaign::DETAILS[:sidebar_image][:placeholder] %>
-
-
-
- <%= admin_config_label :url, "Campaign URL" %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:url][:description] %>
- <%= f.text_field :url,
- class: "crayons-textfield",
- value: Settings::Campaign.url,
- placeholder: Constants::Settings::Campaign::DETAILS[:url][:placeholder] %>
-
-
-
- <%= admin_config_label :featured_tags %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:featured_tags][:description] %>
- <%= f.text_field :featured_tags,
- class: "crayons-textfield",
- value: Settings::Campaign.featured_tags.join(","),
- placeholder: Constants::Settings::Campaign::DETAILS[:featured_tags][:placeholder] %>
-
-
-
- <%= admin_config_label :call_to_action, "Campaign Call to Action" %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:call_to_action][:description] %>
- <%= f.text_field :call_to_action,
- class: "crayons-textfield",
- value: Settings::Campaign.call_to_action,
- placeholder: Constants::Settings::Campaign::DETAILS[:call_to_action][:placeholder] %>
-
-
-
- <%= admin_config_label :articles_expiry_time, "Campaign article expiry time" %>
- <%= admin_config_description Constants::Settings::Campaign::DETAILS[:articles_expiry_time][:description] %>
- <%= f.number_field :articles_expiry_time,
- class: "crayons-textfield",
- value: Settings::Campaign.articles_expiry_time,
- placeholder: Constants::Settings::Campaign::DETAILS[:articles_expiry_time][:placeholder] %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::Community.new, url: admin_settings_communities_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Community Content",
- state: "collapse",
- target: "contentBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :community_name, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:community_name][:description] %>
- <%= f.text_field :community_name,
- class: "crayons-textfield",
- value: Settings::Community.community_name,
- placeholder: Constants::Settings::Community::DETAILS[:community_name][:placeholder] %>
-
-
-
- <%= admin_config_label :community_emoji, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:community_emoji][:description] %>
- <%= f.text_field :community_emoji,
- class: "crayons-textfield",
- value: Settings::Community.community_emoji,
- placeholder: Constants::Settings::Community::DETAILS[:community_emoji][:placeholder] %>
-
-
-
- <%= admin_config_label :tagline, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:tagline][:description] %>
- <%= f.text_field :tagline,
- class: "crayons-textfield",
- value: Settings::Community.tagline,
- placeholder: Constants::Settings::Community::DETAILS[:tagline][:placeholder] %>
-
-
-
- <%= admin_config_label :community_description, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:community_description][:description] %>
- <%= f.text_field :community_description,
- class: "crayons-textfield",
- value: Settings::Community.community_description,
- placeholder: Constants::Settings::Community::DETAILS[:community_description][:placeholder] %>
-
-
-
- <%= admin_config_label :member_label, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:member_label][:description] %>
- <%= f.text_field :member_label,
- class: "crayons-textfield",
- value: Settings::Community.member_label,
- placeholder: Constants::Settings::Community::DETAILS[:member_label][:placeholder] %>
-
-
-
- <%= admin_config_label :copyright_start_year, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:copyright_start_year][:description] %>
- <%= f.text_field :copyright_start_year,
- class: "crayons-textfield",
- value: Settings::Community.copyright_start_year,
- placeholder: Constants::Settings::Community::DETAILS[:copyright_start_year][:placeholder] %>
-
-
-
- <%= admin_config_label :staff_user_id, model: Settings::Community %>
- <%= admin_config_description Constants::Settings::Community::DETAILS[:staff_user_id][:description] %>
- <%= f.text_field :staff_user_id,
- class: "crayons-textfield",
- value: Settings::Community.staff_user_id,
- placeholder: Constants::Settings::Community::DETAILS[:staff_user_id][:placeholder] %>
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Credits",
- state: "collapse",
- target: "creditsBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= f.fields_for :credit_prices_in_cents do |price_field| %>
-
- <%= admin_config_label "Credit price in cents (S)" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:credit_prices_in_cents][:small][:description] %>
- <%= price_field.number_field :small,
- class: "crayons-textfield",
- value: Settings::General.credit_prices_in_cents[:small] %>
-
-
-
- <%= admin_config_label "Credit price in cents (M)" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:credit_prices_in_cents][:medium][:description] %>
- <%= price_field.number_field :medium,
- class: "crayons-textfield",
- value: Settings::General.credit_prices_in_cents[:medium] %>
-
-
- <%= admin_config_label "Credit price in cents (L)" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:credit_prices_in_cents][:large][:description] %>
- <%= price_field.number_field :large,
- class: "crayons-textfield",
- value: Settings::General.credit_prices_in_cents[:large] %>
-
-
-
- <%= admin_config_label "Credit price in cents (XL)" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:credit_prices_in_cents][:xlarge][:description] %>
- <%= price_field.number_field :xlarge,
- class: "crayons-textfield",
- value: Settings::General.credit_prices_in_cents[:xlarge] %>
-
- <% end %>
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Emails",
- state: "collapse",
- target: "emailBodyContainer",
- expanded: false
- } %>
-
-
-
-
- Default
-
-
- Default (set via default_email environment variable)
-
-
-
-
-
-
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path, html: { data: { testid: "emailDigestSectionForm" } }) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Email digest frequency",
- state: "collapse",
- target: "emailDigestBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :periodic_email_digest %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:periodic_email_digest][:description] %>
- <%= f.number_field :periodic_email_digest,
- class: "crayons-textfield",
- value: Settings::General.periodic_email_digest,
- placeholder: Constants::Settings::General::DETAILS[:periodic_email_digest][:placeholder] %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Google Analytics",
- state: "collapse",
- target: "gaBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :ga_tracking_id, "View ID" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:ga_tracking_id][:description] %>
- <%= f.text_field :ga_tracking_id,
- class: "crayons-textfield",
- value: Settings::General.ga_tracking_id %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Images",
- state: "collapse",
- target: "imagesBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :main_social_image %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:main_social_image][:description] %>
- <%= f.text_field :main_social_image,
- class: "crayons-textfield",
- value: Settings::General.main_social_image,
- placeholder: Constants::Settings::General::DETAILS[:main_social_image][:placeholder] %>
- <% if Settings::General.main_social_image.present? %>
-
- <% end %>
-
-
-
- <%= admin_config_label :favicon_url, "Favicon URL" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:favicon_url][:description] %>
- <%= f.text_field :favicon_url,
- class: "form-control",
- value: Settings::General.favicon_url,
- placeholder: Constants::Settings::General::DETAILS[:favicon_url][:placeholder] %>
-
-
-
-
- <%= admin_config_label :logo_png %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:logo_png][:description] %>
- <%= f.text_field :logo_png,
- class: "crayons-textfield",
- value: Settings::General.logo_png,
- placeholder: Constants::Settings::General::DETAILS[:logo_png][:placeholder] %>
- <% if Settings::General.logo_png.present? %>
-
- <% end %>
-
-
-
- <%= admin_config_label :logo_svg %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:logo_svg][:description] %>
- <%= f.text_area :logo_svg,
- class: "crayons-textfield",
- value: Settings::General.logo_svg,
- rows: 6,
- placeholder: Constants::Settings::General::DETAILS[:logo_svg][:placeholder] %>
- <% if Settings::General.logo_svg.present? %>
-
- <%= Settings::General.logo_svg.html_safe %>
-
- <% end %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path, html: { data: { testid: "mascotSectionForm" } }) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Mascot",
- state: "collapse",
- target: "mascotBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :mascot_user_id, "Mascot user ID" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mascot_user_id][:description] %>
- <%= f.text_field :mascot_user_id,
- class: "crayons-textfield",
- value: Settings::General.mascot_user_id,
- min: 1,
- placeholder: Constants::Settings::General::DETAILS[:mascot_user_id][:placeholder] %>
-
-
-
- <%= admin_config_label :mascot_image_url, "Mascot Image URL" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mascot_image_url][:description] %>
- <%= f.text_field :mascot_image_url,
- class: "crayons-textfield",
- value: Settings::General.mascot_image_url,
- placeholder: Constants::Settings::General::DETAILS[:mascot_image_url][:placeholder] %>
-
-
-
-
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Meta Keywords",
- state: "collapse",
- target: "metaKeywordsBodyContainer",
- expanded: false
- } %>
-
-
- <%= f.fields_for :meta_keywords do |meta_keywords_field| %>
- <% Settings::General.meta_keywords.each do |area, keywords| %>
-
- <%= admin_config_label area.to_s %>
-
- <%= area.capitalize %><%= "page" unless area == "default" %> keywords
-
- <%= meta_keywords_field.text_field area,
- class: "crayons-textfield",
- value: Settings::General.meta_keywords[area],
- placeholder: Constants::Settings::General::DETAILS[:meta_keywords][:placeholder] %>
-
- <% end %>
- <% end %>
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Monetization",
- state: "collapse",
- target: "monetizationBodyContainer",
- expanded: false
- } %>
-
-
-
-
- <%= admin_config_label :stripe_api_key, "Stripe API key" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:stripe_api_key][:description] %>
- <%= f.text_field :stripe_api_key,
- class: "crayons-textfield",
- value: Settings::General.stripe_api_key,
- placeholder: Constants::Settings::General::DETAILS[:stripe_api_key][:placeholder] %>
-
-
-
- <%= admin_config_label :stripe_publishable_key %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:stripe_publishable_key][:description] %>
- <%= f.text_field :stripe_publishable_key,
- class: "crayons-textfield",
- value: Settings::General.stripe_publishable_key,
- placeholder: Constants::Settings::General::DETAILS[:stripe_publishable_key][:placeholder] %>
-
-
-
- <%= admin_config_label :payment_pointer %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:payment_pointer][:description] %>
- <%= f.text_field :payment_pointer,
- class: "crayons-textfield",
- value: Settings::General.payment_pointer,
- placeholder: Constants::Settings::General::DETAILS[:payment_pointer][:placeholder] %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Newsletter",
- state: "collapse",
- target: "newsletterBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :mailchimp_api_key, "Mailchimp API Key" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mailchimp_api_key][:description] %>
- <%= f.text_field :mailchimp_api_key,
- class: "crayons-textfield",
- value: Settings::General.mailchimp_api_key %>
-
-
-
- <%= admin_config_label :mailchimp_newsletter_id, "Main Newsletter" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mailchimp_newsletter_id][:description] %>
- <%= f.text_field :mailchimp_newsletter_id,
- class: "crayons-textfield",
- value: Settings::General.mailchimp_newsletter_id %>
-
-
-
- <%= admin_config_label :mailchimp_sustaining_members_id, "Sustaining Members Newsletter" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mailchimp_sustaining_members_id][:description] %>
- <%= f.text_field :mailchimp_sustaining_members_id,
- class: "crayons-textfield",
- value: Settings::General.mailchimp_sustaining_members_id %>
-
-
-
- <%= admin_config_label :mailchimp_tag_moderators_id, "Tag Moderators Newsletter" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mailchimp_tag_moderators_id][:description] %>
- <%= f.text_field :mailchimp_tag_moderators_id,
- class: "crayons-textfield",
- value: Settings::General.mailchimp_tag_moderators_id %>
-
-
-
- <%= admin_config_label :mailchimp_community_moderators_id, "Community Moderators Newsletter" %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:mailchimp_community_moderators_id][:description] %>
- <%= f.text_field :mailchimp_community_moderators_id,
- class: "crayons-textfield",
- value: Settings::General.mailchimp_community_moderators_id %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Onboarding",
- state: "collapse",
- target: "onboardingBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :onboarding_background_image %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:onboarding_background_image][:description] %>
- <%= f.text_field :onboarding_background_image,
- class: "crayons-textfield",
- value: Settings::General.onboarding_background_image,
- placeholder: Constants::Settings::General::DETAILS[:onboarding_background_image][:placeholder] %>
-
-
-
-
-
-
-
-
- <%= admin_config_label :suggested_users %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:suggested_users][:description] %>
- <%= f.text_field :suggested_users,
- class: "crayons-textfield",
- value: Settings::General.suggested_users.join(","),
- placeholder: Constants::Settings::General::DETAILS[:suggested_users][:placeholder] %>
-
-
-
- <%= f.check_box :prefer_manual_suggested_users, checked: Settings::General.prefer_manual_suggested_users, class: "crayons-checkbox" %>
-
- <%= admin_config_label :prefer_manual_suggested_users %>
-
- <%= Constants::Settings::General::DETAILS[:prefer_manual_suggested_users][:description] %>
-
-
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::RateLimit.new, url: admin_settings_rate_limits_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Rate limits and anti-spam",
- state: "collapse",
- target: "rateLimitsBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :user_considered_new_days, model: Settings::RateLimit %>
- <%= admin_config_description Constants::Settings::RateLimit::DETAILS[:user_considered_new_days][:description] %>
- <%= f.number_field :user_considered_new_days,
- class: "crayons-textfield",
- value: Settings::RateLimit.user_considered_new_days,
- placeholder: Constants::Settings::RateLimit::DETAILS[:user_considered_new_days][:placeholder] %>
-
-
- <% configurable_rate_limits.each do |key, field_hash| %>
-
- <%= admin_config_label field_hash[:title], model: Settings::RateLimit %>
-
- <%= field_hash[:description] %>
-
- <%= f.number_field key,
- class: "crayons-textfield",
- value: Settings::RateLimit.public_send(key),
- min: field_hash[:min],
- placeholder: field_hash[:placeholder] %>
-
- <% end %>
-
-
- <%= admin_config_label :spam_trigger_terms, model: Settings::RateLimit %>
- <%= admin_config_description Constants::Settings::RateLimit::DETAILS[:spam_trigger_terms][:description] %>
- <%= f.text_area :spam_trigger_terms,
- class: "crayons-textfield",
- value: Settings::RateLimit.spam_trigger_terms.join(","),
- placeholder: Constants::Settings::RateLimit::DETAILS[:spam_trigger_terms][:placeholder] %>
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Social Media",
- state: "collapse",
- target: "socialMediaBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :twitter_hashtag %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:twitter_hashtag][:description] %>
- <%= f.text_field :twitter_hashtag,
- class: "crayons-textfield",
- value: Settings::General.twitter_hashtag.to_s,
- placeholder: Constants::Settings::General::DETAILS[:twitter_hashtag][:placeholder] %>
-
- <%= f.fields_for :social_media_handles do |social_media_field| %>
- <% Settings::General.social_media_handles.each do |platform, username| %>
-
- <%= admin_config_label platform %>
-
- <%= platform.capitalize %> username
-
- <%= social_media_field.text_field platform,
- class: "crayons-textfield",
- value: Settings::General.social_media_handles[platform],
- placeholder: "" %>
-
- <% end %>
- <% end %>
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::SMTP.new, url: admin_settings_smtp_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: { header: "SMTP Settings", state: "collapse", target: "smtpSettingsBodyContainer", expanded: false } %>
-
-
- <% Settings::SMTP::OPTIONS.each do |config_key| %>
-
- <%= admin_config_label config_key %>
- <%= admin_config_description Constants::Settings::SMTP::DETAILS[config_key][:description] %>
- <%= f.text_field config_key,
- class: "crayons-textfield",
- value: Settings::SMTP.public_send(config_key),
- placeholder: Constants::Settings::SMTP::DETAILS[config_key][:placeholder] %>
-
-
- <% end %>
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Sponsors",
- state: "collapse",
- target: "sponsorsContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :sponsor_headline %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:sponsor_headline][:description] %>
- <%= f.text_field :sponsor_headline,
- class: "crayons-textfield",
- value: Settings::General.sponsor_headline,
- placeholder: Constants::Settings::General::DETAILS[:sponsor_headline][:placeholder] %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::General.new, url: admin_settings_general_settings_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "Tags",
- state: "collapse",
- target: "tagsBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :sidebar_tags %>
- <%= admin_config_description Constants::Settings::General::DETAILS[:sidebar_tags][:description] %>
- <%= f.text_field :sidebar_tags,
- class: "crayons-textfield",
- value: Settings::General.sidebar_tags.join(","),
- placeholder: Constants::Settings::General::DETAILS[:sidebar_tags][:placeholder],
- pattern: "[a-z0-9,]+" %>
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
-
- <%= form_for(Settings::UserExperience.new, url: admin_settings_user_experiences_path) do |f| %>
-
- <%= render partial: "admin/shared/card_header",
- locals: {
- header: "User Experience and Brand",
- state: "collapse",
- target: "uxBodyContainer",
- expanded: false
- } %>
-
-
-
- <%= admin_config_label :feed_style, model: Settings::UserExperience %>
- <%= admin_config_description Constants::Settings::UserExperience::DETAILS[:feed_style][:description] %>
- <%= f.text_field :feed_style,
- class: "crayons-textfield",
- value: Settings::UserExperience.feed_style,
- placeholder: Constants::Settings::UserExperience::DETAILS[:feed_style][:placeholder] %>
-
-
- <%= admin_config_label :feed_strategy, model: Settings::UserExperience %>
- <%= admin_config_description Constants::Settings::UserExperience::DETAILS[:feed_strategy][:description] %>
- <%= f.text_field :feed_strategy,
- class: "crayons-textfield",
- value: Settings::UserExperience.feed_strategy,
- placeholder: Constants::Settings::UserExperience::DETAILS[:feed_strategy][:placeholder] %>
-
-
- <%= admin_config_label :tag_feed_minimum_score, model: Settings::UserExperience %>
- <%= admin_config_description Constants::Settings::UserExperience::DETAILS[:tag_feed_minimum_score][:description] %>
- <%= f.number_field :tag_feed_minimum_score,
- class: "crayons-textfield",
- value: Settings::UserExperience.tag_feed_minimum_score,
- placeholder: Constants::Settings::UserExperience::DETAILS[:tag_feed_minimum_score][:placeholder] %>
-
-
- <%= admin_config_label :home_feed_minimum_score, model: Settings::UserExperience %>
- <%= admin_config_description Constants::Settings::UserExperience::DETAILS[:home_feed_minimum_score][:description] %>
- <%= f.number_field :home_feed_minimum_score,
- class: "crayons-textfield",
- value: Settings::UserExperience.home_feed_minimum_score,
- placeholder: Constants::Settings::UserExperience::DETAILS[:home_feed_minimum_score][:placeholder] %>
-
-
- <%= admin_config_label :default_font, model: Settings::UserExperience %>
- <%= admin_config_description Constants::Settings::UserExperience::DETAILS[:default_font][:description] %>
- <%= select_tag "settings_user_experience[default_font]",
- options_for_select(
- [%w[sans-serif sans_serif], %w[serif serif], %w[open-dyslexic open_dyslexic]],
- Settings::UserExperience.default_font,
- ),
- multiple: false,
- class: "selectpicker" %>
-
-
- <%= admin_config_label :primary_brand_color_hex, model: Settings::UserExperience %>
- <%= admin_config_description Constants::Settings::UserExperience::DETAILS[:primary_brand_color_hex][:description] %>
- <%= f.color_field :primary_brand_color_hex,
- class: "crayons-color-selector",
- value: Settings::UserExperience.primary_brand_color_hex,
- pattern: "^#+([a-fA-F0-9]{6})$",
- placeholder: Constants::Settings::UserExperience::DETAILS[:primary_brand_color_hex][:placeholder] %>
-
-
- <%= f.check_box :public, checked: Settings::UserExperience.public, class: "crayons-checkbox" %>
-
- <%= admin_config_label :public, model: Settings::UserExperience %>
-
- Are most of the site pages (e.g. posts, profiles) public? Please take precaution when changing this setting.
-
-
-
-
- <%= render "form_submission", f: f %>
-
-
-
- <% end %>
+ <%= render partial: "forms/api_tokens" %>
+ <%= render partial: "forms/authentication" %>
+ <%= render partial: "forms/campaign" %>
+ <%= render partial: "forms/community" %>
+ <%= render partial: "forms/credits" %>
+ <%= render partial: "forms/emails" %>
+ <%= render partial: "forms/email_digest_frequency" %>
+ <%= render partial: "forms/google_analytics" %>
+ <%= render partial: "forms/images" %>
+ <%= render partial: "forms/mascot" %>
+ <%= render partial: "forms/meta_keywords" %>
+ <%= render partial: "forms/monetization" %>
+ <%= render partial: "forms/newsletter" %>
+ <%= render partial: "forms/onboarding" %>
+ <%= render partial: "forms/rate_limit" %>
+ <%= render partial: "forms/smtp" %>
+ <%= render partial: "forms/sponsors" %>
+ <%= render partial: "forms/tags" %>
+ <%= render partial: "forms/user_experience" %>
-