From 5bf951680fd14f08b6c2b09597606919060fe85f Mon Sep 17 00:00:00 2001 From: vCaesar Date: Sun, 8 Jan 2017 18:38:01 +0800 Subject: [PATCH 1/3] Fix install.tmpl input default value --- public/js/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/index.js b/public/js/index.js index 590fafa8d8bd5..f9c83a59e1f88 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -209,6 +209,10 @@ function initInstall() { return; } + $('#db_host').val("127.0.0.1:3306"); + $('#db_user').val("root"); + $('#db_name').val("gitea"); + // Database type change detection. $("#db_type").change(function () { var sqliteDefault = 'data/gitea.db'; From 88c3781d5c7f24f61cdf2a82a6ec67d0540e5b5f Mon Sep 17 00:00:00 2001 From: vCaesar Date: Mon, 9 Jan 2017 03:30:01 +0800 Subject: [PATCH 2/3] Update db_user to gitea --- public/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/index.js b/public/js/index.js index f9c83a59e1f88..ad6b2ae8f0ef4 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -210,7 +210,7 @@ function initInstall() { } $('#db_host').val("127.0.0.1:3306"); - $('#db_user').val("root"); + $('#db_user').val("gitea"); $('#db_name').val("gitea"); // Database type change detection. From 2ef018936a2e363579949f3e2918e4b75ac8c770 Mon Sep 17 00:00:00 2001 From: vCaesar Date: Mon, 9 Jan 2017 16:57:00 +0800 Subject: [PATCH 3/3] Add when INSTALL_LOCK = false --- public/js/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index ad6b2ae8f0ef4..61b774b1fe2af 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -209,9 +209,11 @@ function initInstall() { return; } - $('#db_host').val("127.0.0.1:3306"); - $('#db_user').val("gitea"); - $('#db_name').val("gitea"); + if ($('#db_host').val()=="") { + $('#db_host').val("127.0.0.1:3306"); + $('#db_user').val("gitea"); + $('#db_name').val("gitea"); + } // Database type change detection. $("#db_type").change(function () {