Fix #54
This commit is contained in:
parent
b506429803
commit
a991ebf5d0
|
@ -7,6 +7,7 @@ package routers
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"os"
|
"os"
|
||||||
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Unknwon/goconfig"
|
"github.com/Unknwon/goconfig"
|
||||||
|
@ -103,6 +104,11 @@ func Install(ctx *middleware.Context, form auth.InstallForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, err := exec.LookPath("git"); err != nil {
|
||||||
|
ctx.RenderWithErr("Fail to test 'git' command: "+err.Error(), "install", &form)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Pass basic check, now test configuration.
|
// Pass basic check, now test configuration.
|
||||||
// Test database setting.
|
// Test database setting.
|
||||||
dbTypes := map[string]string{"mysql": "mysql", "pgsql": "postgres", "sqlite": "sqlite3"}
|
dbTypes := map[string]string{"mysql": "mysql", "pgsql": "postgres", "sqlite": "sqlite3"}
|
||||||
|
|
|
@ -110,7 +110,7 @@ func SocialSignIn(ctx *middleware.Context, tokens oauth2.Tokens) {
|
||||||
case models.ErrOauth2NotAssociatedWithUser:
|
case models.ErrOauth2NotAssociatedWithUser:
|
||||||
// pass
|
// pass
|
||||||
default:
|
default:
|
||||||
log.Error(err) // FIXME: handle error page
|
log.Error(err.Error()) // FIXME: handle error page
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.Session.Set("socialId", oa.Id)
|
ctx.Session.Set("socialId", oa.Id)
|
||||||
|
|
|
@ -156,11 +156,11 @@
|
||||||
<label class="col-md-3 control-label">SMTP Host: </label>
|
<label class="col-md-3 control-label">SMTP Host: </label>
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address" value="{{.smtp_host}}">
|
<input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address and port" value="{{.smtp_host}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label">Email: </label>
|
<label class="col-md-3 control-label">Username: </label>
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}">
|
<input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}">
|
||||||
|
|
Loading…
Reference in New Issue