<commit_before>mediaFormView = OrchestraView.extend(
  initialize: (options) ->
    @html = options.html
    @title = options.title
    @loadTemplates [
      'fullPageFormView'
    ]
    return

  render: ->
    $(@el).html @renderTemplate('fullPageFormView',
      html: @html
      listUrl: @listUrl
    )
    $('.js-widget-title', @$el).text @title
    $('.back-to-list', @el).remove()
    $("[data-prototype]", @$el).each ->
      PO.formPrototypes.addPrototype $(this)
      return
    @addEventOnForm()
    return

  addEventOnForm: ->
    viewContext = this
    $("form", @$el).on "submit", (e) ->
      e.preventDefault() # prevent native submit
      $(this).ajaxSubmit
        success: (response) ->
          viewContext.html = response
          viewContext.render()
      return
)
<commit_msg>add loader on form in modal to add media<commit_after>mediaFormView = OrchestraView.extend(
  initialize: (options) ->
    @html = options.html
    @title = options.title
    @loadTemplates [
      'fullPageFormView'
    ]
    return

  render: ->
    $(@el).html @renderTemplate('fullPageFormView',
      html: @html
      listUrl: @listUrl
    )
    $('.js-widget-title', @$el).text @title
    $('.back-to-list', @el).remove()
    $("[data-prototype]", @$el).each ->
      PO.formPrototypes.addPrototype $(this)
      return
    @addEventOnForm()
    return

  addEventOnForm: ->
    viewContext = this
    $("form", @$el).on "submit", (e) ->
      e.preventDefault() # prevent native submit
      $(this).ajaxSubmit
        context:
          button: $(".submit_form",e.target).parent()
          isSave: true
        success: (response) ->
          viewContext.html = response
          viewContext.render()
      return
)

{'fraction_non_alphanumeric': 0.15446685878962535, 'fraction_numerical': 0.0, 'mean_word_length': 2.424063116370809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7489379', 'n_tokens_mistral': 543, 'n_tokens_neox': 542, 'n_words': 109}