docbrown/app/views/admin/creator_settings/_form.html.erb
Mac Siri afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00

85 lines
4.1 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, logo: Settings::General.resized_logo } %>
<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",
"aria-describedby": "color-contrast-error" %>
</div>
</div>
<div id="color-contrast-error" 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", "Invite 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 %>
<%= f.label :checked_code_of_conduct do %>
I agree to uphold our <a href="/code-of-conduct" target="code-of-conduct">Code of Conduct</a>.
<% end %>
</div>
<div>
<%= f.check_box :checked_terms_and_conditions, class: "crayons-checkbox", required: true %>
<%= f.label :checked_terms_and_conditions do %>
I agree to our <a href="/terms" target="terms-and-conditions">Terms and Conditions</a>.
<% end %>
</div>
</div>
</fieldset>
</div>
<%= javascript_include_tag "admin/creatorOnboarding", defer: true %>