<commit_before>%p
  = label :provider_account, t('provider_accounts.index.provider_account_name')
  = text_field :provider_account, :label, :class => 'em long'
- CredentialDefinition::CREDENTIAL_DEFINITIONS_ORDER.each do |cred_order|
  - @provider_account.all_credentials(@provider).each do |cred|
    - if cred_order == cred.credential_definition.name
      %p
        = label_tag cred.credential_definition.label
        - if cred.credential_definition.input_type == "password"
          = password_field_tag "provider_account[credentials_hash][#{cred.credential_definition.name}]", cred.value
        - elsif cred.credential_definition.input_type == "file"
          %span.text_instead_input= t("provider_accounts.edit.file_already_uploaded") if cred.value
          = file_field_tag "provider_account[credentials_hash][#{cred.credential_definition.name}]", :value => cred.value
        - else
          = text_field_tag "provider_account[credentials_hash][#{cred.credential_definition.name}]", cred.value

%p
  = label :provider_account, t('provider_accounts.index.priority')
  = text_field :provider_account, :priority, :class => 'em'
%p
  = label_tag t("quotas.quota")
  = text_field :quota, :maximum_running_instances, :title => t('provider_accounts.form.quota_instances'), :value => @quota.maximum_running_instances || t('provider_accounts.properties.unlimited'), :id => "quota_instances"
  (
  %button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota(\"quota_instances\");" }<>
    = t('provider_accounts.form.unlimited_quota')
  )

:javascript
  function set_unlimited_quota(elem_id) {
    $("#" + elem_id)[0].value = t('provider_accounts.properties.unlimited');
  }<commit_msg>BZ 783904 PA quota when updated to unlimited, text should be automatically set to Unlimited.<commit_after>%p
  = label :provider_account, t('provider_accounts.index.provider_account_name')
  = text_field :provider_account, :label, :class => 'em long'
- CredentialDefinition::CREDENTIAL_DEFINITIONS_ORDER.each do |cred_order|
  - @provider_account.all_credentials(@provider).each do |cred|
    - if cred_order == cred.credential_definition.name
      %p
        = label_tag cred.credential_definition.label
        - if cred.credential_definition.input_type == "password"
          = password_field_tag "provider_account[credentials_hash][#{cred.credential_definition.name}]", cred.value
        - elsif cred.credential_definition.input_type == "file"
          %span.text_instead_input= t("provider_accounts.edit.file_already_uploaded") if cred.value
          = file_field_tag "provider_account[credentials_hash][#{cred.credential_definition.name}]", :value => cred.value
        - else
          = text_field_tag "provider_account[credentials_hash][#{cred.credential_definition.name}]", cred.value

%p
  = label :provider_account, t('provider_accounts.index.priority')
  = text_field :provider_account, :priority, :class => 'em'
%p
  = label_tag t("quotas.quota")
  = text_field :quota, :maximum_running_instances, :title => t('provider_accounts.form.quota_instances'), :value => @quota.maximum_running_instances || t('provider_accounts.properties.unlimited'), :id => "quota_instances"
  (
  %button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota(\"quota_instances\");" }
    = t('provider_accounts.form.unlimited_quota')
  )

:javascript
  function set_unlimited_quota(elem_id) {
    $("#" + elem_id)[0].value = "#{t('provider_accounts.properties.unlimited')}";
  }
{'fraction_non_alphanumeric': 0.1355593607305936, 'fraction_numerical': 0.00228310502283105, 'mean_word_length': 5.149122807017544, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 20, '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': '6644012', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1129, 'n_words': 166}