Project

General

Profile

« Previous | Next » 

Revision 1f71c494

Added by Tomer Brisker over 8 years ago

Fixes #12204 - Show interface form helptext in popovers

Refs #12204 - Resize interface modal, fields and labels

To cause virtual network settings to display correcty changes were also needed
in the layout of the compute attribute forms.

View differences:

app/views/compute_resources_vms/form/libvirt/_network.html.erb
{ :label => _('Network type'),
:disabled => !new_host,
:onchange => 'libvirt_network_selected(this)',
:class => 'libvirt_network without_select2'
:class => 'libvirt_network without_select2',
:label_size => "col-md-3"
} %>
<div id='nat' class='<%= 'hide' if f.object.type != 'network' %>'>
<%= selectable_f f, :network, nat.map(&:name),
{ :include_blank => nat.any? ? false : _("No networks") },
{ :class => "col-md-2 libvirt_nat without_select2", :label => _("Network"), :disabled => (f.object.type != 'network' || !new_host) } %>
{ :class => "libvirt_nat without_select2", :label => _("Network"), :disabled => (f.object.type != 'network' || !new_host), :label_size => "col-md-3" } %>
</div>
<div id='bridge' class='<%= 'hide' if f.object.type && (f.object.type != 'bridge') %>'>
<% if bridge.any? %>
<%= selectable_f f, :bridge, bridge.map(&:name),
{ :include_blank => bridge.any? ? false : _("No bridges") },
{ :class => "col-md-2 libvirt_bridge without_select2", :label => _("Network"), :disabled => ((f.object.type && (f.object.type != 'bridge')) || !new_host) } %>
{ :class => "libvirt_bridge without_select2", :label => _("Network"), :disabled => ((f.object.type && (f.object.type != 'bridge')) || !new_host), :label_size => "col-md-3" } %>
<% else %>
<%= text_f f, :bridge, :class => "col-md-2 libvirt_bridge", :label => _("Network"), :help_block => _("your libvirt host does not support interface listing, please enter here the bridge name (e.g. br0)"), :disabled => !new_host %>
<%= text_f f, :bridge, :class => "libvirt_bridge", :label => _("Network"), :help_block => _("your libvirt host does not support interface listing, please enter here the bridge name (e.g. br0)"), :disabled => !new_host, :label_size => "col-md-3" %>
<% end %>
</div>
<%= selectable_f f, :model, %w(virtio rtl8139 ne2k_pci pcnet e1000), {},
{ :label => _('NIC type'), :class => 'col-md-2 without_select2', :disabled => !new_host } %>
{ :label => _('NIC type'), :class => 'without_select2', :disabled => !new_host, :label_size => "col-md-3" } %>

Also available in: Unified diff