aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-07-12 02:01:38 -0400
committerGitHub <noreply@github.com>2023-07-12 02:01:38 -0400
commitabe9c641ce6e6fd1c815c61105daead2c6676324 (patch)
tree823472e5cd7832f3aa7d616902123e8675d424c4
parent052e65e63f6c3af517c89edff40a97b33c9a29e1 (diff)
downloadgitea-abe9c641ce6e6fd1c815c61105daead2c6676324.tar.gz
gitea-abe9c641ce6e6fd1c815c61105daead2c6676324.zip
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 <wxiaoguang@gmail.com>
-rw-r--r--routers/install/install.go1
-rw-r--r--templates/install.tmpl6
2 files changed, 4 insertions, 3 deletions
diff --git a/routers/install/install.go b/routers/install/install.go
index a2e89d3dac..6a8f561271 100644
--- a/routers/install/install.go
+++ b/routers/install/install.go
@@ -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
diff --git a/templates/install.tmpl b/templates/install.tmpl
index 24533e1a5c..eec1771eae 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -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}}">
@@ -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">
@@ -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}}">
/* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2020  Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

require File.expand_path('../../../test_helper', __FILE__)

class RoutingUsersTest < Redmine::RoutingTest
  def test_users
    should_route 'GET /users' => 'users#index'
    should_route 'GET /users/new' => 'users#new'
    should_route 'POST /users' => 'users#create'

    should_route 'GET /users/44' => 'users#show', :id => '44'
    should_route 'GET /users/current' => 'users#show', :id => 'current'
    should_route 'GET /users/44/edit' => 'users#edit', :id => '44'
    should_route 'PUT /users/44' => 'users#update', :id => '44'
    should_route 'DELETE /users/44' => 'users#destroy', :id => '44'
  end
end