Documentation
¶
Index ¶
- Constants
- type DivWrapperType
- func (w *DivWrapperType) HasInnerDivAttributes() bool
- func (w *DivWrapperType) InnerDivAttributes() html.Attributes
- func (w *DivWrapperType) SetUseTooltips(t bool) *DivWrapperType
- func (w DivWrapperType) TypeName() string
- func (w *DivWrapperType) ΩAjaxRender(ctx context.Context, response *page.Response, c page.ControlI)
- func (w *DivWrapperType) ΩModifyDrawingAttributes(c page.ControlI, attr html.Attributes)
- func (w *DivWrapperType) ΩNewI() page.WrapperI
- func (w *DivWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)
- type FieldsetWrapperType
- type FormGroupWrapperType
Constants ¶
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 ¶
Ω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
type FieldsetWrapperType ¶
type FieldsetWrapperType struct {
page.LabelWrapperType
UseTooltips bool // uses tooltips for the error class
}
func NewFieldsetWrapper ¶
func NewFieldsetWrapper() *FieldsetWrapperType
https://getbootstrap.com/docs/4.1/components/forms/#horizontal-form
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
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