<%= text_f f, :user, :label => _("Access Key") %> <%= password_f f, :password, :label => _("Secret Key") %> <% regions = f.object.regions rescue [] %> <%= selectable_f(f, :region, regions, {}, {:label => _('Region'), :disabled => regions.empty?, :help_inline => link_to_function(regions.empty? ? _("Load Regions") : _("Test Connection"), "testConnection(this)", :class => "btn + #{regions.empty? ? "" : "btn-success"}", :'data-url' => test_connection_compute_resources_path) + image_tag('/assets/spinner.gif', :id => 'test_connection_indicator', :class => 'hide').html_safe }) %>