1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +00:00

ui(admin): improve names of user settings and add descriptions

Changes
* checkbox titles are no longer strong.
* added descriptions to all options. Mostly from memory, but there are a few sources:
   - https://docs.gitea.com/help/faq#active-user-vs-login-prohibited-user
   - https://docs.gitea.com/help/faq#restricted-users
* for git hooks, I just moved tooltip into description.
* renamed titles. The only important one is: "Disable sign-in" -> "Suspended account" as it has a change of terminology. We don't seem to have anything about this option in our docs though. This is what the option really does. In fact, it does not invalidate current sessions of the user, but shows them the same "Sign-in prohibited" screen for all actions.

Preview: https://codeberg.org/attachments/e5649045-dfe8-4327-869f-cb2530ca6b17
(the text of the last one is slightly outdated after review)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4499
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
0ko 2024-07-15 03:57:56 +00:00
parent 717495a980
commit af4b32aece
2 changed files with 25 additions and 12 deletions

View file

@ -110,46 +110,53 @@
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.is_activated"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.is_activated"}}</label>
<input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.activated.description"}}</span>
</div>
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.prohibit_login"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.prohibit_login"}}</label>
<input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.block.description"}}</span>
</div>
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.is_admin"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.is_admin"}}</label>
<input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.admin.description"}}</span>
</div>
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.is_restricted"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.is_restricted"}}</label>
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.restricted.description"}}</span>
</div>
<div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}">
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
<div class="ui checkbox">
<label>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</label>
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}</span>
</div>
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</label>
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.local_import.description"}}</span>
</div>
{{if not .DisableRegularOrgCreation}}
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.allow_create_organization"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.allow_create_organization"}}</label>
<input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.organization_creation.description"}}</span>
</div>
{{end}}