control

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DivWrapper       = "bootstrap.Div"
	FormGroupWrapper = "bootstrap.FormGroup"
	FieldsetWrapper  = "bootstrap.Fieldset"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DivWrapperType

type DivWrapperType struct {
	page.LabelWrapperType
	ΩinnerDivAttr html.Attributes
	UseTooltips   bool // uses tooltips for the error class
}

DivWrapperType is a wrapper similar to a form group, but simply without the FormGroup class added. Use this for wrapping inline elements and other special situations listed in the Bootstrap doc under the Forms component. https://getbootstrap.com/docs/4.1/components/forms/ as of this writing

func NewDivWrapper

func NewDivWrapper() *DivWrapperType

func (*DivWrapperType) HasInnerDivAttributes

func (w *DivWrapperType) HasInnerDivAttributes() bool

HasInnerDivAttributes returns true if the wrapper has attributes on the inner div.

func (*DivWrapperType) InnerDivAttributes

func (w *DivWrapperType) InnerDivAttributes() html.Attributes

InnerDivAttributes returns attributes for the innerDiv. Changes will be remembered, but only drawn if you redraw the control. If you set these, the control itself will be wrapped with a div with these attributes. This is useful for layouts that have the label next to the control.

func (*DivWrapperType) SetUseTooltips

func (w *DivWrapperType) SetUseTooltips(t bool) *DivWrapperType

SetUseTooltips sets whether to use tooltips to display validation messages.

func (DivWrapperType) TypeName

func (w DivWrapperType) TypeName() string

func (*DivWrapperType) ΩAjaxRender

func (w *DivWrapperType) ΩAjaxRender(ctx context.Context, response *page.Response, c page.ControlI)

ΩAjaxRender is called by the framework to draw any changes to the wrapper that we have recorded. This has to work closely with the wrapper template so that it would create the same effect as if that entire control had been redrawn

func (*DivWrapperType) ΩModifyDrawingAttributes

func (w *DivWrapperType) ΩModifyDrawingAttributes(c page.ControlI, attr html.Attributes)

func (*DivWrapperType) ΩNewI

func (w *DivWrapperType) ΩNewI() page.WrapperI

func (*DivWrapperType) ΩWrap

func (w *DivWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)

type FieldsetWrapperType

type FieldsetWrapperType struct {
	page.LabelWrapperType
	UseTooltips bool // uses tooltips for the error class
}

func (*FieldsetWrapperType) SetUseTooltips

func (w *FieldsetWrapperType) SetUseTooltips(t bool) *FieldsetWrapperType

func (*FieldsetWrapperType) TypeName

func (w *FieldsetWrapperType) TypeName() string

func (*FieldsetWrapperType) ΩNewI

func (w *FieldsetWrapperType) ΩNewI() page.WrapperI

func (*FieldsetWrapperType) ΩWrap

func (w *FieldsetWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)

type FormGroupWrapperType

type FormGroupWrapperType struct {
	DivWrapperType
}

func NewFormGroupWrapper

func NewFormGroupWrapper() *FormGroupWrapperType

func (FormGroupWrapperType) TypeName

func (w FormGroupWrapperType) TypeName() string

func (*FormGroupWrapperType) ΩNewI

func (w *FormGroupWrapperType) ΩNewI() page.WrapperI

func (*FormGroupWrapperType) ΩWrap

func (w *FormGroupWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL