Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2842,10 +2842,9 @@ settings.repoadminchangeteam = Repository admin can add and remove access for te
settings.visibility = Visibility
settings.change_visibility = Change Visibility
settings.invalid_visibility = The new visibility is not valid.
settings.change_visibility_notices_1 = This operation <strong>CANNOT</strong> be undone.
settings.change_visibility_notices_1 = If the organization is converted to private, the repository stars will be removed and cannot be restored.
settings.change_visibility_notices_2 = Non-members will lose access to the organization’s repositories if visibility is changed to private.
settings.change_visibility_no_change = You did not make any changes to visibility.
settings.change_visibility_failed = Failed to change the visibility of %s due to an internal error.
settings.change_visibility_success = The visibility of organization %s has been successfully changed.
settings.visibility_desc = Change who can view the organization and its repositories.
settings.visibility.public = Public
Expand Down
4 changes: 3 additions & 1 deletion routers/web/org/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ func SettingsChangeVisibilityPost(ctx *context.Context) {

if err := org_service.ChangeOrganizationVisibility(ctx, ctx.Org.Organization, visibility); err != nil {
log.Error("ChangeOrganizationVisibility: %v", err)
ctx.JSONError(util.Iif(ctx.Doer.IsAdmin, err.Error(), string(ctx.Tr("org.settings.change_visibility_failed", ctx.Org.Organization.Name))))
ctx.JSON(http.StatusInternalServerError, map[string]any{
"err": http.StatusText(http.StatusInternalServerError),
})
return
}

Expand Down
2 changes: 1 addition & 1 deletion templates/org/settings/options_dangerzone.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

<div class="actions">
<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
<button id="change-visibility-submit" class="ui red button" disabled>{{ctx.Locale.Tr "org.settings.change_visibility"}}</button>
<button class="ui red button">{{ctx.Locale.Tr "org.settings.change_visibility"}}</button>
</div>
</form>
</div>
Expand Down
25 changes: 0 additions & 25 deletions web_src/js/features/org-settings.ts

This file was deleted.

2 changes: 0 additions & 2 deletions web_src/js/index-domready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {initRepoActivityTopAuthorsChart, initRepoArchiveLinks} from './features/
import {initRepoMigrationStatusChecker} from './features/repo-migrate.ts';
import {initRepoDiffView} from './features/repo-diff.ts';
import {initOrgTeam} from './features/org-team.ts';
import {initOrgSettings} from './features/org-settings.ts';
import {initUserAuthWebAuthn, initUserAuthWebAuthnRegister} from './features/user-auth-webauthn.ts';
import {initRepoRelease, initRepoReleaseNew} from './features/repo-release.ts';
import {initRepoEditor} from './features/repo-editor.ts';
Expand Down Expand Up @@ -121,7 +120,6 @@ const initPerformanceTracer = callInitFunctions([
initNotificationsTable,

initOrgTeam,
initOrgSettings,

initRepoActivityTopAuthorsChart,
initRepoArchiveLinks,
Expand Down