* Settings can process markdown into html * Update Settings with new onboarding settings * Async render onboarding newsletter step * Tweak onboarding design * Fix broken spec * Better rendered component test * Tweaks to match design * Try to tweak design * Try having a default state * Tweak placeholder content * Better await componentDidMount * Continue to tweak the design * ContentRenderer#process should always return Result * Try more clarity in the partial * Rubocop
45 lines
2.4 KiB
Text
45 lines
2.4 KiB
Text
<%= form_for(Settings::General.new,
|
|
url: admin_settings_general_settings_path,
|
|
html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
|
|
<details class="crayons-card">
|
|
<summary class="crayons-subtitle-2 p-6">Onboarding</summary>
|
|
<div class="p-6 pt-0">
|
|
<fieldset class="grid gap-4">
|
|
|
|
<div class="crayons-field">
|
|
<%= admin_config_label :suggested_tags %>
|
|
<%= admin_config_description Constants::Settings::General.details[:suggested_tags][:description] %>
|
|
<%= f.text_field :suggested_tags,
|
|
class: "crayons-textfield",
|
|
value: Settings::General.suggested_tags.join(","),
|
|
placeholder: Constants::Settings::General.details[:suggested_tags][:placeholder] %>
|
|
</div>
|
|
|
|
<div class="crayons-field">
|
|
<%= admin_config_label :newsletter_step_heading %>
|
|
<%= admin_config_description Constants::Settings::General.details[:onboarding_newsletter_content][:description] %>
|
|
<%= f.text_area :onboarding_newsletter_content,
|
|
class: "crayons-textfield",
|
|
value: Settings::General.onboarding_newsletter_content,
|
|
placeholder: Constants::Settings::General.details[:onboarding_newsletter_content][:placeholder] %>
|
|
</div>
|
|
|
|
<div class="crayons-field">
|
|
<%= admin_config_label Constants::Settings::General.details[:onboarding_newsletter_opt_in_head][:description] %>
|
|
<%= f.text_field :onboarding_newsletter_opt_in_head,
|
|
class: "crayons-textfield",
|
|
value: Settings::General.onboarding_newsletter_opt_in_head,
|
|
placeholder: Constants::Settings::General.details[:onboarding_newsletter_opt_in_head][:placeholder] %>
|
|
|
|
<%= admin_config_label Constants::Settings::General.details[:onboarding_newsletter_opt_in_subhead][:description] %>
|
|
<%= f.text_field :onboarding_newsletter_opt_in_subhead,
|
|
class: "crayons-textfield",
|
|
value: Settings::General.onboarding_newsletter_opt_in_subhead,
|
|
placeholder: Constants::Settings::General.details[:onboarding_newsletter_opt_in_subhead][:placeholder] %>
|
|
</div>
|
|
|
|
</fieldset>
|
|
<%= render "update_setting_button", f: f %>
|
|
</div>
|
|
</details>
|
|
<% end %>
|