<commit_before>%fieldset#provider_type
  = label_tag "Provider: "
  = select(:provider_account, :provider_id, options_for_select(@providers.map{ |p| [p.name, p.id] }, :selected => @selected_provider.id))
  = restful_submit_tag "Choose", 'set_selected_provider',set_selected_provider_provider_accounts_path, 'GET', :class => 'button'
  = label_tag "Cloud type: "
  = @selected_provider.provider_type.name
  - unless @selected_provider.provider_type.codename.nil?
    = render :partial => "provider_form", :locals => { :provider_type => @selected_provider.provider_type}
  - else
    = flash.now[:warning] = "You don't have any provider yet"

:javascript
  $(document).ready(function(){
      var selected_provider;
      $("#provider_account_provider_id").change(function()
      {
          selected_provider = $("option:selected").attr('value');
          $.get("#{set_selected_provider_provider_accounts_url}", {'provider_account[provider_id]':selected_provider},
            function(result) {
              $("#provider_type").html(result);
            }
          );

       });
  });<commit_msg>Fix JS method for selecting Provider in New ProviderAccount view<commit_after>%fieldset#provider_type
  = label_tag "Provider: "
  = select(:provider_account, :provider_id, options_for_select(@providers.map{ |p| [p.name, p.id] }, :selected => @selected_provider.id))
  = restful_submit_tag "Choose", 'set_selected_provider',set_selected_provider_provider_accounts_path, 'GET', :class => 'button'
  = label_tag "Cloud type: "
  = @selected_provider.provider_type.name
  - unless @selected_provider.provider_type.codename.nil?
    = render :partial => "provider_form", :locals => { :provider_type => @selected_provider.provider_type}
  - else
    = flash.now[:warning] = "You don't have any provider yet"

:javascript
  $(document).ready(function(){
      var selected_provider;
      $("#provider_account_provider_id").change(function()
      {
          selected_provider = $(this).find("option:selected").attr('value');
          $.get("#{set_selected_provider_provider_accounts_url}", {'provider_account[provider_id]':selected_provider},
            function(result) {
              $("#provider_type").html(result);
            }
          );

       });
  });
{'fraction_non_alphanumeric': 0.14708480565371024, 'fraction_numerical': 0.0, 'mean_word_length': 4.206896551724138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4438169', 'n_tokens_mistral': 674, 'n_tokens_neox': 671, 'n_words': 105}