summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-14 19:22:52 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-14 19:22:52 -0400
commitefb68a0a96574a334a3ec791c0a7f2bc6b96d006 (patch)
tree102cf17a085e8d68af6c57a3b6ed41af01f07ef1 /routers
parent7027ac930841960dfe850572a0e8306c6c010ef3 (diff)
downloadgitea-efb68a0a96574a334a3ec791c0a7f2bc6b96d006.tar.gz
gitea-efb68a0a96574a334a3ec791c0a7f2bc6b96d006.zip
Fix UI issue
Diffstat (limited to 'routers')
-rw-r--r--routers/install.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index 7617f5bcc2..26409814e2 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -176,6 +176,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
// Test repository root path.
if err := os.MkdirAll(form.RepoRootPath, os.ModePerm); err != nil {
+ ctx.Data["Err_RepoRootPath"] = true
ctx.RenderWithErr(ctx.Tr("install.invalid_repo_path", err), INSTALL, &form)
return
}
@@ -187,12 +188,14 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
}
// Does not check run user when the install lock is off.
if form.RunUser != curUser {
+ ctx.Data["Err_RunUser"] = true
ctx.RenderWithErr(ctx.Tr("install.run_user_not_match", form.RunUser, curUser), INSTALL, &form)
return
}
// Check admin password.
if form.AdminPasswd != form.ConfirmPasswd {
+ ctx.Data["Err_AdminPasswd"] = true
ctx.RenderWithErr(ctx.Tr("form.password_not_match"), INSTALL, form)
return
}
@@ -240,6 +243,8 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
IsAdmin: true, IsActive: true}); err != nil {
if err != models.ErrUserAlreadyExist {
setting.InstallLock = false
+ ctx.Data["Err_AdminName"] = true
+ ctx.Data["Err_AdminEmail"] = true
ctx.RenderWithErr(ctx.Tr("install.invalid_admin_setting", err), INSTALL, &form)
return
}