<commit_before>Ext.define('devilry.extjshelpers.forms.administrator.Assignment', {
    extend: 'Ext.form.Panel',
    alias: 'widget.administrator_assignmentform',
    cls: 'widget-assignmentform',
    requires: ['devilry.extjshelpers.formfields.ForeignKeySelector'],

    suggested_windowsize: {
        width: 600,
        height: 450
    },

    flex: 6,

    layout: {
        type: 'vbox',
        align: 'stretch'
    },

    fieldDefaults: {
        labelAlign: 'top',
        labelWidth: 100,
        labelStyle: 'font-weight:bold'
    },
    defaults: {
        margins: '0 0 10 0'
    },


    items: [{
        name: "short_name",
        fieldLabel: "Short name",
        xtype: 'textfield',
        emptyText: 'Example: firstassignment'
    }, {
        name: "long_name",
        fieldLabel: "Long name",
        xtype: 'textfield',
        emptyText: 'Example: Obligatory assignment 1'
    }, {
        name: "parentnode",
        fieldLabel: "Period",
        xtype: 'foreignkeyselector',
        model: 'devilry.apps.administrator.simplified.SimplifiedPeriod',
        emptyText: 'Select a period',
        displayTpl: '{long_name} ({parentnode__short_name}.{short_name})',
        dropdownTpl: '<div class="important">{parentnode__short_name}.{short_name}</div>'+
            '<div class="unimportant">{parentnode__long_name}</div>' +
            '<div class="unimportant">{long_name}</div>'
    }, {
        name: "publishing_time",
        fieldLabel: "Publishing time",
        xtype: 'datefield',
        format: 'Y-m-d H:i:s',
        emptyText: 'YYYY-MM-DD hh:mm:ss',
        value: new Date()
    }],

    help: [
        {state: 'new', text: 'Set up the mandatory properties of an assignment. Further customization is available after you create the assignment.'},
        '<strong>Short name</strong> is a short name used when the long name takes to much space. Short name can only contain english lower-case letters, numbers and underscore (_).',
        '<strong>Long name</strong> is a longer descriptive name which can contain any character.',
        'You must choose the <strong>period</strong> where this period belongs. A period is normally a semester.',
        'The <strong>publishing time</strong> is the time when students will be able to start adding deliveries on the assignment.'
    ]
});
<commit_msg>apps.extjshelpers: Updated Assignment form to user devilrydatetimefield.<commit_after>Ext.define('devilry.extjshelpers.forms.administrator.Assignment', {
    extend: 'Ext.form.Panel',
    alias: 'widget.administrator_assignmentform',
    cls: 'widget-assignmentform',
    requires: [
        'devilry.extjshelpers.formfields.ForeignKeySelector',
        'devilry.extjshelpers.formfields.DateTimeField'
    ],

    suggested_windowsize: {
        width: 600,
        height: 450
    },

    flex: 6,

    layout: {
        type: 'vbox',
        align: 'stretch'
    },

    fieldDefaults: {
        labelAlign: 'top',
        labelWidth: 100,
        labelStyle: 'font-weight:bold'
    },
    defaults: {
        margins: '0 0 10 0'
    },


    items: [{
        name: "short_name",
        fieldLabel: "Short name",
        xtype: 'textfield',
        emptyText: 'Example: firstassignment'
    }, {
        name: "long_name",
        fieldLabel: "Long name",
        xtype: 'textfield',
        emptyText: 'Example: Obligatory assignment 1'
    }, {
        name: "parentnode",
        fieldLabel: "Period",
        xtype: 'foreignkeyselector',
        model: 'devilry.apps.administrator.simplified.SimplifiedPeriod',
        emptyText: 'Select a period',
        displayTpl: '{long_name} ({parentnode__short_name}.{short_name})',
        dropdownTpl: '<div class="important">{parentnode__short_name}.{short_name}</div>'+
            '<div class="unimportant">{parentnode__long_name}</div>' +
            '<div class="unimportant">{long_name}</div>'
    }, {
        name: "publishing_time",
        fieldLabel: "Publishing time",
        xtype: 'devilrydatetimefield',
        value: new Date()
    }],

    help: [
        {state: 'new', text: 'Set up the mandatory properties of an assignment. Further customization is available after you create the assignment.'},
        '<strong>Short name</strong> is a short name used when the long name takes to much space. Short name can only contain english lower-case letters, numbers and underscore (_).',
        '<strong>Long name</strong> is a longer descriptive name which can contain any character.',
        'You must choose the <strong>period</strong> where this period belongs. A period is normally a semester.',
        'The <strong>publishing time</strong> is the time when students will be able to start adding deliveries on the assignment.'
    ]
});

{'fraction_non_alphanumeric': 0.12310606060606061, 'fraction_numerical': 0.006734006734006734, 'mean_word_length': 2.739575137686861, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '22485', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1368, 'n_words': 375}