diff options
Diffstat (limited to 'tbc/templates')
-rwxr-xr-x | tbc/templates/base.html | 3 | ||||
-rw-r--r-- | tbc/templates/tbc/confirm-aicte-details.html | 2 | ||||
-rw-r--r-- | tbc/templates/tbc/confirm-details.html | 11 | ||||
-rw-r--r-- | tbc/templates/tbc/review-proposal.html | 6 | ||||
-rw-r--r-- | tbc/templates/tbc/submit-proposal.html | 6 | ||||
-rw-r--r-- | tbc/templates/tbc/submit-sample.html | 9 | ||||
-rw-r--r-- | tbc/templates/tbc/update-book.html | 2 |
7 files changed, 29 insertions, 10 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html index 9f1607a..ec9806a 100755 --- a/tbc/templates/base.html +++ b/tbc/templates/base.html @@ -101,8 +101,7 @@ <ul class="dropdown-menu"> <li><a href="{% url 'tbc:ListAICTE' %}">Submit Proposal</a></li> <li><a href="{% url 'tbc:SubmitSample' %}">Submit Sample Notebook</a></li> - <li><a href="{% url 'tbc:SubmitCode' %}">Submit Codes</a></li> - <li><a href="{% url 'tbc:UpdateBook' %}">Update Submission</a></li> + <li><a href="{% url 'tbc:ConfirmBookDetails' %}">Submit Codes</a></li> <li><a href="{% url 'tbc:UpdatePassword' %}">Update Password</a></li> <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> </ul> diff --git a/tbc/templates/tbc/confirm-aicte-details.html b/tbc/templates/tbc/confirm-aicte-details.html index e26c453..e8ab88b 100644 --- a/tbc/templates/tbc/confirm-aicte-details.html +++ b/tbc/templates/tbc/confirm-aicte-details.html @@ -24,6 +24,8 @@ $( document ).ready(function() { title = document.getElementById('id_title').readOnly = true; author = document.getElementById('id_author').readOnly = true; publisher_place = document.getElementById('id_publisher_place').readOnly = true; + $('#id_no_chapters').hide(); + $('label[for="id_no_chapters"]').hide(); }); </script> {% endblock %} diff --git a/tbc/templates/tbc/confirm-details.html b/tbc/templates/tbc/confirm-details.html new file mode 100644 index 0000000..26007ea --- /dev/null +++ b/tbc/templates/tbc/confirm-details.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} +{% block content %} +<div id="content-wrap" style="max-width:600px;"> + <form action="/confirm-book-details/" method=POST enctype="multipart/form-data"> + {% csrf_token %} + {{ form.as_table }} + <br> + <input class="btn btn-primary" type=submit value="Update Book"> + </form> +</div> +{% endblock %} diff --git a/tbc/templates/tbc/review-proposal.html b/tbc/templates/tbc/review-proposal.html index f4ab9b3..9c6aca9 100644 --- a/tbc/templates/tbc/review-proposal.html +++ b/tbc/templates/tbc/review-proposal.html @@ -62,9 +62,9 @@ </div> {% endfor %} <h5> - <b>Status:</b> + {% ifequal proposal.proposal.status "samples" %} - Sample notebook phase + <b>Status:</b> Sample notebook phase {% endifequal %} </h5> <h5><b>Book Accepted/Alloted:</b> {{ proposal.proposal.accepted.title }}</h5> @@ -78,7 +78,7 @@ {% endif %} {% endifequal %} {% ifequal proposal.proposal.status "sample disapproved" %} - <h5>Samples have been disapproved. Contributor has not resubmitted sample notebook yet.</h5> + <b>Status:</b> Samples have been disapproved. Contributor has not resubmitted sample notebook yet. {% endifequal %} </div> {% endfor %} diff --git a/tbc/templates/tbc/submit-proposal.html b/tbc/templates/tbc/submit-proposal.html index 1da0e22..167fa5a 100644 --- a/tbc/templates/tbc/submit-proposal.html +++ b/tbc/templates/tbc/submit-proposal.html @@ -5,6 +5,7 @@ {% csrf_token %} {% for form in book_forms %} <h4>Book Preference {{ forloop.counter }}</h4> + {{ form.errors }} {{ form.as_p }} {% endfor %} <hr> @@ -69,5 +70,10 @@ e.preventDefault(); }); }); + $( document ).ready(function() { + $('input[id="id_no_chapters"]').hide(); + $('label[for="id_no_chapters"]').hide(); + }); + </script> {% endblock %} diff --git a/tbc/templates/tbc/submit-sample.html b/tbc/templates/tbc/submit-sample.html index 404ede5..322c339 100644 --- a/tbc/templates/tbc/submit-sample.html +++ b/tbc/templates/tbc/submit-sample.html @@ -2,9 +2,10 @@ {% block script %} <script> -function validate_content(element) +function validate_content(ext, name) { - extension = document.getElementById(element).value; + extension = document.getElementById(ext).value; + name = document.getElementById(name).value; extension = extension.split("."); if (extension == "" || name == "") { @@ -30,7 +31,7 @@ function validate_content(element) <h5>You are uploading sample notebook for the book <br>{{ proposal.accepted }} by {{ proposal.accepted.author }}</h5> <p>Only .ipynb files are acceptable</p> {% if has_old %} - <form action="/submit-sample/{{ proposal.id }}/{{ old_notebook.id }}" name="with-old" method=POST enctype="multipart/form-data" onSubmit="return validate_content('old_notebook');"> + <form action="/submit-sample/{{ proposal.id }}/{{ old_notebook.id }}" name="with-old" method=POST enctype="multipart/form-data" onSubmit="return validate_content('old_notebook', 'ch_name_old');"> {% csrf_token %} <input type=text id=ch_name_old name=ch_name_old value="{{ old_notebook.name }}"> <input type=file id=old_notebook name=old_notebook> @@ -39,7 +40,7 @@ function validate_content(element) <center><input class="btn btn-primary" type=submit value=submit></center> </form> {% else %} - <form action="/submit-sample/{{ proposal.id }}" name="without-old" method=POST enctype="multipart/form-data" onSubmit="return validate_content('sample_notebook');"> + <form action="/submit-sample/{{ proposal.id }}" name="without-old" method=POST enctype="multipart/form-data" onSubmit="return validate_content('sample_notebook', 'ch_name');"> {% csrf_token %} <input type=text id=ch_name name=ch_name placeholder="Name of the chapter you coded the solved example from"> <input type=file id=sample_notebook name=sample_notebook> diff --git a/tbc/templates/tbc/update-book.html b/tbc/templates/tbc/update-book.html index fb26a8b..c00d003 100644 --- a/tbc/templates/tbc/update-book.html +++ b/tbc/templates/tbc/update-book.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content %} <div id="content-wrap" style="max-width:600px;"> - <form action="/update-book/" method=POST enctype="multipart/form-data"> + <form action="/confirm-book-deetails/" method=POST enctype="multipart/form-data"> {% csrf_token %} {{ form.as_table }} <br> |