<commit_before>package priori.view.form;

import priori.style.font.PriFontStyle;

class PriFormLabel extends PriFormElementBase {

    @:isVar public var formElement(default, set):PriFormElementBase;
    @:isVar public var text(default, set):String;

    public function new() {
        super();

        this.text = "label";
        this.fontSize = 12;
    }

    override private function getComponentCode():String {
        return '<label style="margin:0px;padding:0px;"></label>';
    }

    @:noCompletion private function set_text(value:String) {
        this.text = value;
        this._baseElement.text(value);

        return value;
    }


    private function set_formElement(value:PriFormElementBase) {
        this.formElement = value;

        if (value == null) {
            this._baseElement.removeAttr("for");
        } else {
            this._baseElement.attr("for", this.formElement.fieldId);
        }


        return value;
    }

}<commit_msg>Multiline options form Form label objects<commit_after>package priori.view.form;

import priori.style.font.PriFontStyle;

class PriFormLabel extends PriFormElementBase {

    @:isVar public var formElement(default, set):PriFormElementBase;
    @:isVar public var text(default, set):String;

    public var multiLine(get, set):Bool;
    private var __multiLine:Bool = true;

    public function new() {
        super();

        this.text = "label";
        this.fontSize = 12;
    }

    override private function getComponentCode():String {
        return '<label style="margin:0px;padding:0px;"></label>';
    }

    @:noCompletion private function set_text(value:String) {
        this.text = value;
        this._baseElement.text(value);

        return value;
    }

    private function get_multiLine():Bool return this.__multiLine;
    private function set_multiLine(value:Bool):Bool {
        if (this.__multiLine != value) {
            this.__multiLine = value;

            if (value) this._baseElement.css("white-space", "");
            else this._baseElement.css("white-space", "nowrap");
        }

        return value;
    }

    private function set_formElement(value:PriFormElementBase) {
        this.formElement = value;

        if (value == null) {
            this._baseElement.removeAttr("for");
        } else {
            this._baseElement.attr("for", this.formElement.fieldId);
        }


        return value;
    }

}
{'fraction_non_alphanumeric': 0.11419114604882086, 'fraction_numerical': 0.0033098882912701694, 'mean_word_length': 2.6251874062968517, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '646887', 'n_tokens_mistral': 713, 'n_tokens_neox': 678, 'n_words': 146}