@@ -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
@@ -331,7 +331,7 @@ defmodule NervesHubWeb.CoreComponents do
331331 range radio search select tel text textarea time url week)
332332 )
333333
334- attr ( :field , Phoenix. HTML.FormField,
334+ attr ( :field , HTML.FormField ,
335335 doc: "a form field struct retrieved from the form, for example: @form[:email]"
336336 )
337337
@@ -351,7 +351,7 @@ defmodule NervesHubWeb.CoreComponents do
351351 slot ( :inner_block )
352352 slot ( :rich_hint )
353353
354- def input ( % { field: % Phoenix. HTML.FormField{ } = field } = assigns ) do
354+ def input ( % { field: % HTML.FormField { } = field } = assigns ) do
355355 assigns
356356 |> assign ( field: nil , id: assigns . id || field . id )
357357 |> assign ( :errors , Enum . map ( field . errors , & translate_error ( & 1 ) ) )
@@ -363,7 +363,7 @@ defmodule NervesHubWeb.CoreComponents do
363363 def input ( % { type: "checkbox" } = assigns ) do
364364 assigns =
365365 assign_new ( assigns , :checked , fn ->
366- HTMLForm . normalize_value ( "checkbox" , assigns [ :value ] )
366+ HTML.Form . normalize_value ( "checkbox" , assigns [ :value ] )
367367 end )
368368
369369 ~H"""
@@ -393,7 +393,7 @@ defmodule NervesHubWeb.CoreComponents do
393393 { @ rest }
394394 >
395395 < option :if = { @ prompt } value = "" > { @ prompt } </ option >
396- { HTMLForm . options_for_select ( @ options , @ value ) }
396+ { HTML.Form . options_for_select ( @ options , @ value ) }
397397 </ select >
398398 < div :if = { assigns [ :hint ] || assigns [ :rich_hint ] } class = "text-xs text-zinc-400 " >
399399 { assigns [ :hint ] || render_slot ( assigns [ :rich_hint ] ) }
@@ -417,7 +417,7 @@ defmodule NervesHubWeb.CoreComponents do
417417 @ errors != [ ] && "border-red-500 focus:border-red-500"
418418 ] }
419419 { @ rest }
420- > <%= HTMLForm . normalize_value ( "textarea" , @ value ) %> </ textarea >
420+ > <%= HTML.Form . normalize_value ( "textarea" , @ value ) %> </ textarea >
421421 < div :if = { assigns [ :hint ] || assigns [ :rich_hint ] } class = "flex flex-col gap-1 text-xs text-zinc-400 pt-1 " >
422422 { assigns [ :hint ] || render_slot ( assigns [ :rich_hint ] ) }
423423 </ div >
@@ -436,7 +436,7 @@ defmodule NervesHubWeb.CoreComponents do
436436 type = { @ type }
437437 name = { @ name }
438438 id = { @ id }
439- value = { HTMLForm . normalize_value ( @ type , @ value ) }
439+ value = { HTML.Form . normalize_value ( @ type , @ value ) }
440440 class = { [
441441 "mt-2 py-1.5 px-2 block w-full rounded text-zinc-400 bg-zinc-900 focus:ring-0 sm:text-sm" ,
442442 "phx-no-feedback:border-zinc-600 phx-no-feedback:focus:border-zinc-700" ,
@@ -465,7 +465,7 @@ defmodule NervesHubWeb.CoreComponents do
465465 type = { @ type }
466466 name = { @ name }
467467 id = { @ id }
468- value = { HTMLForm . normalize_value ( @ type , @ value ) }
468+ value = { HTML.Form . normalize_value ( @ type , @ value ) }
469469 class = { [
470470 "mt-2 py-1.5 px-2 block w-full rounded text-zinc-400 bg-zinc-900 focus:ring-0 sm:text-sm" ,
471471 "phx-no-feedback:border-zinc-600 phx-no-feedback:focus:border-zinc-700" ,
0 commit comments