aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2024-02-16 15:59:48 +0200
committerGitHub <noreply@github.com>2024-02-16 13:59:48 +0000
commit7132a0ba75d6fe734d9f950f217a5ceb81375328 (patch)
treef680689fa3f3d23987c4574852caebe3b3b20264 /templates/user
parent236e12184404998c8edf7efa6de7fccf9d0ee814 (diff)
downloadgitea-7132a0ba75d6fe734d9f950f217a5ceb81375328.tar.gz
gitea-7132a0ba75d6fe734d9f950f217a5ceb81375328.zip
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>
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/settings/keys_gpg.tmpl4
-rw-r--r--templates/user/settings/keys_principal.tmpl2
-rw-r--r--templates/user/settings/keys_ssh.tmpl4
3 files changed, 5 insertions, 5 deletions
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl
index 481d7482b4..c562aaeab0 100644
--- a/templates/user/settings/keys_gpg.tmpl
+++ b/templates/user/settings/keys_gpg.tmpl
@@ -10,7 +10,7 @@
{{.CsrfTokenHtml}}
<input type="hidden" name="title" value="none">
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{ctx.Locale.Tr "settings.key_content"}}</label>
+ <label for="gpg-key-content">{{ctx.Locale.Tr "settings.key_content"}}</label>
<textarea id="gpg-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
</div>
{{if .Err_Signature}}
@@ -26,7 +26,7 @@
</div>
</div>
<div class="field">
- <label for="signature">{{ctx.Locale.Tr "settings.gpg_token_signature"}}</label>
+ <label for="gpg-key-signature">{{ctx.Locale.Tr "settings.gpg_token_signature"}}</label>
<textarea id="gpg-key-signature" name="signature" placeholder="{{ctx.Locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
</div>
{{end}}
diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl
index 513afc2b61..a7ab12dd78 100644
--- a/templates/user/settings/keys_principal.tmpl
+++ b/templates/user/settings/keys_principal.tmpl
@@ -44,7 +44,7 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{ctx.Locale.Tr "settings.principal_content"}}</label>
+ <label for="ssh-principal-content">{{ctx.Locale.Tr "settings.principal_content"}}</label>
<input id="ssh-principal-content" name="content" value="{{.content}}" autofocus required>
</div>
<input name="title" type="hidden" value="principal">
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl
index fc8b70ea28..91e8ccfcfa 100644
--- a/templates/user/settings/keys_ssh.tmpl
+++ b/templates/user/settings/keys_ssh.tmpl
@@ -11,11 +11,11 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_Title}}error{{end}}">
- <label for="title">{{ctx.Locale.Tr "settings.key_name"}}</label>
+ <label for="ssh-key-title">{{ctx.Locale.Tr "settings.key_name"}}</label>
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required maxlength="50">
</div>
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{ctx.Locale.Tr "settings.key_content"}}</label>
+ <label for="ssh-key-content">{{ctx.Locale.Tr "settings.key_content"}}</label>
<textarea id="ssh-key-content" name="content" class="js-quick-submit" placeholder="{{ctx.Locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
</div>
<input name="type" type="hidden" value="ssh">