@@ -18,7 +18,7 @@ defmodule NervesHubWeb.CoreComponents do
1818
1919 import NervesHubWeb.Components.Icons
2020
21- alias Phoenix.HTML.Form , as: HTMLForm
21+ alias Phoenix.HTML
2222
2323 alias Phoenix.LiveView.JS
2424
@@ -332,7 +332,7 @@ defmodule NervesHubWeb.CoreComponents do
332332 range radio search select tel text textarea time url week)
333333 )
334334
335- attr ( :field , Phoenix. HTML.FormField, doc: "a form field struct retrieved from the form, for example: @form[:email]" )
335+ attr ( :field , HTML.FormField , doc: "a form field struct retrieved from the form, for example: @form[:email]" )
336336
337337 attr ( :errors , :list , default: [ ] )
338338 attr ( :checked , :boolean , doc: "the checked flag for checkbox inputs" )
@@ -348,7 +348,7 @@ defmodule NervesHubWeb.CoreComponents do
348348 slot ( :inner_block )
349349 slot ( :rich_hint )
350350
351- def input ( % { field: % Phoenix. HTML.FormField{ } = field } = assigns ) do
351+ def input ( % { field: % HTML.FormField { } = field } = assigns ) do
352352 assigns
353353 |> assign ( field: nil , id: assigns . id || field . id )
354354 |> assign ( :errors , Enum . map ( field . errors , & translate_error / 1 ) )
@@ -360,7 +360,7 @@ defmodule NervesHubWeb.CoreComponents do
360360 def input ( % { type: "checkbox" } = assigns ) do
361361 assigns =
362362 assign_new ( assigns , :checked , fn ->
363- HTMLForm . normalize_value ( "checkbox" , assigns [ :value ] )
363+ HTML.Form . normalize_value ( "checkbox" , assigns [ :value ] )
364364 end )
365365
366366 ~H"""
@@ -390,7 +390,7 @@ defmodule NervesHubWeb.CoreComponents do
390390 { @ rest }
391391 >
392392 < option :if = { @ prompt } value = "" > { @ prompt } </ option >
393- { HTMLForm . options_for_select ( @ options , @ value ) }
393+ { HTML.Form . options_for_select ( @ options , @ value ) }
394394 </ select >
395395 < div :if = { assigns [ :hint ] || assigns [ :rich_hint ] } class = "text-xs text-zinc-400 " >
396396 { assigns [ :hint ] || render_slot ( assigns [ :rich_hint ] ) }
@@ -414,7 +414,7 @@ defmodule NervesHubWeb.CoreComponents do
414414 @ errors != [ ] && "border-red-500 focus:border-red-500"
415415 ] }
416416 { @ rest }
417- > <%= HTMLForm . normalize_value ( "textarea" , @ value ) %> </ textarea >
417+ > <%= HTML.Form . normalize_value ( "textarea" , @ value ) %> </ textarea >
418418 < div :if = { assigns [ :hint ] || assigns [ :rich_hint ] } class = "flex flex-col gap-1 text-xs text-zinc-400 pt-1 " >
419419 { assigns [ :hint ] || render_slot ( assigns [ :rich_hint ] ) }
420420 </ div >
@@ -433,7 +433,7 @@ defmodule NervesHubWeb.CoreComponents do
433433 type = { @ type }
434434 name = { @ name }
435435 id = { @ id }
436- value = { HTMLForm . normalize_value ( @ type , @ value ) }
436+ value = { HTML.Form . normalize_value ( @ type , @ value ) }
437437 class = { [
438438 "mt-2 py-1.5 px-2 block w-full rounded text-zinc-400 bg-zinc-900 focus:ring-0 sm:text-sm" ,
439439 "phx-no-feedback:border-zinc-600 phx-no-feedback:focus:border-zinc-700" ,
@@ -462,7 +462,7 @@ defmodule NervesHubWeb.CoreComponents do
462462 type = { @ type }
463463 name = { @ name }
464464 id = { @ id }
465- value = { HTMLForm . normalize_value ( @ type , @ value ) }
465+ value = { HTML.Form . normalize_value ( @ type , @ value ) }
466466 class = { [
467467 "mt-2 py-1.5 px-2 block w-full rounded text-zinc-400 bg-zinc-900 focus:ring-0 sm:text-sm" ,
468468 "phx-no-feedback:border-zinc-600 phx-no-feedback:focus:border-zinc-700" ,
0 commit comments