mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Disable form autofill (#17291)
]* fix aria-hidden and tabindex * use {{template "base/disable_form_autofill"}} instead of {{DisableFormAutofill}} Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="update">
|
||||
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
||||
@@ -104,6 +105,7 @@
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<form class="ui form" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="mirror">
|
||||
<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
|
||||
@@ -132,7 +134,6 @@
|
||||
<label for="mirror_username">{{.i18n.Tr "username"}}</label>
|
||||
<input id="mirror_username" name="mirror_username" value="{{$address.Username}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<label for="mirror_password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="mirror_password" name="mirror_password" type="password" placeholder="{{if $address.Password}}{{.i18n.Tr "repo.mirror_password_placeholder"}}{{else}}{{.i18n.Tr "repo.mirror_password_blank_placeholder"}}{{end}}" value="" {{if not .mirror_password}}data-need-clear="true"{{end}} autocomplete="off">
|
||||
@@ -195,11 +196,12 @@
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<form class="ui form" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="push-mirror-add">
|
||||
<div class="field {{if .Err_PushMirrorAddress}}error{{end}}">
|
||||
<label for="push_mirror_address">{{.i18n.Tr "repo.settings.mirror_settings.push_mirror.remote_url"}}</label>
|
||||
<input id="push_mirror_address" name="push_mirror_address" value="{{.push_mirror_address}}" autocomplete="off" required>
|
||||
<input id="push_mirror_address" name="push_mirror_address" value="{{.push_mirror_address}}" required>
|
||||
<p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p>
|
||||
</div>
|
||||
<details class="ui optional field" {{if or .Err_PushMirrorAuth .push_mirror_username}}open{{end}}>
|
||||
@@ -211,7 +213,6 @@
|
||||
<label for="push_mirror_username">{{.i18n.Tr "username"}}</label>
|
||||
<input id="push_mirror_username" name="push_mirror_username" value="{{.push_mirror_username}}">
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="inline field {{if .Err_PushMirrorAuth}}error{{end}}">
|
||||
<label for="push_mirror_password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="push_mirror_password" name="push_mirror_password" type="password" value="{{.push_mirror_password}}" autocomplete="off">
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{{if eq .HookType "gitea"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/gitea/{{or .Webhook.ID "new"}}" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
@@ -30,7 +31,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="field {{if .Err_Secret}}error{{end}}">
|
||||
<label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
|
||||
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{{if eq .HookType "gogs"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/gogs/{{or .Webhook.ID "new"}}" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
@@ -18,7 +19,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="field {{if .Err_Secret}}error{{end}}">
|
||||
<label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
|
||||
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
|
||||
|
Reference in New Issue
Block a user