Module: HtmlGrid::FormMethods
Constant Summary collapse
- AUTOFILL =
false
- ACCEPT_CHARSET =
"UTF-8"
- EVENT =
nil
- FORM_ACTION =
nil
- FORM_METHOD =
"POST"
- FORM_NAME =
"stdform"
- TAG_METHOD =
:form
Instance Method Summary collapse
- #autofill? ⇒ Boolean
- #event ⇒ Object
- #formname ⇒ Object
- #onsubmit=(onsubmit) ⇒ Object
- #to_html(context) ⇒ Object
Instance Method Details
#autofill? ⇒ Boolean
39 40 41 |
# File 'lib/htmlgrid/form.rb', line 39 def autofill? self.class.const_get(:AUTOFILL) end |
#event ⇒ Object
43 44 45 |
# File 'lib/htmlgrid/form.rb', line 43 def event self.class::EVENT end |
#formname ⇒ Object
47 48 49 50 51 |
# File 'lib/htmlgrid/form.rb', line 47 def formname if defined? self.class::FORM_NAME self.class::FORM_NAME end end |
#onsubmit=(onsubmit) ⇒ Object
53 54 55 |
# File 'lib/htmlgrid/form.rb', line 53 def onsubmit=(onsubmit) @form_properties["onSubmit"] = onsubmit end |
#to_html(context) ⇒ Object
57 58 59 60 61 |
# File 'lib/htmlgrid/form.rb', line 57 def to_html(context) context.send(self.class::TAG_METHOD, @form_properties) { super << context.div("style" => "display:none") { hidden_fields(context) } } end |