Sfoglia il codice sorgente

spell bug fixed

tags/v0.9.99
Lunny Xiao 10 anni fa
parent
commit
f68e279150
3 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 2
    2
      models/login.go
  2. 2
    2
      routers/admin/auths.go
  3. 1
    1
      templates/admin/auths/edit.tmpl

+ 2
- 2
models/login.go Vedi File

@@ -77,7 +77,7 @@ type LoginSource struct {
Cfg core.Conversion `xorm:"TEXT"`
Created time.Time `xorm:"created"`
Updated time.Time `xorm:"updated"`
AllowAutoRegisted bool `xorm:"not null default false"`
AllowAutoRegister bool `xorm:"not null default false"`
}

func (source *LoginSource) TypeString() string {
@@ -180,7 +180,7 @@ func LoginUser(uname, passwd string) (*User, error) {
} else {
if !has {
var sources []LoginSource
cond := &LoginSource{IsActived: true, AllowAutoRegisted: true}
cond := &LoginSource{IsActived: true, AllowAutoRegister: true}
err = orm.UseBool().Find(&sources, cond)
if err != nil {
return nil, err

+ 2
- 2
routers/admin/auths.go Vedi File

@@ -67,7 +67,7 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Type: form.Type,
Name: form.AuthName,
IsActived: true,
AllowAutoRegisted: form.AllowAutoRegister,
AllowAutoRegister: form.AllowAutoRegister,
Cfg: u,
}

@@ -140,7 +140,7 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Name: form.AuthName,
IsActived: form.IsActived,
Type: form.Type,
AllowAutoRegisted: form.AllowAutoRegister,
AllowAutoRegister: form.AllowAutoRegister,
Cfg: config,
}


+ 1
- 1
templates/admin/auths/edit.tmpl Vedi File

@@ -124,7 +124,7 @@
<div class="form-group {{if .Err_TLS}}has-error has-feedback{{end}}">
<label class="col-md-3 control-label">Auto Register: </label>
<div class="col-md-7">
<input name="allowautoregister" type="checkbox" class="form-control" {{if .Source.AllowAutoRegisted}}checked{{end}}>
<input name="allowautoregister" type="checkbox" class="form-control" {{if .Source.AllowAutoRegister}}checked{{end}}>
</div>
</div>


Loading…
Annulla
Salva