aboutsummaryrefslogtreecommitdiffstats
path: root/notes/templates/edit.html
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-01-31 20:08:20 +0200
committerFilipp Lepalaan <f@0x00.co>2013-01-31 20:08:20 +0200
commitc0121b9b7f5041f6434a2e2dd24d3c68ed84b582 (patch)
treee3e8d0a05c45dabcc2a0399f902c6a59c92a9f4f /notes/templates/edit.html
parente613dc2b8b17e6f58a9666bee03578bb7ffc4067 (diff)
downloadopus-c0121b9b7f5041f6434a2e2dd24d3c68ed84b582.tar.gz
opus-c0121b9b7f5041f6434a2e2dd24d3c68ed84b582.tar.bz2
opus-c0121b9b7f5041f6434a2e2dd24d3c68ed84b582.zip
Initial commit
Diffstat (limited to 'notes/templates/edit.html')
-rw-r--r--notes/templates/edit.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/notes/templates/edit.html b/notes/templates/edit.html
new file mode 100644
index 0000000..6d2ec1e
--- /dev/null
+++ b/notes/templates/edit.html
@@ -0,0 +1,31 @@
+{% extends request.is_ajax|yesno:"blank.html,index.html" %}
+
+{% block content %}
+<div data-role="page">
+ <div data-role="header">
+ <a href="/notes/" data-icon="arrow-l">Notes</a>
+ <h1>New Note</h1>
+ <a href="/notes/" id="done">Done</a>
+ </div>
+ <div data-role="content">
+ <form action="" method="post" id="noteForm" enctype="multipart/form-data">
+ {% csrf_token %}
+ {{ form }}
+ <button type="submit" data-theme="b">Save</button>
+ {% if form.is_bound %}
+ <a href="delete/" data-role="button">Delete</a>
+ {% endif %}
+ </form>
+ </div>
+</div>
+
+<script type="text/javascript">
+ $(function(){
+ $('#id_title').focus();
+ });
+ $('#done').click(function(e){
+ e.preventDefault();
+ $('#noteForm').submit();
+ });
+</script>
+{% endblock content %}