Update and consolidate to-do list
This commit is contained in:
@ -268,7 +268,6 @@ func (h *handler) handleCreate(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (h *handler) handleDoCreate(w http.ResponseWriter, r *http.Request) {
|
||||
// TODO consider redirecting to admin
|
||||
earliest, err := date.Parse(formDateLayout, r.FormValue(fieldNameEarliest))
|
||||
if invalidForm(w, err) {
|
||||
return
|
||||
@ -351,7 +350,6 @@ func (h *handler) handleCreateSuccess(w http.ResponseWriter, r *http.Request) {
|
||||
func (h *handler) handleAdmin(w http.ResponseWriter, r *http.Request) {
|
||||
query := r.URL.Query()
|
||||
eventID := query.Get(fieldNameEventID)
|
||||
// TODO authenticate with admin code
|
||||
metadata, err := h.store.GetEventMetadata(context.Background(), back.GetEventMetadataQuery{
|
||||
AlphaID: eventID,
|
||||
})
|
||||
@ -367,7 +365,6 @@ func (h *handler) handleAdmin(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// TODO show results (number of responses, grid)
|
||||
body := hm.Terms{
|
||||
e.Form()(
|
||||
e.Label(a.For(fieldNameEventName))(hm.Text("Event name")),
|
||||
@ -381,8 +378,6 @@ func (h *handler) handleAdmin(w http.ResponseWriter, r *http.Request) {
|
||||
e.Textarea(a.Name(fieldNameDescription))(hm.Text(metadata.Description)),
|
||||
e.Br(),
|
||||
|
||||
// TODO Should the date fields be disabled, or should we cull invalid
|
||||
// response times after changing event dates?
|
||||
e.Label(a.For(fieldNameEarliest))(hm.Text("Earliest date")),
|
||||
e.Input(
|
||||
a.Name(fieldNameEarliest),
|
||||
@ -412,8 +407,6 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (h *handler) writePage(w io.Writer, title string, contents hm.Term) error {
|
||||
// TODO Need optional subtitles, and titles should be optional.
|
||||
// Take a Page struct with title, subtitle, and contents.
|
||||
page := e.Html()(
|
||||
e.Head()(
|
||||
e.Title()(hm.Text(h.title+" — "+title)),
|
||||
|
Reference in New Issue
Block a user