diff options
author | hardythe1 | 2014-12-23 13:32:13 +0530 |
---|---|---|
committer | hardythe1 | 2014-12-23 13:32:13 +0530 |
commit | 9b40244be612a6be04d4e337dc1c9862d059ef06 (patch) | |
tree | 85c017332e6bc3a21d79ec51be4c78f961ec8f65 /tbc/templates | |
parent | 56138a036de7a9dee3cd3a786148752f443cb541 (diff) | |
download | Python-TBC-Interface-9b40244be612a6be04d4e337dc1c9862d059ef06.tar.gz Python-TBC-Interface-9b40244be612a6be04d4e337dc1c9862d059ef06.tar.bz2 Python-TBC-Interface-9b40244be612a6be04d4e337dc1c9862d059ef06.zip |
added chapter links for old books & corrected a minor error for approving old books
Diffstat (limited to 'tbc/templates')
-rw-r--r-- | tbc/templates/tbc/upload-content-old.html | 23 | ||||
-rw-r--r-- | tbc/templates/tbc/upload-content.html | 2 |
2 files changed, 19 insertions, 6 deletions
diff --git a/tbc/templates/tbc/upload-content-old.html b/tbc/templates/tbc/upload-content-old.html index 8b3c692..5922082 100644 --- a/tbc/templates/tbc/upload-content-old.html +++ b/tbc/templates/tbc/upload-content-old.html @@ -41,6 +41,14 @@ function validate_content() return true; } </script> +<script> +$(document).ready(function() { + $(".chapters").on('change', function() { + var str = "option[id='image_"+$(this).attr('id')+"']"; + $(str).text($(this).val()); + }); +}); +</script> {% endblock %} {% block content %} @@ -55,16 +63,21 @@ function validate_content() <form action="/submit-code-old/{{ curr_book.id }}" method=POST enctype="multipart/form-data"> {% csrf_token %} {% for i in no_notebooks %} - <input type=text id=chapter{{i}} name=chapter{{i}} placeholder="Chapter {{ forloop.counter }} name"> + <input class="chapters" type=text id=chapter{{i}} name=chapter{{i}} placeholder="Chapter {{ forloop.counter }} name"> <input type=file id=notebook{{i}} name=notebook{{i}}> {% endfor %} <br> <hr> - <p>Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any cahpter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper caption for the screen shots. Only .png files are acceptable.</p> - {% for i in no_images %} - <input type=text id=caption{{i}} name=caption{{i}} placeholder="Caption {{ forloop.counter }}"> - <input type=file id=image{{i}} name=image{{i}}> + <p>Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any chapter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper caption for the screen shots. Only .png files are acceptable.</p> + {% for i in no_images %} + <input type=text id=caption{{i}} name=caption{{i}} placeholder="Caption {{ forloop.counter }}"> + <label class="label label-info" for="chapter_image{{i}}">Select Chapter: </label><select id=chapter_image{{i}} name=chapter_image{{i}}> + {% for i in no_notebooks %} + <option name=image_chapter{{i}} id=image_chapter{{i}} value = chapter{{i}}>chapter {{i}}</option> {% endfor %} + </select> + <input type=file id=image{{i}} name=image{{i}}> + {% endfor %} <br><br> <center><input class="btn btn-primary" type=submit value=submit onClick="return validate_content();"></center> </form> diff --git a/tbc/templates/tbc/upload-content.html b/tbc/templates/tbc/upload-content.html index 0c187d9..56dfb69 100644 --- a/tbc/templates/tbc/upload-content.html +++ b/tbc/templates/tbc/upload-content.html @@ -67,7 +67,7 @@ function validate_content() {% endfor %} <br> <hr> - <p>Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any cahpter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper caption for the screen shots. Only .png files are acceptable.</p> + <p>Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any chapter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper caption for the screen shots. Only .png files are acceptable.</p> {% for i in no_images %} <input type=text id=caption{{i}} name=caption{{i}} placeholder="Caption {{ forloop.counter }}"> <label class="label label-info" for="chapter_image{{i}}">Select Chapter: </label><select id=chapter_image{{i}} name=chapter_image{{i}}> |