Skip to content

Commit

Permalink
Show correct SSL Mode on "install page" (go-gitea#25818) (go-gitea#25838
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot and wxiaoguang committed Jul 12, 2023
1 parent 052e65e commit abe9c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions routers/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func Install(ctx *context.Context) {
form.DbName = setting.Database.Name
form.DbPath = setting.Database.Path
form.DbSchema = setting.Database.Schema
form.SSLMode = setting.Database.SSLMode

curDBType := setting.Database.Type.String()
var isCurDBTypeSupported bool
Expand Down
6 changes: 3 additions & 3 deletions templates/install.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</div>

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

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

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

0 comments on commit abe9c64

Please sign in to comment.