2011-04-27 15:26:02 -04:00
|
|
|
class StringInput < SimpleForm::Inputs::StringInput
|
2014-03-11 18:41:25 -04:00
|
|
|
def input(wrapper_options = nil)
|
2011-04-27 15:26:02 -04:00
|
|
|
"<section>#{super}</section>".html_safe
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class NumericInput < SimpleForm::Inputs::NumericInput
|
2014-03-11 18:41:25 -04:00
|
|
|
def input(wrapper_options = nil)
|
2011-04-27 15:26:02 -04:00
|
|
|
"<section>#{super}</section>".html_safe
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class CustomizedInput < SimpleForm::Inputs::StringInput
|
2014-03-11 18:41:25 -04:00
|
|
|
def input(wrapper_options = nil)
|
2014-03-11 14:54:18 -04:00
|
|
|
"<section>#{super}</section>".html_safe
|
|
|
|
end
|
|
|
|
|
|
|
|
def input_method
|
|
|
|
:text_field
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class DeprecatedInput < SimpleForm::Inputs::StringInput
|
|
|
|
def input
|
2011-04-27 15:26:02 -04:00
|
|
|
"<section>#{super}</section>".html_safe
|
|
|
|
end
|
2011-09-08 09:28:28 -04:00
|
|
|
|
2011-04-27 15:26:02 -04:00
|
|
|
def input_method
|
|
|
|
:text_field
|
|
|
|
end
|
2011-09-08 09:28:28 -04:00
|
|
|
end
|
2012-04-21 22:21:36 -04:00
|
|
|
|
|
|
|
class CollectionSelectInput < SimpleForm::Inputs::CollectionSelectInput
|
|
|
|
def input_html_classes
|
|
|
|
super.push('chosen')
|
|
|
|
end
|
|
|
|
end
|
2014-06-05 06:46:12 -04:00
|
|
|
|
|
|
|
module CustomInputs
|
2014-06-26 16:52:23 -04:00
|
|
|
class CustomizedInput < SimpleForm::Inputs::StringInput
|
|
|
|
def input_html_classes
|
|
|
|
super.push('customized-namespace-custom-input')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-06-05 06:46:12 -04:00
|
|
|
class PasswordInput < SimpleForm::Inputs::PasswordInput
|
|
|
|
def input_html_classes
|
|
|
|
super.push('password-custom-input')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class NumericInput < SimpleForm::Inputs::PasswordInput
|
|
|
|
def input_html_classes
|
|
|
|
super.push('numeric-custom-input')
|
|
|
|
end
|
|
|
|
end
|
2014-06-26 16:52:23 -04:00
|
|
|
end
|