Documentation
¶
Index ¶
- func BlankLabel(label string) func(*OptionsWidget)
- func IncludeBlank(b bool) func(*OptionsWidget)
- func NewMultiSelectInput(attrs map[string]string, choices func() []widgets.Option) widgets.Widget
- type MultiSelectWidget
- type OptionsWidget
- func NewCheckboxInput(attrs map[string]string, choices func() []widgets.Option, ...) *OptionsWidget
- func NewOptionWidget(type_ string, templateName string, attrs map[string]string, ...) *OptionsWidget
- func NewRadioInput(attrs map[string]string, choices func() []widgets.Option, ...) *OptionsWidget
- func NewSelectInput(attrs map[string]string, choices func() []widgets.Option, ...) *OptionsWidget
- func (o *OptionsWidget) GetContextData(ctx context.Context, id, name string, value interface{}, ...) ctx.Context
- func (b *OptionsWidget) Render(ctx context.Context, w io.Writer, id, name string, value interface{}, ...) error
- func (o *OptionsWidget) Validate(ctx context.Context, value interface{}) []error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlankLabel ¶ added in v1.7.2
func BlankLabel(label string) func(*OptionsWidget)
func IncludeBlank ¶ added in v1.7.2
func IncludeBlank(b bool) func(*OptionsWidget)
Types ¶
type MultiSelectWidget ¶
type MultiSelectWidget struct {
*OptionsWidget
}
func (*MultiSelectWidget) Media ¶
func (m *MultiSelectWidget) Media() media.Media
func (*MultiSelectWidget) ValueFromDataDict ¶
func (m *MultiSelectWidget) ValueFromDataDict(ctx context.Context, data url.Values, files map[string][]filesystem.FileHeader, name string) (interface{}, []error)
type OptionsWidget ¶
type OptionsWidget struct {
*widgets.BaseWidget
Choices func() []widgets.Option
IncludeBlank bool
BlankLabel string
}
func NewCheckboxInput ¶
func NewCheckboxInput(attrs map[string]string, choices func() []widgets.Option, opts ...func(*OptionsWidget)) *OptionsWidget
func NewOptionWidget ¶
func NewOptionWidget(type_ string, templateName string, attrs map[string]string, choices func() []widgets.Option, options ...func(*OptionsWidget)) *OptionsWidget
func NewRadioInput ¶
func NewRadioInput(attrs map[string]string, choices func() []widgets.Option, opts ...func(*OptionsWidget)) *OptionsWidget
func NewSelectInput ¶
func NewSelectInput(attrs map[string]string, choices func() []widgets.Option, opts ...func(*OptionsWidget)) *OptionsWidget
func (*OptionsWidget) GetContextData ¶
Click to show internal directories.
Click to hide internal directories.