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