Reference labels by IDs instead of names in keys settings (#29194)

Here's the spec for the `for` attribute:
https://html.spec.whatwg.org/multipage/forms.html#attr-label-for

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 7132a0ba75d6fe734d9f950f217a5ceb81375328)
This commit is contained in:
Yarden Shoham 2024-02-16 15:59:48 +02:00 committed by Earl Warren
parent 2c336646f1
commit 2e887067df
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 7 additions and 7 deletions

View file

@ -18,11 +18,11 @@
{{ctx.Locale.Tr "repo.settings.deploy_key_desc"}}
</div>
<div class="field {{if .Err_Title}}error{{end}}">
<label for="title">{{ctx.Locale.Tr "repo.settings.title"}}</label>
<label for="ssh-key-title">{{ctx.Locale.Tr "repo.settings.title"}}</label>
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
</div>
<div class="field {{if .Err_Content}}error{{end}}">
<label for="content">{{ctx.Locale.Tr "repo.settings.deploy_key_content"}}</label>
<label for="ssh-key-content">{{ctx.Locale.Tr "repo.settings.deploy_key_content"}}</label>
<textarea id="ssh-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
</div>
<div class="field">