<commit_before>
<%= form_for page_tab, as: :page_tab, url: {controller: :fb_app_plugin_page_tab, action: :admin}, html: {id: "edit_tab_"+page_tab.id, onsubmit: "return fb_app.page_tab.config.save($(this))"} do |f| %>

  <%= hidden_field_tag :signed_request, signed_request %>
  <%= hidden_field_tag :page_id, page_tab.page_id %>
  <%= f.hidden_field :profile_id, value: profile.id %>
  <%= f.hidden_field :page_id %>

  <%= f.label t("fb_app_plugin.views.myprofile.catalogs.catalog_type_chooser_label") %>
    <%= f.select :config_type,
    FbAppPlugin::PageTab::ConfigTypes.map{ |type| [t("fb_app_plugin.models.page_tab.types.#{type}"), type] },
    {}, onchange: 'fb_app.page_tab.config.change_type($(this))', class: 'form-control' %>

  <% FbAppPlugin::PageTab::ConfigTypes.each do |type| %>
    <div class="config-type config-type-<%= type %>">
      <%= render "fb_app_plugin_page_tab/configure_#{type}", f: f, page_tab: page_tab %>
    </div>
  <% end %>

  <% if page_tab.new_record? %>
    <%= submit_button :add, t('fb_app_plugin.views.page_tab.add'), onclick: 'return fb_app.page_tab.config.add($(this.form))', class: 'fb-app-submit-page-tab-options' %><commit_msg>Add name to the catalogs<commit_after>
<%= form_for page_tab, as: :page_tab, url: {controller: :fb_app_plugin_page_tab, action: :admin}, html: {id: "edit_tab_"+page_tab.id, onsubmit: "return fb_app.page_tab.config.save($(this))"} do |f| %>

  <%= hidden_field_tag :signed_request, signed_request %>
  <%= hidden_field_tag :page_id, page_tab.page_id %>
  <%= f.hidden_field :profile_id, value: profile.id %>
  <%= f.hidden_field :page_id %>

  <%= f.label t("fb_app_plugin.views.myprofile.catalogs.catalog_name_label") %>
  <%= f.text_field :name %>
  
  <%= f.label t("fb_app_plugin.views.myprofile.catalogs.catalog_type_chooser_label") %>
    <%= f.select :config_type,
    FbAppPlugin::PageTab::ConfigTypes.map{ |type| [t("fb_app_plugin.models.page_tab.types.#{type}"), type] },
    {}, onchange: 'fb_app.page_tab.config.change_type($(this))', class: 'form-control' %>

  <% FbAppPlugin::PageTab::ConfigTypes.each do |type| %>
    <div class="config-type config-type-<%= type %>">
      <%= render "fb_app_plugin_page_tab/configure_#{type}", f: f, page_tab: page_tab %>
    </div>
  <% end %>

  <% if page_tab.new_record? %>
    <%= submit_button :add, t('fb_app_plugin.views.page_tab.add'), onclick: 'return fb_app.page_tab.config.add($(this.form))', class: 'fb-app-submit-page-tab-options' %>
{'fraction_non_alphanumeric': 0.1929611650485437, 'fraction_numerical': 0.0, 'mean_word_length': 5.244949494949495, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '4824487', 'n_tokens_mistral': 999, 'n_tokens_neox': 935, 'n_words': 142}