Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #3134 - disable vSphere fields on host edit, fix clone behavior
- Loading branch information
Showing
4 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
app/views/compute_resources_vms/form/vmware/_network.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
<div class="fields"> | ||
<% if (networks = compute_resource.networks).any? -%> | ||
<%= selectable_f f, :type, compute_resource.nictypes.keys, { }, | ||
<%= select_f f, :type, compute_resource.nictypes, :first, :last, { }, | ||
:class => "span2", | ||
:label => _('NIC type') | ||
:label => _('NIC type'), | ||
:disabled => !new | ||
%> | ||
<%= selectable_f f, :network, networks, { }, | ||
<%= select_f f, :network, networks, :id, :name, { }, | ||
:class => "span2", | ||
:label => _('Network'), | ||
:help_inline => remove_child_link("X", f, { :method => :'_delete', :title => _('remove network interface'), :class => 'label label-important' }) %> | ||
:disabled => !new, | ||
:help_inline => !new ? nil : remove_child_link("X", f, { :method => :'_delete', :title => _('remove network interface'), :class => 'label label-important' }) | ||
%> | ||
<% end -%> | ||
</div> |
11 changes: 6 additions & 5 deletions
11
app/views/compute_resources_vms/form/vmware/_volume.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<div class="fields"> | ||
<%= selectable_f f, :datastore, compute_resource.datastores, { }, :class => "span2", :label => _("Data Store") %> | ||
<%= text_f f, :name, :class => "input-mini", :label => "Name" %> | ||
<%= selectable_f f, :datastore, compute_resource.datastores, { }, :class => "span2", :label => _("Data Store"), :disabled => !new %> | ||
<%= text_f f, :name, :class => "input-mini", :label => "Name", :disabled => !new %> | ||
<%= text_f f, :size_gb, | ||
:class => "input-mini", | ||
:label => _("Size (GB)") %> | ||
:label => _("Size (GB)"), | ||
:disabled => !new %> | ||
<%= checkbox_f f, :thin, { | ||
:checked => true, | ||
:label => _("Thin provision"), | ||
:help_inline => remove_child_link("X", f, { :method => :'_delete', :title => _('remove volume'), :class => 'label label-important' }) }, | ||
:disabled => !new, | ||
:help_inline => !new ? nil : remove_child_link("X", f, { :method => :'_delete', :title => _('remove volume'), :class => 'label label-important', :disabled => !new })}, | ||
true, | ||
false %> | ||
</div> |