feat: hide slug from user
This commit is contained in:
parent
edf8b2b79e
commit
c246ca59db
3 changed files with 6 additions and 20 deletions
|
|
@ -19,9 +19,6 @@ defmodule MvWeb.CustomFieldLive.Form do
|
|||
- immutable - If true, values cannot be changed after creation (default: false)
|
||||
- required - If true, all members must have this custom field (default: false)
|
||||
|
||||
**Read-only (Edit mode only):**
|
||||
- slug - Auto-generated URL-friendly identifier (immutable)
|
||||
|
||||
## Value Type Selection
|
||||
- `:string` - Text data (unlimited length)
|
||||
- `:integer` - Numeric data
|
||||
|
|
@ -52,19 +49,6 @@ defmodule MvWeb.CustomFieldLive.Form do
|
|||
<.form for={@form} id="custom_field-form" phx-change="validate" phx-submit="save">
|
||||
<.input field={@form[:name]} type="text" label={gettext("Name")} />
|
||||
|
||||
<%!-- Show slug in edit mode (read-only) --%>
|
||||
<div :if={@custom_field} class="mb-4">
|
||||
<label class="block text-sm font-semibold leading-6 text-zinc-800">
|
||||
{gettext("Slug")}
|
||||
</label>
|
||||
<div class="mt-2 p-3 bg-zinc-50 border border-zinc-300 rounded-lg text-sm text-zinc-700">
|
||||
{@custom_field.slug}
|
||||
</div>
|
||||
<p class="mt-2 text-sm leading-6 text-zinc-600">
|
||||
{gettext("Auto-generated identifier (immutable)")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<.input
|
||||
field={@form[:value_type]}
|
||||
type="select"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue