// Code generated by qtc from "auth.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line views/auth.qtpl:1 package views //line views/auth.qtpl:1 import "net/http" //line views/auth.qtpl:2 import "github.com/bouncepaw/mycorrhiza/cfg" //line views/auth.qtpl:4 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line views/auth.qtpl:4 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line views/auth.qtpl:4 func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) { //line views/auth.qtpl:4 qw422016.N().S(`
`) //line views/auth.qtpl:8 if cfg.AllowRegistration { //line views/auth.qtpl:8 qw422016.N().S(` `) //line views/auth.qtpl:26 } else if cfg.UseAuth { //line views/auth.qtpl:26 qw422016.N().S(`

Registrations are currently closed. Administrators can make an account for you by hand; contact them.

← Go back

`) //line views/auth.qtpl:29 } else { //line views/auth.qtpl:29 qw422016.N().S(`

Authentication is disabled. You can make edits anonymously.

← Go back

`) //line views/auth.qtpl:32 } //line views/auth.qtpl:32 qw422016.N().S(`
`) //line views/auth.qtpl:36 } //line views/auth.qtpl:36 func WriteRegisterHTML(qq422016 qtio422016.Writer, rq *http.Request) { //line views/auth.qtpl:36 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:36 StreamRegisterHTML(qw422016, rq) //line views/auth.qtpl:36 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:36 } //line views/auth.qtpl:36 func RegisterHTML(rq *http.Request) string { //line views/auth.qtpl:36 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:36 WriteRegisterHTML(qb422016, rq) //line views/auth.qtpl:36 qs422016 := string(qb422016.B) //line views/auth.qtpl:36 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:36 return qs422016 //line views/auth.qtpl:36 } //line views/auth.qtpl:38 func StreamLoginHTML(qw422016 *qt422016.Writer) { //line views/auth.qtpl:38 qw422016.N().S(`
`) //line views/auth.qtpl:42 if cfg.UseAuth { //line views/auth.qtpl:42 qw422016.N().S(` `) //line views/auth.qtpl:58 } else { //line views/auth.qtpl:58 qw422016.N().S(`

Authentication is disabled. You can make edits anonymously.

← Go home

`) //line views/auth.qtpl:61 } //line views/auth.qtpl:61 qw422016.N().S(`
`) //line views/auth.qtpl:65 } //line views/auth.qtpl:65 func WriteLoginHTML(qq422016 qtio422016.Writer) { //line views/auth.qtpl:65 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:65 StreamLoginHTML(qw422016) //line views/auth.qtpl:65 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:65 } //line views/auth.qtpl:65 func LoginHTML() string { //line views/auth.qtpl:65 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:65 WriteLoginHTML(qb422016) //line views/auth.qtpl:65 qs422016 := string(qb422016.B) //line views/auth.qtpl:65 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:65 return qs422016 //line views/auth.qtpl:65 } //line views/auth.qtpl:67 func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) { //line views/auth.qtpl:67 qw422016.N().S(`
`) //line views/auth.qtpl:71 switch err { //line views/auth.qtpl:72 case "unknown username": //line views/auth.qtpl:72 qw422016.N().S(`

Unknown username.

`) //line views/auth.qtpl:74 case "wrong password": //line views/auth.qtpl:74 qw422016.N().S(`

Wrong password.

`) //line views/auth.qtpl:76 default: //line views/auth.qtpl:76 qw422016.N().S(`

`) //line views/auth.qtpl:77 qw422016.E().S(err) //line views/auth.qtpl:77 qw422016.N().S(`

`) //line views/auth.qtpl:78 } //line views/auth.qtpl:78 qw422016.N().S(`

← Try again

`) //line views/auth.qtpl:83 } //line views/auth.qtpl:83 func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) { //line views/auth.qtpl:83 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:83 StreamLoginErrorHTML(qw422016, err) //line views/auth.qtpl:83 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:83 } //line views/auth.qtpl:83 func LoginErrorHTML(err string) string { //line views/auth.qtpl:83 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:83 WriteLoginErrorHTML(qb422016, err) //line views/auth.qtpl:83 qs422016 := string(qb422016.B) //line views/auth.qtpl:83 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:83 return qs422016 //line views/auth.qtpl:83 } //line views/auth.qtpl:85 func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) { //line views/auth.qtpl:85 qw422016.N().S(`
`) //line views/auth.qtpl:89 if can { //line views/auth.qtpl:89 qw422016.N().S(`

Log out?

Confirm

Cancel

`) //line views/auth.qtpl:93 } else { //line views/auth.qtpl:93 qw422016.N().S(`

You cannot log out because you are not logged in.

Login

← Home

`) //line views/auth.qtpl:97 } //line views/auth.qtpl:97 qw422016.N().S(`
`) //line views/auth.qtpl:101 } //line views/auth.qtpl:101 func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) { //line views/auth.qtpl:101 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:101 StreamLogoutHTML(qw422016, can) //line views/auth.qtpl:101 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:101 } //line views/auth.qtpl:101 func LogoutHTML(can bool) string { //line views/auth.qtpl:101 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:101 WriteLogoutHTML(qb422016, can) //line views/auth.qtpl:101 qs422016 := string(qb422016.B) //line views/auth.qtpl:101 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:101 return qs422016 //line views/auth.qtpl:101 }