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
42 43 44 |
# File 'lib/htmlgrid/form.rb', line 42 def event self::class::EVENT end |
#formname ⇒ Object
45 46 47 48 49 |
# File 'lib/htmlgrid/form.rb', line 45 def formname if(defined? self::class::FORM_NAME) self::class::FORM_NAME end end |
#onsubmit=(onsubmit) ⇒ Object
50 51 52 |
# File 'lib/htmlgrid/form.rb', line 50 def onsubmit=(onsubmit) @form_properties["onSubmit"] = onsubmit end |
#to_html(context) ⇒ Object
53 54 55 56 57 |
# File 'lib/htmlgrid/form.rb', line 53 def to_html(context) context.send(self::class::TAG_METHOD, @form_properties) { super << context.div('style'=>'display:none') { hidden_fields(context) } } end |