diff options
Diffstat (limited to 'app/notes/templates/project_form.html')
-rw-r--r-- | app/notes/templates/project_form.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/app/notes/templates/project_form.html b/app/notes/templates/project_form.html new file mode 100644 index 0000000..ac7d13f --- /dev/null +++ b/app/notes/templates/project_form.html @@ -0,0 +1,35 @@ +{% extends 'base_gtd.html' %} + +{% block extrahead %} +<style> +form .selector label { + position: inherit; +} +</style> +{% endblock %} +{% block primary %} +<main role="main" class="archive-wrapper"> + <div class="post-body"> + <form action="" method="post" class="comment-form">{% csrf_token %} + {% for field in form %} + <fieldset> + {%if field.name == "project_type" or field.name == "outcome" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%} + {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%} + </fieldset> + <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small> + {%endfor%} + <input class="btn" type="submit" name="add_new" value="Save and add another" /> + <input type="submit" name="save" class="btn" value="Save" /> + </form> + </div> +</main> +{% endblock %} + {% block js %} + {% if is_update %}{%else%} +<script type="text/javascript"> +let params = new URL(document.location).searchParams; +document.getElementById('id_title').value = params.get("title"); +document.getElementById('id_body_markdown').value = params.get("description"); +</script> +{% endif %} + {% endblock%} |