summaryrefslogtreecommitdiff
path: root/tbc/templates
diff options
context:
space:
mode:
authorhardythe12015-04-21 14:04:21 +0530
committerhardythe12015-04-21 14:04:21 +0530
commita83afb77e7fa3a670096c1ba28f9496de2fe4c4b (patch)
tree0b380a3e8bfd6788a4d33847b76447a34f636f79 /tbc/templates
parent9b28b750ef08140dd9d28a246f204742bda73b97 (diff)
downloadPython-TBC-Interface-a83afb77e7fa3a670096c1ba28f9496de2fe4c4b.tar.gz
Python-TBC-Interface-a83afb77e7fa3a670096c1ba28f9496de2fe4c4b.tar.bz2
Python-TBC-Interface-a83afb77e7fa3a670096c1ba28f9496de2fe4c4b.zip
add feature to edit number of chapter when submitting codes for 2nd time
Diffstat (limited to 'tbc/templates')
-rw-r--r--tbc/templates/tbc/confirm-details.html2
-rw-r--r--tbc/templates/tbc/update-code.html7
2 files changed, 5 insertions, 4 deletions
diff --git a/tbc/templates/tbc/confirm-details.html b/tbc/templates/tbc/confirm-details.html
index 96393ac..904c8c4 100644
--- a/tbc/templates/tbc/confirm-details.html
+++ b/tbc/templates/tbc/confirm-details.html
@@ -8,7 +8,7 @@
</div>
<div class="modal-body">
<p>You are submitting codes for the book <br> <b>{{ book.title }} by {{ book.author }}</b>.
- <br>Kindly verify the book details &amp; <b>enter the number of chapters</b> you will submit the codes for.</p>
+ <br>Kindly verify the book details &amp; <b>enter/edit the number of chapters</b> you want to submit the codes for.</p>
<p>Note: Consider only those chapters which have solved examples</p></p>
</div>
<div class="modal-footer">
diff --git a/tbc/templates/tbc/update-code.html b/tbc/templates/tbc/update-code.html
index 536617b..ec1bbc0 100644
--- a/tbc/templates/tbc/update-code.html
+++ b/tbc/templates/tbc/update-code.html
@@ -1,4 +1,5 @@
{% extends 'base.html' %}
+{% load tags %}
{% block script %}
<script src="/static/js/jquery.js" type="text/javascript"></script>
<script>
@@ -57,9 +58,9 @@ function validate_content()
<p>Upload the corrected IPython Notebooks & screen shots.</p>
<form action="/submit-code/" method=POST enctype="multipart/form-data">
{% csrf_token %}
- {% for chapter in chapters %}
- <input class="chapters" type=text id=chapter{{forloop.counter}} name=chapter{{forloop.counter}} value="{{ chapter.name }}">
- <input type=file name=notebook{{forloop.counter}} id=notebook{{forloop.counter}}>
+ {% for i in no_notebooks %}
+ <input class="chapters" type=text id=chapter{{i}} name=chapter{{i}} value="{{ chapters|lookup:i }}">
+ <input type=file name=notebook{{i}} id=notebook{{i}}>
{% endfor %}
<br>
<hr>