<commit_before>ScriptLoader.load('Form');

var ForumForm = new Class({
    Extends: Form,
    initialize: function(element) {
        Asset.css('form.css');
		this.componentElement = $(element);
		this.singlePath = this.componentElement.getProperty('single_template');

        this.form = this.componentElement.getParent('form').addClass('form');

		this.validator = new Validator(this.form);

		this.richEditors = [];

        this.form.getElements('textarea.richEditor').each(function(textarea) {
            var e = new Form.RichEditor(textarea, this, this.fallback_ie);
            ['imgmngr','filelib','sep3','source','sep2'].each(function(control){
                e.toolbar.removeControl(control)
            });
			this.richEditors.push(e);
		}, this);
    }
});<commit_msg>Bug #702 баг с редактированием темы<commit_after>ScriptLoader.load('Form');

var ForumForm = new Class({
    Extends: Form,
    initialize: function(element) {
        Asset.css('form.css');
		this.componentElement = $(element);
		this.singlePath = this.componentElement.getProperty('single_template');

        this.form = this.componentElement.getParent('form').addClass('form');

		this.validator = new Validator(this.form);

		this.richEditors = [];

        this.form.getElements('textarea.richEditor').each(function(textarea) {
            var e = new Form.RichEditor(textarea, this, this.fallback_ie);
            ['imgmngr','filelib','sep3','source','sep2'].each(function(control){
                e.toolbar.removeControl(control)
            });
			this.richEditors.push(e);
		}, this);

        this.form.onsubmit = function(){
            this.richEditors.each(function(editor) {
                editor.onSaveForm();
            });
            if (!this.validator.validate()) {
                return false;
            }
        }.bind(this)

    }
});
{'fraction_non_alphanumeric': 0.15476190476190477, 'fraction_numerical': 0.003787878787878788, 'mean_word_length': 2.884453781512605, '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': '1773411', 'n_tokens_mistral': 567, 'n_tokens_neox': 533, 'n_words': 76}