Skip to content

Commit 19d924a

Browse files
committed
change field name
1 parent c31988e commit 19d924a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

routers/web/repo/setting/setting.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ func SettingsPost(ctx *context.Context) {
488488
}
489489
}
490490

491-
if form.ChangeDefaultUncycloBranch != "" {
492-
if err := wiki_service.ChangeDefaultUncycloBranch(ctx, repo, form.ChangeDefaultUncycloBranch); err != nil {
491+
if form.DefaultUncycloBranch != "" {
492+
if err := wiki_service.ChangeDefaultUncycloBranch(ctx, repo, form.DefaultUncycloBranch); err != nil {
493493
log.Error("ChangeDefaultUncycloBranch failed, err: %v", err)
494494
ctx.Flash.Warning(ctx.Tr("repo.settings.failed_to_change_default_wiki_branch"))
495495
}

services/forms/repo_form.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ type RepoSettingForm struct {
133133
EnableCode bool
134134
EnableUncyclo bool
135135
EnableExternalUncyclo bool
136-
ChangeDefaultUncycloBranch string
136+
DefaultUncycloBranch string
137137
ExternalUncycloURL string
138138
EnableIssues bool
139139
EnableExternalTracker bool

templates/repo/settings/options.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
</div>
338338
<div class="inline field gt-pl-4">
339339
<label>{{ctx.Locale.Tr "repo.settings.default_wiki_branch_name"}}</label>
340-
<input name="change_default_wiki_branch" value="{{.Repository.DefaultUncycloBranch}}">
340+
<input name="default_wiki_branch" value="{{.Repository.DefaultUncycloBranch}}">
341341
</div>
342342
<div class="field">
343343
<div class="ui radio checkbox{{if $isExternalUncycloGlobalDisabled}} disabled{{end}}"{{if $isExternalUncycloGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>

0 commit comments

Comments
 (0)