<commit_before>{% extends 'base.html' %}
{% load staticfiles %}

{% block head %}
    <script type="text/javascript" src="{% static 'utils/dropzone.js' %}"></script>
    <link rel="stylesheet" type="text/css" href="{% static 'utils/dropzone.css' %}">
{% endblock %}

{% block content %}
    {% include 'feedback_form/stagebar.html' with stage=wizard.steps.step1 %}
    <form method="post" id="main_form" class="form-horizontal" enctype="multipart/form-data">
        {% csrf_token %}
        {{ wizard.management_form }}
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                <h4>Anna mahdollisimman tarkat tiedot</h4>
            </div>
        </div>
        <div class="form-group">
            <label for="{{ form.title.id_for_label }}" class="col-sm-2 control-label">Otsikko:</label>
            <div class="col-sm-8">
                {{ form.title }}
            </div>
        </div>
        <div class="form-group">
            <label for="{{ form.description.id_for_label }}" class="col-sm-2 control-label">Kuvaus:</label>
            <div class="col-sm-8">
                {{ form.description }}
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-4 col-xs-4" id="char_counter"><span>5000 merkkiä jäljellä</span></div>
        </div>
        {{ form.form_id }}
    </form>

    <div class="row">
        <div class="col-sm-offset-2 col-sm-8">
            <h4>Voit liittää kuvan palautteeseesi</h4>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-8 col-sm-offset-2">
            <form class="dropzone" action="{% url 'media_upload' %}" id="dropzone">
                {% csrf_token %}
                <input type=hidden name="form_id" value="{{ form_id }}">
            </form>
        </div>
    </div>

    <div class="row" style="margin-top: 1em;">
        <div class="col-sm-offset-2 col-sm-2">
            <button type="button" id="previous" class="btn btn-primary pull-left" value="{{ wizard.steps.prev }}" name="wizard_goto_step">Edellinen <span class="glyphicon glyphicon-triangle-left"></span></button>
        </div>
<commit_msg>Added error message to form step 3 if field is missing.<commit_after>{% extends 'base.html' %}
{% load staticfiles %}

{% block head %}
    <script type="text/javascript" src="{% static 'utils/dropzone.js' %}"></script>
    <link rel="stylesheet" type="text/css" href="{% static 'utils/dropzone.css' %}">
{% endblock %}

{% block content %}
    {% include 'feedback_form/stagebar.html' with stage=wizard.steps.step1 %}
    <form method="post" id="main_form" class="form-horizontal" enctype="multipart/form-data">
        {% csrf_token %}
        {{ wizard.management_form }}
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                <h4>Anna mahdollisimman tarkat tiedot</h4>
            </div>
        </div>
        <div class="form-group">
            <label for="{{ form.title.id_for_label }}" class="col-sm-2 control-label">Otsikko:</label>
            <div class="col-sm-8">
                {{ form.title }}
            </div>
            {% for error in form.title.errors %}
                <div class="col-sm-offset-2 col-sm-8">
                    {{error}}
                </div>
            {% endfor %}
        </div>
        <div class="form-group">
            <label for="{{ form.description.id_for_label }}" class="col-sm-2 control-label">Kuvaus:</label>
            <div class="col-sm-8">
                {{ form.description }}
            </div>
            {% for error in form.description.errors %}
                <div class="col-sm-offset-2 col-sm-8">
                    {{error}}
                </div>
            {% endfor %}
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-4 col-xs-4" id="char_counter"><span>5000 merkkiä jäljellä</span></div>
        </div>
        {{ form.form_id }}
    </form>

    <div class="row">
        <div class="col-sm-offset-2 col-sm-8">
            <h4>Voit liittää kuvan palautteeseesi</h4>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-8 col-sm-offset-2">
            <form class="dropzone" action="{% url 'media_upload' %}" id="dropzone">
                {% csrf_token %}
                <input type=hidden name="form_id" value="{{ form_id }}">
            </form>
        </div>
    </div>

    <div class="row" style="margin-top: 1em;">
        <div class="col-sm-offset-2 col-sm-2">
            <button type="button" id="previous" class="btn btn-primary pull-left" value="{{ wizard.steps.prev }}" name="wizard_goto_step">Edellinen <span class="glyphicon glyphicon-triangle-left"></span></button>
        </div>

{'fraction_non_alphanumeric': 0.1815326633165829, 'fraction_numerical': 0.011515912897822446, 'mean_word_length': 2.0859173126614987, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 105, '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': '3389719', 'n_tokens_mistral': 1618, 'n_tokens_neox': 1516, 'n_words': 292}