Fairly new to Forgejo but I just ran into this when trying to create a couple repositories. I noticed that the input field for the repository name in several areas of the UI is prone to have annoying auto-capitalization, spellchecking and other browser features which try to correct the user input. I as a user would like to not have the browser interfere with my input especially in dialogs where I want to have something "custom". For fields where the repo name is used to validate an action (Danger Zone) this is even more frustrating. So, to me, this is a quality of live improvement fix. I checked the docs for these three attributes and none of them seem to have a negative side effect for the user: 1. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect 2. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize 3. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/spellcheck ## List of URLs where this applies: 1. `/repo/migrate` 2. `/repo/create` 3. `/<user>/<repo slug>/settings` 4. In general things in the "Danger zone" section where the repo name is used to validate the action 5. … Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12506 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Beowulf <beowulf@beocode.eu>
85 lines
3.2 KiB
Go HTML Template
85 lines
3.2 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
|
|
{{template "org/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<div class="ui stackable grid">
|
|
{{template "org/team/sidebar" .}}
|
|
<div class="ui ten wide column">
|
|
{{template "org/team/navbar" .}}
|
|
{{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
|
|
{{if $canAddRemove}}
|
|
<div class="ui attached segment tw-flex tw-flex-wrap tw-gap-2">
|
|
<form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post">
|
|
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
|
|
<div class="ui input">
|
|
<input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" required>
|
|
</div>
|
|
</div>
|
|
<button class="ui primary button tw-ml-2">{{ctx.Locale.Tr "add"}}</button>
|
|
</form>
|
|
<div class="tw-inline-block">
|
|
<button class="ui primary button show-modal" data-modal="#addall-repos-modal">{{ctx.Locale.Tr "add_all"}}</button>
|
|
<button class="ui red button show-modal" data-modal="#removeall-repos-modal">{{ctx.Locale.Tr "remove_all"}}</button>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
<div class="ui attached segment">
|
|
<div class="flex-list">
|
|
{{range .Team.Repos}}
|
|
<div class="flex-item tw-items-center">
|
|
<div class="flex-item-leading">
|
|
{{template "repo/icon" .}}
|
|
</div>
|
|
<div class="flex-item-main">
|
|
<a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
|
|
{{$.Org.Name}}/{{.Name}}
|
|
</a>
|
|
</div>
|
|
<div class="flex-item-trailing">
|
|
{{if $canAddRemove}}
|
|
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
|
|
<button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{ctx.Locale.Tr "remove"}}</button>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="flex-item">
|
|
<span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<dialog id="addall-repos-modal">
|
|
<article>
|
|
<header>{{ctx.Locale.Tr "teams.add_all_repos.modal.header"}}</header>
|
|
<div class="content">
|
|
<span>{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}</span>
|
|
</div>
|
|
<form class="ui form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall" method="post">
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
</article>
|
|
</dialog>
|
|
|
|
<dialog id="removeall-repos-modal">
|
|
<article>
|
|
<header>{{ctx.Locale.Tr "teams.remove_all_repos.modal.header"}}</header>
|
|
<div class="content">
|
|
<span>{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}</span>
|
|
</div>
|
|
<form class="ui form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall" method="post">
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
</article>
|
|
</dialog>
|
|
|
|
|
|
{{template "base/footer" .}}
|