<commit_before>/**
 * @author <NAME> <<EMAIL>>
 * @copyright Apestaartje <http://apestaartje.info>
 */

import {AbstractView} from 'bundles/backbone/AbstractView';
import {Exception} from 'lib/exception/Exception';

/**
 * @class FormBuilder
 */
export class FormBuilder extends AbstractView {
    /**
     * Constructor
     *
     * @param {Object} options
     */
    constructor(options) {
        this.tagName = 'form';
        this.className = 'form-horizontal form';
        this.fieldTypes = {};

        super(options);
    }

    /**
     * Add a field type
     *
     * @param {string} identifier
     * @param fieldType
     */
    addFieldType(identifier, fieldType) {
        this.fieldTypes[identifier] = fieldType;
    }

    /**
     * Add a field
     *<commit_msg>path to AbstractView fixed getters for tagName and className fixed constructor<commit_after>/**
 * @author <NAME> <<EMAIL>>
 * @copyright Apestaartje <http://apestaartje.info>
 */

import {AbstractView} from 'bundles/backbone/view/AbstractView';
import {Exception} from 'lib/exception/Exception';

/**
 * @class FormBuilder
 */
export class FormBuilder extends AbstractView {
    get tagName() {
        return 'form';
    }

    get className() {
        return 'form-horizontal form';
    }

    /**
     * Constructor
     *
     * @param {Object} options
     */
    constructor(options) {
        super(options);

        this.fieldTypes = {};
    }

    /**
     * Add a field type
     *
     * @param {string} identifier
     * @param fieldType
     */
    addFieldType(identifier, fieldType) {
        this.fieldTypes[identifier] = fieldType;
    }

    /**
     * Add a field
     *
{'fraction_non_alphanumeric': 0.1318615751789976, 'fraction_numerical': 0.0, 'mean_word_length': 2.354, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5455472', 'n_tokens_mistral': 500, 'n_tokens_neox': 491, 'n_words': 114}