Skip to content

Commit 6cabf9f

Browse files
committed
Add for to input_label to most fields
1 parent d257ac0 commit 6cabf9f

File tree

13 files changed

+13
-13
lines changed

13 files changed

+13
-13
lines changed

lib/backpex/fields/belongs_to.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ defmodule Backpex.Fields.BelongsTo do
136136
<div>
137137
<Layout.field_container>
138138
<:label align={Backpex.Field.align_label(@field_options, assigns)}>
139-
<Layout.input_label text={@field_options[:label]} />
139+
<Layout.input_label for={@form[@owner_key]} text={@field_options[:label]} />
140140
</:label>
141141
<BackpexForm.input
142142
type="select"

lib/backpex/fields/boolean.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defmodule Backpex.Fields.Boolean do
3737
<div>
3838
<Layout.field_container>
3939
<:label align={Backpex.Field.align_label(@field_options, assigns, :top)}>
40-
<Layout.input_label text={@field_options[:label]} />
40+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
4141
</:label>
4242
<BackpexForm.input
4343
type="toggle"

lib/backpex/fields/currency.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule Backpex.Fields.Currency do
7070
<div>
7171
<Layout.field_container>
7272
<:label align={Backpex.Field.align_label(@field_options, assigns)}>
73-
<Layout.input_label text={@field_options[:label]} />
73+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
7474
</:label>
7575
<BackpexForm.input
7676
type="number"

lib/backpex/fields/date.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ defmodule Backpex.Fields.Date do
103103
<div>
104104
<Layout.field_container>
105105
<:label align={Backpex.Field.align_label(@field_options, assigns, :top)}>
106-
<Layout.input_label text={@field_options[:label]} />
106+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
107107
</:label>
108108
<BackpexForm.input
109109
type="date"

lib/backpex/fields/date_time.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ defmodule Backpex.Fields.DateTime do
103103
<div>
104104
<Layout.field_container>
105105
<:label align={Backpex.Field.align_label(@field_options, assigns, :top)}>
106-
<Layout.input_label text={@field_options[:label]} />
106+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
107107
</:label>
108108
<BackpexForm.input
109109
type="datetime-local"

lib/backpex/fields/email.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defmodule Backpex.Fields.Email do
4444
<div>
4545
<Layout.field_container>
4646
<:label align={Backpex.Field.align_label(@field_options, assigns, :center)}>
47-
<Layout.input_label text={@field_options[:label]} />
47+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
4848
</:label>
4949
<BackpexForm.input
5050
type="email"

lib/backpex/fields/number.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ defmodule Backpex.Fields.Number do
4545
<div>
4646
<Layout.field_container>
4747
<:label align={Backpex.Field.align_label(@field_options, assigns)}>
48-
<Layout.input_label text={@field_options[:label]} />
48+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
4949
</:label>
5050
<BackpexForm.input
5151
type="number"

lib/backpex/fields/select.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule Backpex.Fields.Select do
7070
<div>
7171
<Layout.field_container>
7272
<:label align={Backpex.Field.align_label(@field_options, assigns)}>
73-
<Layout.input_label text={@field_options[:label]} />
73+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
7474
</:label>
7575
<BackpexForm.input
7676
type="select"

lib/backpex/fields/text.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defmodule Backpex.Fields.Text do
4444
<div>
4545
<Layout.field_container>
4646
<:label align={Backpex.Field.align_label(@field_options, assigns, :center)}>
47-
<Layout.input_label text={@field_options[:label]} />
47+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
4848
</:label>
4949
<BackpexForm.input
5050
type="text"

lib/backpex/fields/textarea.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule Backpex.Fields.Textarea do
5353
<div>
5454
<Layout.field_container>
5555
<:label align={Backpex.Field.align_label(@field_options, assigns, :top)}>
56-
<Layout.input_label text={@field_options[:label]} />
56+
<Layout.input_label for={@form[@name]} text={@field_options[:label]} />
5757
</:label>
5858
<BackpexForm.input
5959
type="textarea"

0 commit comments

Comments
 (0)