-
Notifications
You must be signed in to change notification settings - Fork 0
/
htmlElementLegend.go
62 lines (50 loc) · 2.96 KB
/
htmlElementLegend.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package telerik
import (
"bytes"
"reflect"
)
// The HTML <legend> element represents a caption for the content of its parent <fieldset>.
type HtmlElementFormLegend struct {
/*
The name of the control, which is submitted with the form data.
*/
Name string `htmlAttr:"name" jsonSchema_description:"The name of the control, which is submitted with the form data."`
/*
Content inside html tag
*/
Content Content `htmlAttr:"-" jsonSchema_description:"Content inside html tag"`
/*
The form element that the input element is associated with (its form owner). The value of the attribute must be an id
of a <form> element in the same document. If this attribute is not specified, this <input> element must be a
descendant of a <form> element. This attribute enables you to place <input> elements anywhere within a document, not
just as descendants of their form elements. An input can only be associated with one form.
*/
Form string `htmlAttr:"form" jsonSchema_description:"The form element that the input element is associated with (its form owner). The value of the attribute must be an id of a <form> element in the same document. If this attribute is not specified, this <input> element must be a descendant of a <form> element. This attribute enables you to place <input> elements anywhere within a document, not just as descendants of their form elements. An input can only be associated with one form."`
/*
This Boolean attribute indicates that the form control is not available for interaction. In particular, the click
event will not be dispatched on disabled controls. Also, a disabled control's value isn't submitted with the form.
Unlike other browsers, Firefox will by default persist the dynamic disabled state of an <input> across page loads. Use
the autocomplete attribute to control this feature.
*/
Disabled Boolean `htmlAttrSet:"disabled" jsonSchema_description:"This Boolean attribute indicates that the form control is not available for interaction. In particular, the click event will not be dispatched on disabled controls. Also, a disabled control's value isn't submitted with the form.\nUnlike other browsers, Firefox will by default persist the dynamic disabled state of an <input> across page loads. Use the autocomplete attribute to control this feature."`
Global HtmlGlobalAttributes `htmlAttr:"-" jsonSchema_description:""`
*ToJavaScriptConverter `htmlAttr:"-" jsonSchema_description:""`
}
func (el *HtmlElementFormLegend) SetOmitHtml(value Boolean) {
el.Global.DoNotUseThisFieldOmitHtml = value
}
func (el *HtmlElementFormLegend) ToHtml() []byte {
var buffer bytes.Buffer
if el.Global.DoNotUseThisFieldOmitHtml == TRUE {
return []byte{}
}
element := reflect.ValueOf(el).Elem()
data := el.ToJavaScriptConverter.ToTelerikHtml(element)
buffer.Write([]byte(`<legend`))
buffer.Write(el.Global.ToHtml())
buffer.Write(data)
buffer.Write([]byte(`>`))
buffer.Write(el.Content.ToHtml())
buffer.Write([]byte(`</legend>`))
return buffer.Bytes()
}