44 lines
2 KiB
Text
44 lines
2 KiB
Text
<%= form_for(Settings::General.new,
|
|
url: admin_settings_general_settings_path,
|
|
html: { data: {
|
|
action: "submit->config#updateConfigurationSettings",
|
|
testid: "mascotSectionForm"
|
|
} }) do |f| %>
|
|
<div class="card mt-3">
|
|
<%= render partial: "admin/shared/card_header",
|
|
locals: {
|
|
header: "Mascot",
|
|
state: "collapse",
|
|
target: "mascotBodyContainer",
|
|
expanded: false
|
|
} %>
|
|
<div id="mascotBodyContainer" class="card-body collapse hide" aria-labelledby="mascotBodyContainer">
|
|
<fieldset class="grid gap-4">
|
|
<div class="crayons-field">
|
|
<%= 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] %>
|
|
</div>
|
|
|
|
<div class="crayons-field">
|
|
<%= 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] %>
|
|
|
|
<div class="col-12">
|
|
<img alt="Mascot image" class="img-fluid" src="<%= Settings::General.mascot_image_url %>" loading="lazy" />
|
|
</div>
|
|
|
|
</div>
|
|
</fieldset>
|
|
<%= render "update_setting_button", f: f %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|