Skip to content

Commit 22cf11e

Browse files
authored
settings/tokens/new: Fix broken <input> id (#6427)
1 parent 2ba098c commit 22cf11e

File tree

1 file changed

+15
-13
lines changed
  • app/templates/settings/tokens

1 file changed

+15
-13
lines changed

app/templates/settings/tokens/new.hbs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
<form local-class="form" {{on "submit" (prevent-default (perform this.saveTokenTask))}}>
44
<div local-class="form-group">
5-
<label for={{this.id}}>Name</label>
6-
<Input
7-
id={{this.id}}
8-
@type="text"
9-
@value={{this.name}}
10-
disabled={{this.saveTokenTask.isRunning}}
11-
aria-required="true"
12-
aria-invalid={{if this.nameInvalid "true" "false"}}
13-
local-class="name-input"
14-
data-test-name
15-
{{auto-focus}}
16-
{{on "input" this.resetNameValidation}}
17-
/>
5+
{{#let (unique-id) as |id|}}
6+
<label for={{id}}>Name</label>
7+
<Input
8+
id={{id}}
9+
@type="text"
10+
@value={{this.name}}
11+
disabled={{this.saveTokenTask.isRunning}}
12+
aria-required="true"
13+
aria-invalid={{if this.nameInvalid "true" "false"}}
14+
local-class="name-input"
15+
data-test-name
16+
{{auto-focus}}
17+
{{on "input" this.resetNameValidation}}
18+
/>
19+
{{/let}}
1820
</div>
1921

2022
<div local-class="buttons">

0 commit comments

Comments
 (0)