docbrown/app/views/admin/creator_settings/_form.html.erb
Julianna Tetreault 428dd1bd2c
Adjust Creator Settings Form Width (#15725)
* Reduces width of community_name field and finish button

* Slightly adjusts util classes on necessary fields

* Adjusts field widths to be larger for appearance

* Remove util classes entirely from fields
2021-12-10 09:53:14 -07:00

87 lines
4.5 KiB
Text

<div class="crayons-field mt-6 align-left">
<%= f.label :community_name, class: "crayons-field__label" do %>
Community name
<span class="crayons-field__required crayons-tooltip" data-tooltip="This will set the primary name for your Forem" aria-describedby="community-name-subtitle"></span>
<p id="community-name-subtitle" class="crayons-field__description">Used as the primary name for your Forem.</p>
<% end %>
<%= f.text_field :community_name, placeholder: "Climbing Life", class: "crayons-textfield", required: true %>
</div>
<%= render partial: "admin/shared/logo_upload", locals: { allowed_types: @logo_allowed_types, max_file_size: @max_file_size, f: f } %>
<div class="crayons-field mt-6 align-left">
<%= f.label :primary_brand_color_hex, class: "crayons-field__label" do %>
Brand color
<span class="crayons-field__required crayons-tooltip" data-tooltip="This will set the accent color for buttons, links, etc. on your Forem" aria-describedby="color-selector-subtitle"></span>
<p id="color-selector-subtitle" class="crayons-field__description">This will be the "accent" color used for buttons, links, etc.</p>
<% end %>
<div class="crayons-field">
<div class="flex">
<%= f.text_field :primary_brand_color_hex,
pattern: "^#+([a-fA-F0-9]{6})$",
title: "Provide a valid HEX Color or pick your color from the color picker.",
placeholder: ::Settings::UserExperience.primary_brand_color_hex,
class: "crayons-textfield js-color-field",
"data-action": "change->creator-settings#handleValidationsAndUpdates",
"data-creator-settings-target": "brandColor",
"aria-describedby": "color-contrast-error" %>
<%= f.color_field :primary_brand_color_hex,
pattern: "^#+([a-fA-F0-9]{6})$",
placeholder: ::Settings::UserExperience.primary_brand_color_hex,
class: "crayons-color-selector js-color-field ml-2",
required: true,
"data-action": "change->creator-settings#handleValidationsAndUpdates" %>
</div>
</div>
<div id="color-contrast-error" data-creator-settings-target="colorContrastError" aria-live="polite" class="mt-1 color-accent-danger"></div>
</div>
<div class="crayons-field mt-6 align-left">
<fieldset aria-describedby="section-description">
<legend class="crayons-field__label mb-2">Who can join this community?</legend>
<div class="flex gap-3">
<div>
<%= f.radio_button :invite_only_mode, false, class: "crayons-radio", role: "radio" %>
<%= label_tag "creator_settings_form_invite_only_mode_false", "Everyone" %>
</div>
<div>
<%= f.radio_button :invite_only_mode, true, class: "crayons-radio", role: "radio" %>
<%= label_tag "creator_settings_form_invite_only_mode_true", "Members Only" %>
</div>
</div>
</fieldset>
</div>
<div class="crayons-field mt-6 align-left">
<fieldset aria-describedby="section-description">
<legend class="crayons-field__label mb-2">Who can view content in this community?</legend>
<div class="flex gap-3">
<div>
<%= f.radio_button :public, true, class: "crayons-radio", role: "radio" %>
<%= label_tag "creator_settings_form_public_true", "Everyone" %>
</div>
<div>
<%= f.radio_button :public, false, class: "crayons-radio", role: "radio" %>
<%= label_tag "creator_settings_form_public_false", "Members Only" %>
</div>
</div>
</fieldset>
</div>
<div class="crayons-field mt-6 align-left">
<fieldset aria-describedby="section-description">
<legend class="crayons-field__label">Finally, please agree to the following:</legend>
<div>
<p class="crayons-field__description">You will have the opportunity to establish the Code of Conduct and Terms and Conditions for the users of your Forem during the setup process.</p>
<div class="mb-2">
<%= f.check_box :checked_code_of_conduct, class: "crayons-checkbox", required: true %>
<label for="checked_code_of_conduct">I agree to uphold our <a href="/code-of-conduct" target="code-of-conduct">Code of Conduct</a>.</label>
</div>
<div>
<%= f.check_box :checked_terms_and_conditions, class: "crayons-checkbox", required: true %>
<label for="checked_terms_and_conditions">I agree to our <a href="/terms" target="terms-and-conditions">Terms and Conditions</a>.</label>
</div>
</div>
</fieldset>
</div>