<commit_before>// Load Pnotify
import 'pnotify/dist/pnotify.css';
import PNotify from 'pnotify';
PNotify.prototype.options.styling = "bootstrap3";
PNotify.prototype.options.styling = "fontawesome";
// jquery
import { $ } from 'meteor/jquery';
// Load Projects and Settings
import { Projects } from '../../../../../lib/collections/projects.js';
import { Settings } from '../../../../../lib/collections/settings.js';
import { Activities } from '../../../../../lib/collections/activities.js';
import { Contradictions } from '../../../../../lib/collections/contradictions.js';

/*****************************************************************************/
/* ContradictionEdit: Event Handlers */
/*****************************************************************************/
Template.ContradictionEdit.events({
    // Edit the contradiction
    'click #edit-save-contradiction-button': function(event, template) {
        event.preventDefault();
        // Get the data from the form
        var newTitle = $('#new-contradiction-title').val();
        var newDescription = $('#new-contradiction-description').val();
        var newResource = $('#new-contradiction-resource').val();
        var newType = $('#new-contradiction-type').val();
        var newWeight = parseInt($('#new-contradiction-weight').val());
        var newFirstNode = $('#new-contradiction-first-node option:selected').data('option');
        var newSecondNode = $('#new-contradiction-second-node option:selected').data('option');
        // Format data from the form as an object
        contradictionData = {
            "title": newTitle,
            "description": newDescription,<commit_msg>Fix contradiction edit<commit_after>// Load Pnotify
import 'pnotify/dist/pnotify.css';
import PNotify from 'pnotify';
PNotify.prototype.options.styling = "bootstrap3";
PNotify.prototype.options.styling = "fontawesome";
// jquery
import { $ } from 'meteor/jquery';
// Load Projects and Settings
import { Projects } from '../../../../../lib/collections/projects.js';
import { Settings } from '../../../../../lib/collections/settings.js';
import { Activities } from '../../../../../lib/collections/activities.js';
import { ActivityElements } from '../../../../../lib/collections/activity_elements.js';
import { Contradictions } from '../../../../../lib/collections/contradictions.js';

/*****************************************************************************/
/* ContradictionEdit: Event Handlers */
/*****************************************************************************/
Template.ContradictionEdit.events({
    // Edit the contradiction
    'click #edit-save-contradiction-button': function(event, template) {
        event.preventDefault();
        // Get the data from the form
        var newTitle = $('#new-contradiction-title').val();
        var newDescription = $('#new-contradiction-description').val();
        var newResource = $('#new-contradiction-resource').val();
        var newType = $('#new-contradiction-type').val();
        var newWeight = parseInt($('#new-contradiction-weight').val());
        var newFirstNode = $('#new-contradiction-first-node option:selected').data('option');
        var newSecondNode = $('#new-contradiction-second-node option:selected').data('option');
        // Format data from the form as an object
        contradictionData = {
            "title": newTitle,
            "description": newDescription,
{'fraction_non_alphanumeric': 0.2575094779819189, 'fraction_numerical': 0.0005832604257801109, 'mean_word_length': 3.448767833981842, 'pattern_counts': {'":': 4, '<': 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': '4156488', 'n_tokens_mistral': 879, 'n_tokens_neox': 864, 'n_words': 187}