mark required fields as required
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| <div class="h-full flex flex-col justify-start items-stretch space-y-4"> | ||||
| <div class="flex flex-col justify-start items-stretch space-y-4 h-full"> | ||||
|   <.form | ||||
|     :let={f} | ||||
|     for={@changeset} | ||||
| @@ -14,7 +14,8 @@ | ||||
|       class: "input input-primary", | ||||
|       phx_debounce: 300, | ||||
|       phx_hook: "SanitizeTitles", | ||||
|       placeholder: gettext("slug") | ||||
|       placeholder: gettext("slug"), | ||||
|       required: true | ||||
|     ) %> | ||||
|     <%= error_tag(f, :slug) %> | ||||
|  | ||||
|   | ||||
| @@ -1,12 +1,12 @@ | ||||
| <div> | ||||
|   <h2 class="mb-8 text-center title text-xl text-primary-400"> | ||||
|   <h2 class="mb-8 text-xl text-center title text-primary-400"> | ||||
|     <%= @title %> | ||||
|   </h2> | ||||
|   <.form | ||||
|     :let={f} | ||||
|     for={@changeset} | ||||
|     id="invite-form" | ||||
|     class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" | ||||
|     class="flex flex-col justify-center items-center space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4" | ||||
|     phx-target={@myself} | ||||
|     phx-change="validate" | ||||
|     phx-submit="save" | ||||
| @@ -14,7 +14,7 @@ | ||||
|   > | ||||
|     <div | ||||
|       :if={@changeset.action && not @changeset.valid?} | ||||
|       class="invalid-feedback col-span-3 text-center" | ||||
|       class="col-span-3 text-center invalid-feedback" | ||||
|     > | ||||
|       <%= changeset_errors(@changeset) %> | ||||
|     </div> | ||||
| @@ -25,7 +25,8 @@ | ||||
|     ) %> | ||||
|     <%= text_input(f, :name, | ||||
|       class: "input input-primary col-span-2", | ||||
|       phx_debounce: 300 | ||||
|       phx_debounce: 300, | ||||
|       required: true | ||||
|     ) %> | ||||
|     <%= error_tag(f, :name, "col-span-3") %> | ||||
|  | ||||
| @@ -40,7 +41,7 @@ | ||||
|     ) %> | ||||
|     <%= error_tag(f, :uses_left, "col-span-3") %> | ||||
|  | ||||
|     <span class="col-span-3 text-primary-500 italic text-center"> | ||||
|     <span class="col-span-3 italic text-center text-primary-500"> | ||||
|       <%= gettext(~s/leave "uses left" blank to make invite unlimited/) %> | ||||
|     </span> | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <div class="h-full flex flex-col justify-start items-stretch space-y-4"> | ||||
| <div class="flex flex-col justify-start items-stretch space-y-4 h-full"> | ||||
|   <.form | ||||
|     :let={f} | ||||
|     for={@changeset} | ||||
| @@ -14,7 +14,8 @@ | ||||
|       class: "input input-primary", | ||||
|       phx_debounce: 300, | ||||
|       phx_hook: "SanitizeTitles", | ||||
|       placeholder: gettext("slug") | ||||
|       placeholder: gettext("slug"), | ||||
|       required: true | ||||
|     ) %> | ||||
|     <%= error_tag(f, :slug) %> | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <div class="h-full flex flex-col justify-start items-stretch space-y-4"> | ||||
| <div class="flex flex-col justify-start items-stretch space-y-4 h-full"> | ||||
|   <.form | ||||
|     :let={f} | ||||
|     for={@changeset} | ||||
| @@ -14,7 +14,8 @@ | ||||
|       class: "input input-primary", | ||||
|       phx_debounce: 300, | ||||
|       phx_hook: "SanitizeTitles", | ||||
|       placeholder: gettext("slug") | ||||
|       placeholder: gettext("slug"), | ||||
|       required: true | ||||
|     ) %> | ||||
|     <%= error_tag(f, :slug) %> | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <div class="h-full flex flex-col justify-start items-stretch space-y-4"> | ||||
| <div class="flex flex-col justify-start items-stretch space-y-4 h-full"> | ||||
|   <.form | ||||
|     :let={f} | ||||
|     for={@changeset} | ||||
| @@ -14,7 +14,8 @@ | ||||
|       class: "input input-primary", | ||||
|       phx_debounce: 300, | ||||
|       phx_hook: "SanitizeTitles", | ||||
|       placeholder: gettext("title") | ||||
|       placeholder: gettext("title"), | ||||
|       required: true | ||||
|     ) %> | ||||
|     <%= error_tag(f, :title) %> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user