<%= text_f f, :url, :class => "input-xlarge", :help_block => _("e.g. qemu://host.example.com/system") %> <% hypervisor = f.object.hypervisor.uuid rescue nil%> <% if hypervisor -%> <%= f.hidden_field :uuid, :value => hypervisor %> <% end -%> <%= link_to_function _("Test Connection"), "testConnection(this)", :class => "btn + #{hypervisor.nil? ? "" : "btn-success"}", :'data-url' => test_connection_compute_resources_path %> <%= image_tag('/assets/spinner.gif', :id => 'test_connection_indicator', :class => 'hide') %>