Module: Lipsiadmin::View::Helpers::FormTagHelper

Defined in:
lib/view/helpers/view_helper.rb

Overview

Returns text_area_tag, text_field_tag, password_field_tag with a default extjs css style.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



55
56
57
58
59
# File 'lib/view/helpers/view_helper.rb', line 55

def self.included(base)#:nodoc:
  base.alias_method_chain :text_field_tag, :style
  base.alias_method_chain :text_area_tag, :style
  base.alias_method_chain :password_field_tag, :style
end

Instance Method Details

#password_field_tag_with_style(name, value = nil, options = {}) ⇒ Object

Returns password_field_tag with extjs style alias for password_field_tag, for use the original tag use:

password_field_tag_style


88
89
90
91
92
# File 'lib/view/helpers/view_helper.rb', line 88

def password_field_tag_with_style(name, value = nil, options = {})
  options[:class] ||= "x-form-text"
  options[:style] ||= "width:100%"
  password_field_tag_without_style(name, value, options)
end

#text_area_tag_with_style(name, value = nil, options = {}) ⇒ Object

Returns text_area_tag with extjs style alias for text_area_tag, for use the original tag use:

text_area_tag_without_style


66
67
68
69
70
# File 'lib/view/helpers/view_helper.rb', line 66

def text_area_tag_with_style(name, value = nil, options = {})
  options[:class] ||= "x-form-field"
  options[:style] ||= "width:100%;height:80px"
  text_area_tag_without_style(name, value, options)
end

#text_field_tag_with_style(name, value = nil, options = {}) ⇒ Object

Returns text_field_tag with extjs style alias for text_field_tag, for use the original tag use:

text_field_tag_without_style


77
78
79
80
81
# File 'lib/view/helpers/view_helper.rb', line 77

def text_field_tag_with_style(name, value = nil, options = {})
  options[:class] ||= "x-form-text"
  options[:style] ||= "width:100%"
  text_field_tag_without_style(name, value, options)
end