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>
This commit is contained in:
parent
236e121844
commit
7132a0ba75
@ -18,11 +18,11 @@
|
|||||||
{{ctx.Locale.Tr "repo.settings.deploy_key_desc"}}
|
{{ctx.Locale.Tr "repo.settings.deploy_key_desc"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="field {{if .Err_Title}}error{{end}}">
|
<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>
|
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
<div class="field {{if .Err_Content}}error{{end}}">
|
<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>
|
<textarea id="ssh-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input type="hidden" name="title" value="none">
|
<input type="hidden" name="title" value="none">
|
||||||
<div class="field {{if .Err_Content}}error{{end}}">
|
<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>
|
<textarea id="gpg-key-content" name="content" placeholder="{{ctx.Locale.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
{{if .Err_Signature}}
|
{{if .Err_Signature}}
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<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>
|
<textarea id="gpg-key-signature" name="signature" placeholder="{{ctx.Locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="field {{if .Err_Content}}error{{end}}">
|
<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>
|
<input id="ssh-principal-content" name="content" value="{{.content}}" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
<input name="title" type="hidden" value="principal">
|
<input name="title" type="hidden" value="principal">
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="field {{if .Err_Title}}error{{end}}">
|
<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">
|
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required maxlength="50">
|
||||||
</div>
|
</div>
|
||||||
<div class="field {{if .Err_Content}}error{{end}}">
|
<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>
|
<textarea id="ssh-key-content" name="content" class="js-quick-submit" placeholder="{{ctx.Locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<input name="type" type="hidden" value="ssh">
|
<input name="type" type="hidden" value="ssh">
|
||||||
|
Loading…
Reference in New Issue
Block a user