aboutsummaryrefslogtreecommitdiff
path: root/design/templates/notes/partials/notebook_form.html
diff options
context:
space:
mode:
Diffstat (limited to 'design/templates/notes/partials/notebook_form.html')
-rw-r--r--design/templates/notes/partials/notebook_form.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/design/templates/notes/partials/notebook_form.html b/design/templates/notes/partials/notebook_form.html
new file mode 100644
index 0000000..fae6c40
--- /dev/null
+++ b/design/templates/notes/partials/notebook_form.html
@@ -0,0 +1,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>