feat(custom-field): let admins set join_description with a link-syntax hint

This commit is contained in:
Simon 2026-06-03 12:28:23 +02:00
parent df271055a8
commit 404d524ee1
5 changed files with 171 additions and 0 deletions

View file

@ -91,6 +91,45 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
<% end %>
<.input field={@form[:description]} type="text" label={gettext("Description")} />
<fieldset class="mb-2 fieldset">
<label>
<span class="mb-1 label flex items-center gap-2">
{gettext("Description for join form")}
<.tooltip
content={
gettext(
"You can add links: full addresses (https://…) or as [link text](https://…)."
)
}
position="right"
>
<span
data-testid="join-description-link-hint"
aria-label={
gettext(
"You can add links: full addresses (https://…) or as [link text](https://…)."
)
}
>
<.icon
name="hero-information-circle"
class="w-4 h-4 text-base-content/60 cursor-help"
aria-hidden="true"
/>
</span>
</.tooltip>
</span>
<input
type="text"
name={@form[:join_description].name}
id={@form[:join_description].id}
value={Phoenix.HTML.Form.normalize_value("text", @form[:join_description].value)}
class="w-full input"
/>
</label>
</fieldset>
<.input field={@form[:required]} type="checkbox" label={gettext("Required")} />
<.input
field={@form[:show_in_overview]}