1// Code generated by qtc from "login.qtpl". DO NOT EDIT.
2// See https://github.com/valyala/quicktemplate for details.
3
4//line templates/login.qtpl:1
5package templates
6
7//line templates/login.qtpl:1
8import "context"
9
10//line templates/login.qtpl:3
11import (
12 qtio422016 "io"
13
14 qt422016 "github.com/valyala/quicktemplate"
15)
16
17//line templates/login.qtpl:3
18var (
19 _ = qtio422016.Copy
20 _ = qt422016.AcquireByteBuffer
21)
22
23//line templates/login.qtpl:4
24type LoginPage struct {
25 Referer string
26 ErrorMessage string
27}
28
29//line templates/login.qtpl:10
30func (p *LoginPage) StreamTitle(qw422016 *qt422016.Writer, ctx context.Context) {
31//line templates/login.qtpl:10
32 qw422016.N().S(`Hello`)
33//line templates/login.qtpl:10
34}
35
36//line templates/login.qtpl:10
37func (p *LoginPage) WriteTitle(qq422016 qtio422016.Writer, ctx context.Context) {
38//line templates/login.qtpl:10
39 qw422016 := qt422016.AcquireWriter(qq422016)
40//line templates/login.qtpl:10
41 p.StreamTitle(qw422016, ctx)
42//line templates/login.qtpl:10
43 qt422016.ReleaseWriter(qw422016)
44//line templates/login.qtpl:10
45}
46
47//line templates/login.qtpl:10
48func (p *LoginPage) Title(ctx context.Context) string {
49//line templates/login.qtpl:10
50 qb422016 := qt422016.AcquireByteBuffer()
51//line templates/login.qtpl:10
52 p.WriteTitle(qb422016, ctx)
53//line templates/login.qtpl:10
54 qs422016 := string(qb422016.B)
55//line templates/login.qtpl:10
56 qt422016.ReleaseByteBuffer(qb422016)
57//line templates/login.qtpl:10
58 return qs422016
59//line templates/login.qtpl:10
60}
61
62//line templates/login.qtpl:12
63func (p *LoginPage) StreamNavbar(qw422016 *qt422016.Writer, ctx context.Context) {
64//line templates/login.qtpl:12
65 StreamNavbar(qw422016, ctx, Login)
66//line templates/login.qtpl:12
67}
68
69//line templates/login.qtpl:12
70func (p *LoginPage) WriteNavbar(qq422016 qtio422016.Writer, ctx context.Context) {
71//line templates/login.qtpl:12
72 qw422016 := qt422016.AcquireWriter(qq422016)
73//line templates/login.qtpl:12
74 p.StreamNavbar(qw422016, ctx)
75//line templates/login.qtpl:12
76 qt422016.ReleaseWriter(qw422016)
77//line templates/login.qtpl:12
78}
79
80//line templates/login.qtpl:12
81func (p *LoginPage) Navbar(ctx context.Context) string {
82//line templates/login.qtpl:12
83 qb422016 := qt422016.AcquireByteBuffer()
84//line templates/login.qtpl:12
85 p.WriteNavbar(qb422016, ctx)
86//line templates/login.qtpl:12
87 qs422016 := string(qb422016.B)
88//line templates/login.qtpl:12
89 qt422016.ReleaseByteBuffer(qb422016)
90//line templates/login.qtpl:12
91 return qs422016
92//line templates/login.qtpl:12
93}
94
95//line templates/login.qtpl:14
96func (p *LoginPage) StreamContent(qw422016 *qt422016.Writer, ctx context.Context) {
97//line templates/login.qtpl:14
98 qw422016.N().S(`
99<div class="row">
100 <div class="col-md-6 offset-md-3">
101 `)
102//line templates/login.qtpl:17
103 if p.Referer == "" {
104//line templates/login.qtpl:17
105 qw422016.N().S(`
106 <form action="/login/" method="POST">
107 `)
108//line templates/login.qtpl:19
109 } else {
110//line templates/login.qtpl:19
111 qw422016.N().S(`
112 <form action="/login/?referer=`)
113//line templates/login.qtpl:20
114 qw422016.E().S(p.Referer)
115//line templates/login.qtpl:20
116 qw422016.N().S(`" method="POST">
117 `)
118//line templates/login.qtpl:21
119 }
120//line templates/login.qtpl:21
121 qw422016.N().S(`
122 <div class="form-group m-3">
123 <label for="username" class="form-label">Username</label>
124 <input type="text" class="form-control" name="username" id="username">
125 </div>
126 <div class="form-group m-3">
127 <label for="password" class="form-label">Password</label>
128 <input type="password" class="form-control" name="password" id="password">
129 </div>
130 <div class="form-group m-3">
131 <button type="submit" class="btn btn-primary">Login</button>
132 </div>
133 </form>
134 </div>
135 `)
136//line templates/login.qtpl:35
137 if p.ErrorMessage != "" {
138//line templates/login.qtpl:35
139 qw422016.N().S(`
140 <div class="col-md-6 offset-md-3">
141 <div class="alert alert-warning text-center" >
142 `)
143//line templates/login.qtpl:38
144 qw422016.E().S(p.ErrorMessage)
145//line templates/login.qtpl:38
146 qw422016.N().S(`
147 </div>
148 </div>
149 `)
150//line templates/login.qtpl:41
151 }
152//line templates/login.qtpl:41
153 qw422016.N().S(`
154</div>
155`)
156//line templates/login.qtpl:43
157}
158
159//line templates/login.qtpl:43
160func (p *LoginPage) WriteContent(qq422016 qtio422016.Writer, ctx context.Context) {
161//line templates/login.qtpl:43
162 qw422016 := qt422016.AcquireWriter(qq422016)
163//line templates/login.qtpl:43
164 p.StreamContent(qw422016, ctx)
165//line templates/login.qtpl:43
166 qt422016.ReleaseWriter(qw422016)
167//line templates/login.qtpl:43
168}
169
170//line templates/login.qtpl:43
171func (p *LoginPage) Content(ctx context.Context) string {
172//line templates/login.qtpl:43
173 qb422016 := qt422016.AcquireByteBuffer()
174//line templates/login.qtpl:43
175 p.WriteContent(qb422016, ctx)
176//line templates/login.qtpl:43
177 qs422016 := string(qb422016.B)
178//line templates/login.qtpl:43
179 qt422016.ReleaseByteBuffer(qb422016)
180//line templates/login.qtpl:43
181 return qs422016
182//line templates/login.qtpl:43
183}
184
185//line templates/login.qtpl:45
186func (p *LoginPage) StreamScript(qw422016 *qt422016.Writer, ctx context.Context) {
187//line templates/login.qtpl:45
188 qw422016.N().S(`
189`)
190//line templates/login.qtpl:46
191}
192
193//line templates/login.qtpl:46
194func (p *LoginPage) WriteScript(qq422016 qtio422016.Writer, ctx context.Context) {
195//line templates/login.qtpl:46
196 qw422016 := qt422016.AcquireWriter(qq422016)
197//line templates/login.qtpl:46
198 p.StreamScript(qw422016, ctx)
199//line templates/login.qtpl:46
200 qt422016.ReleaseWriter(qw422016)
201//line templates/login.qtpl:46
202}
203
204//line templates/login.qtpl:46
205func (p *LoginPage) Script(ctx context.Context) string {
206//line templates/login.qtpl:46
207 qb422016 := qt422016.AcquireByteBuffer()
208//line templates/login.qtpl:46
209 p.WriteScript(qb422016, ctx)
210//line templates/login.qtpl:46
211 qs422016 := string(qb422016.B)
212//line templates/login.qtpl:46
213 qt422016.ReleaseByteBuffer(qb422016)
214//line templates/login.qtpl:46
215 return qs422016
216//line templates/login.qtpl:46
217}