feat(ui/migrations): clarify desired autocompletion type for clone_addr (#7377)
* Firefox thinks that this is a login form and that `clone_addr` is it's username field * It would have been an easy fix with with `autocomplete="off"`, but there's an issue with that approach: Firefox plays a cat-mouse game with web developers and intentionally ignores `autocomplete="off"` "for users' security". * Set it to the `url` autocompletion type, Firefox and maybe other browsers give actually somewhat relevant completion entries. They will not be always relevant, but they may be when a migration has to be re-done with different settings. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7377 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
bb4e1f426f
commit
a23d0453a3
9 changed files with 13 additions and 11 deletions
|
@ -13,7 +13,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}
|
||||
</span>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="url">
|
||||
<span class="help">
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue