<commit_before>= form_for @broadcast, html: { class: 'form-horizontal' } do |f|
  - if @broadcast.errors.any?
    .callout.callout-danger
      %strong
        = pluralize @broadcast.errors.count, 'error'
        prohibited this broadcast from being saved
      %ul
        - @broadcast.errors.full_messages.each do |message|
          %li= message

  .form-group
    = f.label :publish_date, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :publish_date, class: 'datepicker form-control', value: @broadcast.publish_date ? @broadcast.publish_date.strftime('%m/%d/%Y') : ''

  .form-group
    .col-md-offset-2.col-md-10
      .checkbox
        %label
          = f.check_box :published
          Published

  .form-group
    = f.label :category_id, class: 'col-md-2 control-label'
    .col-md-10
      = f.select :category_id, Category.current.pluck(:name, :id), { include_blank: true }, class: 'form-control'

  .form-group
    = f.label :title, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :title, class: 'form-control', data: { object: (@broadcast.new_record? ? 'create-slug' : ''), target: '#broadcast_slug' }

  .form-group{ style: "#{'display:none' if @broadcast.new_record? && !@broadcast.errors.key?(:slug)}"}
    = f.label :slug, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :slug, class: 'form-control'

  .form-group
    = f.label :short_description, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :short_description, class: 'form-control'

  .form-group
    = f.label :keywords, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :keywords, class: 'form-control'

  .form-group
    = f.label :description, class: 'col-md-2 control-label'
    .col-md-10
      .preview-container
        .preview-header
          .pull-right
            = render 'replies/rich_text_editor_buttons', target: "#broadcast_description"
          = link_to 'Write', '#', data: { object: 'view-content-markdown' }, class: 'preview-tab active', tabindex: '-1'
          = link_to 'Preview', '#', data: { object: 'view-content-preview', content: '#broadcast_description' }, class: 'preview-tab', tabindex: '-1'
        .preview-body
          #content_markdown
            = f.text_area :description, rows: [[15, @broadcast.description.to_s.count("\n") + 1].max, 25].min, class: 'preview-control filedrag-container', data: { object: 'expandable-text-area dropfile', default_rows: 15, upload_url: upload_images_path(update: '#broadcast_description', format: 'js'), fallback_url: new_image_path, log_id: '#log_new' }
            #log_new.filedrag
              Drag images above to insert into post.
          #content_preview.broadcast{ style: 'display:none' }


  .form-group
    .col-md-offset-2.col-md-10
      .checkbox
        %label
          = f.check_box :pinned
          Pinned

  .form-group
    .col-md-offset-2.col-md-10
      .checkbox
        %label
          = f.check_box :archived
          Archived

  .form-group
    .col-md-10.col-md-offset-2
      = f.submit nil, class: 'btn btn-primary'
      = cancel<commit_msg>Fixed update button names for blog posts<commit_after>= form_for @broadcast, html: { class: 'form-horizontal' } do |f|
  - if @broadcast.errors.any?
    .callout.callout-danger
      %strong
        = pluralize @broadcast.errors.count, 'error'
        prohibited this broadcast from being saved
      %ul
        - @broadcast.errors.full_messages.each do |message|
          %li= message

  .form-group
    = f.label :publish_date, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :publish_date, class: 'datepicker form-control', value: @broadcast.publish_date ? @broadcast.publish_date.strftime('%m/%d/%Y') : ''

  .form-group
    .col-md-offset-2.col-md-10
      .checkbox
        %label
          = f.check_box :published
          Published

  .form-group
    = f.label :category_id, class: 'col-md-2 control-label'
    .col-md-10
      = f.select :category_id, Category.current.pluck(:name, :id), { include_blank: true }, class: 'form-control'

  .form-group
    = f.label :title, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :title, class: 'form-control', data: { object: (@broadcast.new_record? ? 'create-slug' : ''), target: '#broadcast_slug' }

  .form-group{ style: "#{'display:none' if @broadcast.new_record? && !@broadcast.errors.key?(:slug)}"}
    = f.label :slug, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :slug, class: 'form-control'

  .form-group
    = f.label :short_description, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :short_description, class: 'form-control'

  .form-group
    = f.label :keywords, class: 'col-md-2 control-label'
    .col-md-10
      = f.text_field :keywords, class: 'form-control'

  .form-group
    = f.label :description, class: 'col-md-2 control-label'
    .col-md-10
      .preview-container
        .preview-header
          .pull-right
            = render 'replies/rich_text_editor_buttons', target: "#broadcast_description"
          = link_to 'Write', '#', data: { object: 'view-content-markdown' }, class: 'preview-tab active', tabindex: '-1'
          = link_to 'Preview', '#', data: { object: 'view-content-preview', content: '#broadcast_description' }, class: 'preview-tab', tabindex: '-1'
        .preview-body
          #content_markdown
            = f.text_area :description, rows: [[15, @broadcast.description.to_s.count("\n") + 1].max, 25].min, class: 'preview-control filedrag-container', data: { object: 'expandable-text-area dropfile', default_rows: 15, upload_url: upload_images_path(update: '#broadcast_description', format: 'js'), fallback_url: new_image_path, log_id: '#log_new' }
            #log_new.filedrag
              Drag images above to insert into post.
          #content_preview.broadcast{ style: 'display:none' }


  .form-group
    .col-md-offset-2.col-md-10
      .checkbox
        %label
          = f.check_box :pinned
          Pinned

  .form-group
    .col-md-offset-2.col-md-10
      .checkbox
        %label
          = f.check_box :archived
          Archived

  .form-group
    .col-md-10.col-md-offset-2
      = f.submit @broadcast.new_record? ? 'Create Blog Post' : 'Update Blog Post', class: 'btn btn-primary'
      = link_to 'Cancel', (@broadcast.new_record? ? broadcasts_path : @broadcast), class: 'btn btn-default'
{'fraction_non_alphanumeric': 0.15192038563209453, 'fraction_numerical': 0.013061732234489193, 'mean_word_length': 2.656623081296191, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3612194', 'n_tokens_mistral': 2228, 'n_tokens_neox': 2166, 'n_words': 446}