Compare commits
1 commit
3f8d42571b
...
4944e47e76
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4944e47e76 |
2 changed files with 6 additions and 5 deletions
|
@ -189,7 +189,6 @@ type PageData struct {
|
||||||
Title string
|
Title string
|
||||||
Version string
|
Version string
|
||||||
Expirations []int
|
Expirations []int
|
||||||
Expiration int
|
|
||||||
Languages []string
|
Languages []string
|
||||||
Err error
|
Err error
|
||||||
URL string
|
URL string
|
||||||
|
@ -347,6 +346,9 @@ func (h *GetWebNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.PageData.Err = fmt.Errorf("jriou")
|
||||||
|
h.Templates.ExecuteTemplate(w, templateName, h.PageData)
|
||||||
|
|
||||||
h.PageData.Note = note
|
h.PageData.Note = note
|
||||||
|
|
||||||
h.logger.Debug("rendering note web page")
|
h.logger.Debug("rendering note web page")
|
||||||
|
@ -425,7 +427,6 @@ func (s *Server) Start() error {
|
||||||
p := PageData{
|
p := PageData{
|
||||||
Title: s.config.Title,
|
Title: s.config.Title,
|
||||||
Expirations: s.config.Expirations,
|
Expirations: s.config.Expirations,
|
||||||
Expiration: s.config.Expiration,
|
|
||||||
Languages: s.config.Languages,
|
Languages: s.config.Languages,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
||||||
<option disabled>Expiration</option>
|
<option selected="selected" disabled>Expiration</option>
|
||||||
{{range $exp := .Expirations}}
|
{{range .Expirations}}
|
||||||
<option {{ if eq $exp $.Expiration }}selected="selected"{{end}} value="{{$exp}}">{{HumanDuration $exp}}</option>
|
<option value="{{.}}">{{HumanDuration .}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue