<commit_before>{% extends 'wm/base.html' %}
{% load i18n %}
{% load staticfiles %}
{% load crispy_forms_tags %}
{% load mptt_tags %}

{% block extra_head %}
<link rel="stylesheet" href="{% static 'vakata-jstree/themes/default/style.min.css' %}" />
<script src="{% static 'vakata-jstree/jstree.min.js' %}"></script>
<script>
$(function() {
	$('#tree').on('changed.jstree', function(e, data) {
		var obj = data.selected;
		/*var li = $('#' + obj[0]);
		alert(li.text().trim());*/
		var group_id = obj[0].substr(5);
		$('#id_group').val(group_id);
	});
});

$(function() {
	$('#tree').jstree({
		"core" : {
			"multiple" : false,
		},
	});
});
</script>

{% endblock %}

{% block title %}{% trans "Edit article" %}{% endblock %}

{% block content %}

<h1>{% trans "Edit article" %}</h1>

<div class="col-md-6">

<div class="panel panel-primary">
<div class="panel-heading">{% trans "Article details" %}</div>
<div id="article_form" class="panel-body">
<form method="POST" action="." class="uniForm">
{% csrf_token %}

<p><button type="submit" class="btn btn-primary">{% trans "Save" %}<button/></p>
{{ form|crispy }}
<p><button type="submit" class="btn btn-primary">{% trans "Save" %}<button/></p>
</form>
</div>
</div>

</div>
<div class="col-md-6">

<div class="panel panel-primary">
<div class="panel-heading">{% trans "Choose a category for the article" %}</div>
<div class="panel-body">
<div id="tree">
<ul>
	{% recursetree nodes %}
		<li id="node_{{ node.id }}"
		{% if node.id == article.group.id %}data-jstree='{"opened":true, "selected": true}'{% endif %}>
			{{ node.name }}
			{% if not node.is_leaf_node %}
				<ul class="children">
					{{ children }}
				</ul>
			{% endif %}
		</li>
	{% endrecursetree %}
</ul>
</div>
</div><commit_msg>fix layout of article form<commit_after>{% extends 'wm/base.html' %}
{% load i18n %}
{% load staticfiles %}
{% load crispy_forms_tags %}
{% load mptt_tags %}

{% block extra_head %}
<link rel="stylesheet" href="{% static 'vakata-jstree/themes/default/style.min.css' %}" />
<script src="{% static 'vakata-jstree/jstree.min.js' %}"></script>
<script>
$(function() {
	$('#tree').on('changed.jstree', function(e, data) {
		var obj = data.selected;
		/*var li = $('#' + obj[0]);
		alert(li.text().trim());*/
		var group_id = obj[0].substr(5);
		$('#id_group').val(group_id);
	});
});

$(function() {
	$('#tree').jstree({
		"core" : {
			"multiple" : false,
		},
	});
});
</script>

{% endblock %}

{% block title %}{% trans "Edit article" %}{% endblock %}

{% block content %}

<h1>{% trans "Edit article" %}</h1>

<div class="col-md-6">

<div class="panel panel-primary">
<div class="panel-heading">{% trans "Article details" %}</div>
<div id="article_form" class="panel-body">
<form method="POST" action="." class="uniForm">
{% csrf_token %}

<div class="form-group">
<button type="submit" class="btn btn-primary">{% trans "Save" %}<button/>
</div>
{{ form|crispy }}
<div class="form-group">
<button type="submit" class="btn btn-primary">{% trans "Save" %}<button/>
</div>
</form>
</div>
</div>

</div>
<div class="col-md-6">

<div class="panel panel-primary">
<div class="panel-heading">{% trans "Choose a category for the article" %}</div>
<div class="panel-body">
<div id="tree">
<ul>
	{% recursetree nodes %}
		<li id="node_{{ node.id }}"
		{% if node.id == article.group.id %}data-jstree='{"opened":true, "selected": true}'{% endif %}>
			{{ node.name }}
			{% if not node.is_leaf_node %}
				<ul class="children">
					{{ children }}
				</ul>
			{% endif %}
		</li>
	{% endrecursetree %}
</ul>
</div>
</div>
{'fraction_non_alphanumeric': 0.25400393368923857, 'fraction_numerical': 0.005057600449564484, 'mean_word_length': 4.418569254185693, 'pattern_counts': {'":': 4, '<': 81, '<?xml version=': 0, '>': 81, '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': '5375652', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1335, 'n_words': 295}