2023-06-19 17:42:47 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2017-11-20 00:10:04 -05:00
|
|
|
|
2023-08-10 22:46:45 -04:00
|
|
|
package form // import "miniflux.app/v2/internal/ui/form"
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
// CategoryForm represents a feed form in the UI
|
|
|
|
type CategoryForm struct {
|
2021-06-02 20:39:47 -04:00
|
|
|
Title string
|
|
|
|
HideGlobally string
|
2017-11-20 00:10:04 -05:00
|
|
|
}
|
|
|
|
|
2017-11-28 00:30:04 -05:00
|
|
|
// NewCategoryForm returns a new CategoryForm.
|
2017-11-20 00:10:04 -05:00
|
|
|
func NewCategoryForm(r *http.Request) *CategoryForm {
|
|
|
|
return &CategoryForm{
|
2021-06-02 20:39:47 -04:00
|
|
|
Title: r.FormValue("title"),
|
|
|
|
HideGlobally: r.FormValue("hide_globally"),
|
2017-11-20 00:10:04 -05:00
|
|
|
}
|
|
|
|
}
|