Project

General

Profile

« Previous | Next » 

Revision f2b4b14c

Added by Shlomi Zadok over 7 years ago

Fixes #17438 - Disable selecting IPv6 on import

(cherry picked from commit a4dccd9b55f441172983de16ba60206b15490e81)

View differences:

app/helpers/subnets_helper.rb
def subnet_type_f(f)
field(f, :type, :label => _('Protocol'), :required => true) do
subnet_types.collect do |text, value|
radio_button_f(f, :type, subnet_type_data(value.constantize).merge({:value => value, :text => text, :disabled => !f.object.new_record?}))
radio_button_f(f, :type, subnet_type_data(value.constantize).merge({:value => value, :text => text, :disabled => (!f.object.new_record? || action_name == 'import')}))
end.join(' ').html_safe
end
end

Also available in: Unified diff