mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-07-25 02:48:05 +00:00
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>
100 lines
3.8 KiB
Go HTML Template
100 lines
3.8 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
<div class="ui grid">
|
|
<div class="sixteen wide column content">
|
|
{{template "base/alert" .}}
|
|
<div class="home">
|
|
<div class="ui stackable middle very relaxed page grid">
|
|
<div id="repo_migrating" class="sixteen wide center aligned centered column" data-migrating-task-id="{{.MigrateTask.ID}}">
|
|
<div>
|
|
<img src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" alt="{{ctx.Locale.Tr "loading"}}" width="256" height="256">
|
|
</div>
|
|
</div>
|
|
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column tw-hidden">
|
|
<div>
|
|
<span class="red">{{svg "octicon-git-pull-request-closed" 256 "ui red icon"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui stackable middle very relaxed page grid">
|
|
<div class="sixteen wide center aligned centered column">
|
|
<div id="repo_migrating_progress">
|
|
<p>{{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr}}</p>
|
|
<p id="repo_migrating_progress_message"></p>
|
|
</div>
|
|
<div id="repo_migrating_failed" class="tw-hidden">
|
|
{{if .CloneAddr}}
|
|
<p>{{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr}}</p>
|
|
{{else}}
|
|
<p>{{ctx.Locale.Tr "repo.migrate.migrating_failed_no_addr"}}</p>
|
|
{{end}}
|
|
<p id="repo_migrating_failed_error"></p>
|
|
</div>
|
|
{{if .Permission.IsAdmin}}
|
|
<div class="divider"></div>
|
|
<div class="item">
|
|
{{if .Failed}}
|
|
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{ctx.Locale.Tr "repo.settings.delete"}}</button>
|
|
{{else}}
|
|
<button class="ui basic show-modal button" data-modal="#cancel-repo-modal">{{ctx.Locale.Tr "cancel"}}</button>
|
|
{{end}}
|
|
<button id="repo_migrating_retry" data-migrating-task-retry-url="{{.Link}}/settings/migrate/retry" class="ui basic button tw-hidden">{{ctx.Locale.Tr "retry"}}</button>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<dialog id="delete-repo-modal">
|
|
<article>
|
|
<header>{{ctx.Locale.Tr "repo.settings.delete"}}</header>
|
|
<div class="content">
|
|
<div class="ui warning message">
|
|
{{ctx.Locale.Tr "repo.settings.delete_notices_1"}}<br>
|
|
{{ctx.Locale.Tr "repo.settings.delete_notices_2" .Repository.FullName}}
|
|
{{if .Repository.NumForks}}<br>
|
|
{{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<form class="ui form" action="{{.Link}}/settings" method="post">
|
|
<div class="content">
|
|
<input type="hidden" name="action" value="delete">
|
|
<div class="field">
|
|
<label>
|
|
{{ctx.Locale.Tr "repo.settings.enter_repo_name"}}
|
|
<span class="text red">{{.Repository.FullName}}</span>
|
|
</label>
|
|
</div>
|
|
<div class="required field">
|
|
<label for="repo_name_to_delete">{{ctx.Locale.Tr "repo.settings.confirmation_string"}}</label>
|
|
<input id="repo_name_to_delete" name="repo_name" autocorrect="off" autocapitalize="none" spellcheck="false" required>
|
|
</div>
|
|
</div>
|
|
<div class="actions">
|
|
<button type="button" class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
|
|
<button type="submit" class="ui red button">{{ctx.Locale.Tr "repo.settings.confirm_delete"}}</button>
|
|
</div>
|
|
</form>
|
|
</article>
|
|
</dialog>
|
|
|
|
<dialog id="cancel-repo-modal">
|
|
<article>
|
|
<header>{{ctx.Locale.Tr "migrate.cancel.title"}}</header>
|
|
<form action="{{.Link}}/settings/migrate/cancel" method="post">
|
|
<div class="content">
|
|
{{ctx.Locale.Tr "migrate.cancel.confirmation"}}
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
</article>
|
|
</dialog>
|
|
|
|
{{template "base/footer" .}}
|