<commit_before>View = require './view'

class FormBaseView extends View

    events: ->
        _.extend super,
            'change input':             'checkForm'
            'keyup input[type="text"]': 'checkForm'
            'blur input[type="text"]':  'checkForm'

            'submit form':              'submit'

            'click #reset-button':      'render'

    initialize: ->
        @checkForm = _.debounce @checkForm, 100

    render: ->
        @$el.html @template
            model: @model?.toJSON()
        
        @checkForm()

        # @$('#help-column').css 'height', "#{ @$('form').height() }px"

    checkForm: ->
        return if @lockdown<commit_msg>Fix reset button submitting form<commit_after>View = require './view'

class FormBaseView extends View

    events: ->
        _.extend super,
            'change input':             'checkForm'
            'keyup input[type="text"]': 'checkForm'
            'blur input[type="text"]':  'checkForm'

            'submit form':              'submit'

            'click #reset-button':      'render'

    initialize: ->
        @checkForm = _.debounce @checkForm, 100

    render: (event) ->
        event.preventDefault() if event
        
        @$el.html @template
            model: @model?.toJSON()
        
        @checkForm()

        # @$('#help-column').css 'height', "#{ @$('form').height() }px"

    checkForm: ->
        return if @lockdown
{'fraction_non_alphanumeric': 0.15034965034965034, 'fraction_numerical': 0.004195804195804196, 'mean_word_length': 1.7257142857142858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4615727', 'n_tokens_mistral': 419, 'n_tokens_neox': 402, 'n_words': 95}