Skip to content

Commit abe9c64

Browse files
GiteaBotwxiaoguang
andauthored
Show correct SSL Mode on "install page" (#25818) (#25838)
Backport #25818 by @wxiaoguang Fix #25817 ![image](https://github.com/go-gitea/gitea/assets/2114189/49f7b85d-c229-41b5-86fd-58cd812eaca6) Co-authored-by: wxiaoguang <[email protected]>
1 parent 052e65e commit abe9c64

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

routers/install/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ func Install(ctx *context.Context) {
102102
form.DbName = setting.Database.Name
103103
form.DbPath = setting.Database.Path
104104
form.DbSchema = setting.Database.Schema
105+
form.SSLMode = setting.Database.SSLMode
105106

106107
curDBType := setting.Database.Type.String()
107108
var isCurDBTypeSupported bool

templates/install.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</div>
2929
</div>
3030

31-
<div class="gt-hidden" data-db-setting-for="common-host">
31+
<div class="gt-mt-4 gt-hidden" data-db-setting-for="common-host">
3232
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
3333
<label for="db_host">{{.locale.Tr "install.host"}}</label>
3434
<input id="db_host" name="db_host" value="{{.db_host}}">
@@ -47,7 +47,7 @@
4747
</div>
4848
</div>
4949

50-
<div class="gt-hidden" data-db-setting-for="postgres">
50+
<div class="gt-mt-4 gt-hidden" data-db-setting-for="postgres">
5151
<div class="inline required field">
5252
<label>{{.locale.Tr "install.ssl_mode"}}</label>
5353
<div class="ui selection database type dropdown">
@@ -68,7 +68,7 @@
6868
</div>
6969
</div>
7070

71-
<div class="gt-hidden" data-db-setting-for="sqlite3">
71+
<div class="gt-mt-4 gt-hidden" data-db-setting-for="sqlite3">
7272
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
7373
<label for="db_path">{{.locale.Tr "install.path"}}</label>
7474
<input id="db_path" name="db_path" value="{{.db_path}}">

0 commit comments

Comments
 (0)