auth/web/template/ticket.qtpl.go

91 lines
2.9 KiB
Go

// Code generated by qtc from "ticket.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line web/template/ticket.qtpl:1
package template
//line web/template/ticket.qtpl:3
import (
"source.toby3d.me/toby3d/auth/web/template/layout"
)
//line web/template/ticket.qtpl:7
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line web/template/ticket.qtpl:7
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line web/template/ticket.qtpl:7
type Ticket struct {
layout.BaseOf
CSRF []byte
}
//line web/template/ticket.qtpl:13
func (p *Ticket) StreamBody(qw422016 *qt422016.Writer) {
//line web/template/ticket.qtpl:13
qw422016.N().S(` <header> <h1>`)
//line web/template/ticket.qtpl:15
p.StreamT(qw422016, "TicketAuth")
//line web/template/ticket.qtpl:15
qw422016.N().S(`</h1> </header> <main> <form class="" accept-charset="utf-8" action="/ticket/send" autocomplete="off" enctype="application/x-www-form-urlencoded" method="post" target="_self"> `)
//line web/template/ticket.qtpl:27
if p.CSRF != nil {
//line web/template/ticket.qtpl:27
qw422016.N().S(` <input type="hidden" name="_csrf" value="`)
//line web/template/ticket.qtpl:30
qw422016.E().Z(p.CSRF)
//line web/template/ticket.qtpl:30
qw422016.N().S(`"> `)
//line web/template/ticket.qtpl:31
}
//line web/template/ticket.qtpl:31
qw422016.N().S(` <div> <label for="subject">`)
//line web/template/ticket.qtpl:34
p.StreamT(qw422016, "Recipient")
//line web/template/ticket.qtpl:34
qw422016.N().S(`</label> <input id="subject" type="url" name="subject" inputmode="url" placeholder="https://bob.example.org/" required> </div> <div> <label for="resource">`)
//line web/template/ticket.qtpl:44
p.StreamT(qw422016, "Resource")
//line web/template/ticket.qtpl:44
qw422016.N().S(`</label> <input id="resource" type="url" name="resource" inputmode="url" placeholder="https://alice.example.com/private/" required> </div> <button type="submit">`)
//line web/template/ticket.qtpl:53
p.StreamT(qw422016, "Send")
//line web/template/ticket.qtpl:53
qw422016.N().S(`</button> </form> </main> `)
//line web/template/ticket.qtpl:56
}
//line web/template/ticket.qtpl:56
func (p *Ticket) WriteBody(qq422016 qtio422016.Writer) {
//line web/template/ticket.qtpl:56
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/ticket.qtpl:56
p.StreamBody(qw422016)
//line web/template/ticket.qtpl:56
qt422016.ReleaseWriter(qw422016)
//line web/template/ticket.qtpl:56
}
//line web/template/ticket.qtpl:56
func (p *Ticket) Body() string {
//line web/template/ticket.qtpl:56
qb422016 := qt422016.AcquireByteBuffer()
//line web/template/ticket.qtpl:56
p.WriteBody(qb422016)
//line web/template/ticket.qtpl:56
qs422016 := string(qb422016.B)
//line web/template/ticket.qtpl:56
qt422016.ReleaseByteBuffer(qb422016)
//line web/template/ticket.qtpl:56
return qs422016
//line web/template/ticket.qtpl:56
}