<%= text_f f, :url, :size => "col-md-8", :help_block => _("e.g. http://openstack:5000/v2.0/tokens"), :help_inline => documentation_button('5.2.6OpenStackNotes') %>
<%= text_f f, :user %>
<%= password_f f, :password %>

<% tenants = f.object.tenants rescue [] %>
<%= selectable_f(f, :tenant, tenants, {}, {:label => _('Tenant'), :disabled => tenants.empty?,
                 :help_inline => link_to_function(tenants.empty? ? _("Load Tenants") : _("Test Connection"), "testConnection(this)",
                 :class => "btn + #{tenants.empty? ? "btn-default" : "btn-success"}",
                 :'data-url' => test_connection_compute_resources_path) + image_tag('/assets/spinner.gif', :id => 'test_connection_indicator', :class => 'hide').html_safe }) %>
