class Forme::Formatter::Disabled
Formatter
that disables all input fields,
Registered as :disabled.
Private Instance Methods
format_checkbox()
click to toggle source
Disabled
checkbox inputs, without a hidden input.
Calls superclass method
Forme::Formatter#format_checkbox
# File lib/forme/transformers/formatter.rb 513 def format_checkbox 514 @opts[:no_hidden] = true unless @opts.has_key?(:no_hidden) 515 super 516 end
normalize_options()
click to toggle source
Unless the :disabled option is specifically set to false
, set the :disabled attribute on the resulting tag.
Calls superclass method
Forme::Formatter#normalize_options
# File lib/forme/transformers/formatter.rb 521 def normalize_options 522 if @opts[:disabled] == false 523 super 524 else 525 super 526 @attr[:disabled] = :disabled 527 end 528 end