Project

General

Profile

« Previous | Next » 

Revision 361f3d61

Added by Ondřej Ezr about 3 years ago

Refs #30288 - improves CPUs counter input

In 22fa163731b38f597e4f96e0c0b345518a360b37 we've introduced React
component to implement the counter funcionality.
This uses the old `counter_f` form helper to render the React component
and effectivelly remove our dependency on the ui.spinner library.

View differences:

app/helpers/form_helper.rb
end
def counter_f(f, attr, options = {})
options[:class] = options[:class].to_s + ' counter_spinner' unless options[:disabled]
options[:help_block] ||= soft_limit_warning_block
text_f(f, attr, options)
end
def soft_limit_warning_block
content_tag(:span, :class => 'maximum-limit hidden') do
icon_text('warning-triangle-o',
content_tag(:span, ' ' + _('Specified value is higher than recommended maximum'), :class => 'error-message'),
:kind => 'pficon')
end
react_form_input('counter', f, attr, options)
end
def submit_or_cancel(f, overwrite = false, args = { })

Also available in: Unified diff