1. Fabio Michelini
  2. django-swingcms

Source

django-swingcms / swingcms / cms / templates / cms / add_change_collector.html

{% load i18n %}



<script type="text/javascript">
    $(document).ready(function() {
        display_file_input_field_on_change();
        hide_all_file_input_field();
    });
// se contiene Criterion mostra o nascondi se checked o no
</script>



{% if toolbar %}

    {% include 'cms/texteditor.html' %}

{% endif %}


{% if introduction %}
    <br />
	{{ introduction }}
    <br />
{% else %}

{% endif %}

{% blocktrans %}Fields marked with <img src='{{ STATIC_URL }}cms/icons/asterix.png' alt="required"> are required.{% endblocktrans %}<br />

{% if form.errors %}
    <br />
	<div class='error'>{% trans 'Please correct the error below.' %}</div>
    <br />
{% else %}

{% endif %}

{% if form.non_field_errors %}
    <br />
    <div class='error'>{{ form.non_field_errors }}</div>
    <br />
{% else %}

{% endif %}


<br />
<form enctype='multipart/form-data' method='post' action=''>

    <table>

    {% for f in form %}

        <tr>
            {% if 'criterion' in f.name %}
                <td>
                    <br />
                    <br />
                </td>
                <td>
                    <br />
                    <br />
                </td>
            {% else %}
                <td>
                </td>
                <td>
                    {{ f.errors }}
                </td>
            {% endif %}
        </tr>

        <tr{% if 'required' in f.css_classes and not 'param' in f.name %} class='required' {% endif %}>

            <th>{% if f.label %}
                <label>
                    {% if 'criterion' in f.name %}
                        <b>{{ f.label }}</b>
                    {% else %}
                        {{ f.label }}
                    {% endif %}
                </label>{% endif %}
            </th>

            <td>{{ f.as_widget }}</td>
        </tr>

        <tr><td></td><td>{{ f.help_text }}</td></tr>

    {% endfor %}

    <tr><td></td><td></td></tr>
	<tr><td></td><td><input type="submit" value="Submit" onclick='js_single_submit()'></td></tr>
    <tr><td></td><td><input type="hidden" name='request_token' value="{{ request_token }}"></td></tr>

    </table>

</form>

{{ notes }}