Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efb68a0

Browse files
committed
Fix UI issue
1 parent 7027ac9 commit efb68a0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/install.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
176176

177177
// Test repository root path.
178178
if err := os.MkdirAll(form.RepoRootPath, os.ModePerm); err != nil {
179+
ctx.Data["Err_RepoRootPath"] = true
179180
ctx.RenderWithErr(ctx.Tr("install.invalid_repo_path", err), INSTALL, &form)
180181
return
181182
}
@@ -187,12 +188,14 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
187188
}
188189
// Does not check run user when the install lock is off.
189190
if form.RunUser != curUser {
191+
ctx.Data["Err_RunUser"] = true
190192
ctx.RenderWithErr(ctx.Tr("install.run_user_not_match", form.RunUser, curUser), INSTALL, &form)
191193
return
192194
}
193195

194196
// Check admin password.
195197
if form.AdminPasswd != form.ConfirmPasswd {
198+
ctx.Data["Err_AdminPasswd"] = true
196199
ctx.RenderWithErr(ctx.Tr("form.password_not_match"), INSTALL, form)
197200
return
198201
}
@@ -240,6 +243,8 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
240243
IsAdmin: true, IsActive: true}); err != nil {
241244
if err != models.ErrUserAlreadyExist {
242245
setting.InstallLock = false
246+
ctx.Data["Err_AdminName"] = true
247+
ctx.Data["Err_AdminEmail"] = true
243248
ctx.RenderWithErr(ctx.Tr("install.invalid_admin_setting", err), INSTALL, &form)
244249
return
245250
}

0 commit comments

Comments
 (0)