Revision b264a1e1
Added by Ondřej Ezr about 3 years ago
app/helpers/form_helper.rb | ||
---|---|---|
end
|
||
|
||
def byte_size_f(f, attr, options = {})
|
||
options[:class] = options[:class].to_s + ' byte_spinner' unless options[:disabled]
|
||
options[:label_help] = _("When specifying custom value, add 'MB' or 'GB' at the end. Field is not case sensitive and MB is default if unspecified.")
|
||
options[:help_block] ||= soft_limit_warning_block
|
||
options[:help_block] += f.hidden_field(attr, :class => "real-hidden-value", :id => nil)
|
||
|
||
text_f(f, attr, options)
|
||
react_form_input('memory', f, attr, options)
|
||
end
|
||
|
||
def counter_f(f, attr, options = {})
|
Also available in: Unified diff
Refs #30784 - MemoryAllocation use react helper
In 8a9922fd we've removed `byte_size_f` last usage.
This is moving the byte_size_f to render the React component, to
seamlessly integrate into the form without breaking any plugins that
were possibly still using it.
Adds posibility for InputFactory components to set validation states.