Module: Lipsiadmin::View::Helpers::FormHelper
- Defined in:
- lib/view/helpers/view_helper.rb
Overview
Returns text_area, text_field, password_field with a default extjs css style.
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#password_field_with_style(name, method, options = {}) ⇒ Object
Returns password_field with extjs style alias for password_field, for use the original tag use:.
-
#text_area_with_style(name, value = nil, options = {}) ⇒ Object
Returns text_area with extjs style alias for text_area, for use the original tag use:.
-
#text_field_with_style(name, method, options = {}) ⇒ Object
Returns text_field with extjs style alias for text_field, for use the original tag use:.
Class Method Details
.included(base) ⇒ Object
:nodoc:
10 11 12 13 14 |
# File 'lib/view/helpers/view_helper.rb', line 10 def self.included(base)#:nodoc: base.alias_method_chain :text_area, :style base.alias_method_chain :text_field, :style base.alias_method_chain :password_field, :style end |
Instance Method Details
#password_field_with_style(name, method, options = {}) ⇒ Object
Returns password_field with extjs style alias for password_field, for use the original tag use:
password_field_without_style
43 44 45 46 47 |
# File 'lib/view/helpers/view_helper.rb', line 43 def password_field_with_style(name, method, = {}) [:class] ||= "x-form-text" [:style] ||= "width:100%" password_field_without_style(name, method, ) end |
#text_area_with_style(name, value = nil, options = {}) ⇒ Object
Returns text_area with extjs style alias for text_area, for use the original tag use:
text_area_without_style
21 22 23 24 25 |
# File 'lib/view/helpers/view_helper.rb', line 21 def text_area_with_style(name, value = nil, = {}) [:class] ||= "x-form-field" [:style] ||= "width:100%;height:80px" text_area_without_style(name, value, ) end |
#text_field_with_style(name, method, options = {}) ⇒ Object
Returns text_field with extjs style alias for text_field, for use the original tag use:
text_field_without_style
32 33 34 35 36 |
# File 'lib/view/helpers/view_helper.rb', line 32 def text_field_with_style(name, method, = {}) [:class] ||= "x-form-text" [:style] ||= "width:100%" text_field_without_style(name, method, ) end |