* WIP: Add COC and TOS checkboxes to Creator Settings form * Adds assertions to the creatorSettings.spec.js E2E test * Removes comments and unnecessary code from Admin::CreatorSettingsController * Removes params from transaction * Updates creatorSettings.spec.js to fix checkbox-related failures * Adds a note to the COC and TOS checkboxes
99 lines
5 KiB
Text
99 lines
5 KiB
Text
<div class="crayons-field mt-6 align-left">
|
|
<%= label_tag :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 %>
|
|
<%= text_field_tag :community_name, "", placeholder: "Climbing Life", class: "crayons-textfield fs-italic", required: true %>
|
|
</div>
|
|
|
|
<div class="crayons-field mt-6 align-left">
|
|
<%= label_tag :logo_svg, class: "crayons-field__label" do %>
|
|
Logo
|
|
<span class="crayons-field__required crayons-tooltip" data-tooltip="This will set the logo for your Forem" aria-describedby="logo-subtitle"></span>
|
|
<p id="logo-subtitle" class="crayons-field__description">Ideally SVG, but PNG or JPEG will work, too.</p>
|
|
<% end %>
|
|
<div class="flex flex-1 gap-4">
|
|
<%= file_field_tag :logo_svg, required: true, accept: ".svg,.png,.jpg,image/svg+xml,image/png,image/jpg", data: { "max-file-size-mb": "25", action: "change->creator-settings#previewLogo" }, aria: { describedby: "logo-subtitle" } %>
|
|
<div data-creator-settings-target="previewLogo">
|
|
<% if ::Settings::General.logo_svg.present? %>
|
|
<%= ::Settings::General.logo_svg.html_safe %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="crayons-field mt-6 align-left">
|
|
<%= label_tag :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="flex w-100 m:w-50 crayons-field">
|
|
<div class="flex">
|
|
<%= text_field_tag :primary_brand_color_hex,
|
|
::Settings::UserExperience.primary_brand_color_hex,
|
|
pattern: "^#+([a-fA-F0-9]{6})$",
|
|
placeholder: ::Settings::UserExperience.primary_brand_color_hex,
|
|
class: "crayons-textfield js-color-field" %>
|
|
<%= color_field_tag :primary_brand_color_hex,
|
|
::Settings::UserExperience.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 %>
|
|
</div>
|
|
</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>
|
|
<div class="mb-2">
|
|
<%= radio_button_tag :invite_only_mode, "0", class: "crayons-field crayons-field--radio", required: true %>
|
|
<label for="invite_only_mode_0">Everyone</label>
|
|
</div>
|
|
<div>
|
|
<%= radio_button_tag :invite_only_mode, "1", class: "crayons-field crayons-field--radio", required: true %>
|
|
<label for="invite_only_mode_1">Only people who are invited</label>
|
|
</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>
|
|
<div class="mb-2">
|
|
<%= radio_button_tag :public, "0", class: "crayons-field crayons-field--radio", required: true %>
|
|
<label for="public_0">Everyone</label>
|
|
</div>
|
|
<div>
|
|
<%= radio_button_tag :public, "1", class: "crayons-field crayons-field--radio", required: true %>
|
|
<label for="public_1">Members only</label>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="crayons-field mt-6 align-left">
|
|
<fieldset aria-describedby="section-description">
|
|
<legend class="crayons-field__label mb-2">Finally, please agree to the following:</legend>
|
|
<div>
|
|
<div class="mb-2">
|
|
<%= hidden_field_tag :checked_code_of_conduct, "0" %>
|
|
<%= check_box_tag :checked_code_of_conduct, "1", false, class: "crayons-checkbox", required: true %>
|
|
<label for="checked_code_of_conduct">I agree to uphold our <a href="/code-of-conduct">Code of Conduct</a>.</label>
|
|
</div>
|
|
<div>
|
|
<%= hidden_field_tag :checked_terms_and_conditions, "0" %>
|
|
<%= check_box_tag :checked_terms_and_conditions, "1", false, class: "crayons-checkbox", required: true %>
|
|
<label for="checked_terms_and_conditions">I agree to our <a href="/terms-and-conditions">Terms and Conditions</a>.</label>
|
|
</div>
|
|
</div>
|
|
<p class="crayons-field__description fs-italic p-2">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>
|
|
</fieldset>
|
|
</div>
|