class Forme::Formatter::Bs3ReadOnly
Formatter
that adds “readonly” for most input types, and disables select/radio/checkbox inputs.
Registered as :bs3_readonly.
Private Instance Methods
_format_input(type)
click to toggle source
Use a span with text instead of an input field.
Calls superclass method
Forme::Formatter#_format_input
# File lib/forme/bs3.rb 195 def _format_input(type) 196 @attr[:readonly] = :readonly 197 super 198 end
format_checkbox()
click to toggle source
Disabled checkbox inputs.
Calls superclass method
Forme::Formatter#format_checkbox
# File lib/forme/bs3.rb 189 def format_checkbox 190 @attr[:disabled] = :disabled 191 super 192 end
format_radio()
click to toggle source
Disabled radio button inputs.
Calls superclass method
Forme::Formatter#format_radio
# File lib/forme/bs3.rb 201 def format_radio 202 @attr[:disabled] = :disabled 203 super 204 end
format_select()
click to toggle source
Use a span with text of the selected values instead of a select box.
Calls superclass method
Forme::Formatter#format_select
# File lib/forme/bs3.rb 207 def format_select 208 @attr[:disabled] = :disabled 209 super 210 end
format_textarea()
click to toggle source
Use a span with text instead of a text area.
Calls superclass method
Forme::Formatter#format_textarea
# File lib/forme/bs3.rb 213 def format_textarea 214 @attr[:readonly] = :readonly 215 super 216 end