Project

General

Profile

« Previous | Next » 

Revision f9a77319

Added by Amos Benari over 10 years ago

fixes #3338 - grey out VM form when editing is not supported

View differences:

app/views/compute_resources_vms/form/vmware/_network.html.erb
<div class="fields">
<% if (networks = compute_resource.networks).any? %>
<%= select_f f, :type, compute_resource.nictypes, :first, :last, { },
:class => "span2",
:label => _('NIC type'),
:disabled => !new
:class => "span2 disable-unsupported",
:label => _('NIC type')
%>
<%= select_f f, :network, networks, :id, :name, { },
:class => "span2",
:class => "span2 disable-unsupported",
:label => _('Network'),
:disabled => !new,
:help_inline => !new ? nil : remove_child_link("X", f, { :method => :'_delete', :title => _('remove network interface'), :class => 'label label-important' })
:help_inline => remove_child_link("X", f, { :method => :'_delete', :title => _('remove network interface'), :class => 'label label-important disable-unsupported' })
%>
<% end %>
</div>

Also available in: Unified diff