<commit_before><%= form_for application, url: doorkeeper_submit_path(application), html: { role: 'form' } do |f| %>
  <% if application.errors.any? %>
    <div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div>
  <% end %>

  <div class="form-group row">
    <%= f.label :name, class: 'col-sm-2 col-form-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.text_field :name, class: "form-control #{ 'is-invalid' if application.errors[:name].present? }", required: true %>
      <%= doorkeeper_errors_for application, :name %>
    </div>
  </div>

  <div class="form-group row">
    <%= f.label :redirect_uri, class: 'col-sm-2 col-form-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.text_area :redirect_uri, class: "form-control #{ 'is-invalid' if application.errors[:redirect_uri].present? }" %>
      <%= doorkeeper_errors_for application, :redirect_uri %>
      <span class="form-text text-secondary">
        <%= t('doorkeeper.applications.help.redirect_uri') %>
      </span>

      <% if Doorkeeper.configuration.native_redirect_uri %>
          <span class="form-text text-secondary">
            <%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: content_tag(:code, class: 'bg-light') { Doorkeeper.configuration.native_redirect_uri }) %>
          </span>
      <% end %>

      <% if Doorkeeper.configuration.allow_blank_redirect_uri? %>
        <span class="form-text text-secondary">
          <%= t('doorkeeper.applications.help.blank_redirect_uri') %>
        </span>
      <% end %>
    </div>
  </div>

  <div class="form-group row">
    <%= f.label :confidential, class: 'col-sm-2 form-check-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.check_box :confidential, class: "checkbox #{ 'is-invalid' if application.errors[:confidential].present? }" %>
      <%= doorkeeper_errors_for application, :confidential %>
      <span class="form-text text-secondary">
        <%= t('doorkeeper.applications.help.confidential') %>
      </span>
    </div>
  </div>

  <div class="form-group row">
    <%= f.label :scopes, class: 'col-sm-2 col-form-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.text_field :scopes, class: "form-control #{ 'has-error' if application.errors[:scopes].present? }" %>
      <%= doorkeeper_errors_for application, :scopes %><commit_msg>Fix for blank redirect URI check in admin panel<commit_after><%= form_for application, url: doorkeeper_submit_path(application), html: { role: 'form' } do |f| %>
  <% if application.errors.any? %>
    <div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div>
  <% end %>

  <div class="form-group row">
    <%= f.label :name, class: 'col-sm-2 col-form-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.text_field :name, class: "form-control #{ 'is-invalid' if application.errors[:name].present? }", required: true %>
      <%= doorkeeper_errors_for application, :name %>
    </div>
  </div>

  <div class="form-group row">
    <%= f.label :redirect_uri, class: 'col-sm-2 col-form-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.text_area :redirect_uri, class: "form-control #{ 'is-invalid' if application.errors[:redirect_uri].present? }" %>
      <%= doorkeeper_errors_for application, :redirect_uri %>
      <span class="form-text text-secondary">
        <%= t('doorkeeper.applications.help.redirect_uri') %>
      </span>

      <% if Doorkeeper.configuration.native_redirect_uri %>
          <span class="form-text text-secondary">
            <%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: content_tag(:code, class: 'bg-light') { Doorkeeper.configuration.native_redirect_uri }) %>
          </span>
      <% end %>

      <% if Doorkeeper.configuration.allow_blank_redirect_uri?(application) %>
        <span class="form-text text-secondary">
          <%= t('doorkeeper.applications.help.blank_redirect_uri') %>
        </span>
      <% end %>
    </div>
  </div>

  <div class="form-group row">
    <%= f.label :confidential, class: 'col-sm-2 form-check-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.check_box :confidential, class: "checkbox #{ 'is-invalid' if application.errors[:confidential].present? }" %>
      <%= doorkeeper_errors_for application, :confidential %>
      <span class="form-text text-secondary">
        <%= t('doorkeeper.applications.help.confidential') %>
      </span>
    </div>
  </div>

  <div class="form-group row">
    <%= f.label :scopes, class: 'col-sm-2 col-form-label font-weight-bold' %>
    <div class="col-sm-10">
      <%= f.text_field :scopes, class: "form-control #{ 'has-error' if application.errors[:scopes].present? }" %>
      <%= doorkeeper_errors_for application, :scopes %>
{'fraction_non_alphanumeric': 0.18252506650296704, 'fraction_numerical': 0.004910988336402701, 'mean_word_length': 3.439600363306085, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, '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': '4222346', 'n_tokens_mistral': 1686, 'n_tokens_neox': 1571, 'n_words': 294}