<commit_before>- url = url_for_only_path(:action => 'form_field_changed', :id => @edit[:rec_id] || "new")
- currency = Currency.currencies_for_select
= render :partial => "layouts/flash_msg"
#form_div
  %h3
    = _('Basic Info')
  .form-horizontal
    .form-group
      %label.col-md-2.control-label
        = _('Description')
      .col-md-8
        = text_field_tag("description", @edit[:new][:description],
                        :maxlength => ViewHelper::MAX_NAME_LEN, "data-miq_observe" => {:interval => '.5', :url => url}.to_json,
                        :class => "form-control")
        = javascript_tag(javascript_focus('description'))
    .form-group
      %label.col-md-2.control-label
        = _('Type')
      .col-md-8
        - unless @edit[:rec_id]
          = select_tag("rate_type",
            options_for_select(["Compute", "Storage"], @edit[:new][:rate_type]),
            "class" => "selectpicker")
          :javascript
            miqInitSelectPicker();
            miqSelectPickerEvent("rate_type", "#{url}");
        - else
          = _(@edit[:new][:rate_type])


  %hr

  -# Add a new selector for the currencies
  %h3
    = _('Currencies')
  .form-horizontal
    .form-group
      %label.col-md-2.control-label
        = _('Select currency: ')<commit_msg>changed textfield to use `data-miq_focus` instead<commit_after>- url = url_for_only_path(:action => 'form_field_changed', :id => @edit[:rec_id] || "new")
- currency = Currency.currencies_for_select
= render :partial => "layouts/flash_msg"
#form_div
  %h3
    = _('Basic Info')
  .form-horizontal
    .form-group
      %label.col-md-2.control-label
        = _('Description')
      .col-md-8
        = text_field_tag("description", @edit[:new][:description],
                        :maxlength => ViewHelper::MAX_NAME_LEN,
                        "data-miq_observe" => {:interval => '.5', :url => url}.to_json,
                        "data-miq_focus"   => true,
                        :class => "form-control")
    .form-group
      %label.col-md-2.control-label
        = _('Type')
      .col-md-8
        - unless @edit[:rec_id]
          = select_tag("rate_type",
            options_for_select(["Compute", "Storage"], @edit[:new][:rate_type]),
            "class" => "selectpicker")
          :javascript
            miqInitSelectPicker();
            miqSelectPickerEvent("rate_type", "#{url}");
        - else
          = _(@edit[:new][:rate_type])

  %hr

  -# Add a new selector for the currencies
  %h3
    = _('Currencies')
  .form-horizontal
    .form-group
      %label.col-md-2.control-label
        = _('Select currency: ')
{'fraction_non_alphanumeric': 0.16317194052611514, 'fraction_numerical': 0.006099885627144491, 'mean_word_length': 2.231527093596059, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '6601014', 'n_tokens_mistral': 862, 'n_tokens_neox': 838, 'n_words': 138}