aboutsummaryrefslogtreecommitdiff
path: root/design/templates/notes/partials/notebook_form.html
blob: fae6c40058db2baadb5f4f66072a20a4ee88c9f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<form id="nb-create-form" action="{% url 'notebook-api-list' %}" method="POST">{% csrf_token %}
    <div class="alert" id="non-field-errors">{{ form.non_field_errors }}</div>
            <div class="flex-wrapper flex-inner">
                {% for field in form %}{% if field.name == 'color_rgb' %}
                <fieldset class="fe-color-picker color-picker-fieldset block" id="color-picker" {% if form.instance.color_rgb %}style="background-color: {{form.instance.color_rgb}}; border: none;"{%endif%}>
                    {{field.label_tag}}
                    <input type="text" name="color_rgb" value="{{form.instance.color_rgb}}" maxlength="20" id="id_color_rgb">
                    {% if field.errors %}{{field.errors}}{% endif %}
                </fieldset>{% else %}
                {%if field.name != 'owner' %}<fieldset class="nb-{{field.name}}">
                    {{field.label_tag}}
                    {{field}}
                    {% if field.errors %}{{field.errors}}{% endif %}
                </fieldset>{%else%}{{field}}{% endif %}{%endif%}
                    {% endfor %}
                    <h1 class="notebook-title" id="nb-title">{{object.name}}</h1>
            </div>
                <input id="notebook-form-submit" type="submit" class="btn sm" value="Save" >
        </form>