1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00
miniflux-v2/internal/ui/form/category.go

23 lines
542 B
Go
Raw Normal View History

// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
2017-11-19 21:10:04 -08:00
package form // import "miniflux.app/v2/internal/ui/form"
2017-11-19 21:10:04 -08:00
import (
"net/http"
)
// CategoryForm represents a feed form in the UI
type CategoryForm struct {
Title string
HideGlobally bool
2017-11-19 21:10:04 -08:00
}
2017-11-27 21:30:04 -08:00
// NewCategoryForm returns a new CategoryForm.
2017-11-19 21:10:04 -08:00
func NewCategoryForm(r *http.Request) *CategoryForm {
return &CategoryForm{
Title: r.FormValue("title"),
HideGlobally: r.FormValue("hide_globally") == "1",
2017-11-19 21:10:04 -08:00
}
}