summaryrefslogtreecommitdiff
path: root/tbc/templates
diff options
context:
space:
mode:
Diffstat (limited to 'tbc/templates')
-rwxr-xr-xtbc/templates/base.html58
-rw-r--r--tbc/templates/tbc/aicte-books.html25
-rw-r--r--tbc/templates/tbc/ajax-matching-books.html24
-rw-r--r--tbc/templates/tbc/book-review-details.html51
-rw-r--r--tbc/templates/tbc/book-review.html6
-rw-r--r--tbc/templates/tbc/confirm-aicte-details.html29
-rw-r--r--tbc/templates/tbc/disapprove-sample.html17
-rw-r--r--tbc/templates/tbc/reject-proposal.html17
-rw-r--r--tbc/templates/tbc/review-proposal.html85
-rw-r--r--tbc/templates/tbc/submit-proposal.html73
-rw-r--r--tbc/templates/tbc/submit-sample.html49
-rw-r--r--tbc/templates/tbc/upload-content.html10
12 files changed, 423 insertions, 21 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html
index 855ae88..9f1607a 100755
--- a/tbc/templates/base.html
+++ b/tbc/templates/base.html
@@ -64,8 +64,6 @@
</style>
{% endblock %}
- {% block script %}
- {% endblock %}
</head>
<body>
@@ -101,7 +99,9 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.first_name }}<b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a href="{% url 'tbc:SubmitBook' %}">Submit Book</a></li>
+ <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:UpdatePassword' %}">Update Password</a></li>
<li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li>
@@ -114,6 +114,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ reviewer.first_name }} {{ reviewer.last_name }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{% url 'tbc:BookReview' %}">Review Books</a></li>
+ <li><a href="{% url 'tbc:ReviewProposals' %}">Review Proposals</a></li>
<li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li>
</ul>
</li>
@@ -176,7 +177,52 @@
</center>
<div class="clearfix"></div>
{% endif %}
- <div class="row-fluid">
+ {% if proposal_submitted %}
+ <center>
+ <div class="alert" style="width:650px;height:40px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Thank you for showing interest in contributing to Python TBC. <br>We have recevied your proposal. Please be patient we will get back to you within few days.</p>
+ </div>
+ </center>
+ <div class="clearfix"></div>
+ {% endif %}
+ {% if proposal_pending %}
+ <center>
+ <div class="alert" style="width:650px;height:40px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>You either have a proposal pending or you are already working on a book. You cannot submit a proposal at this moment.</p>
+ </div>
+ </center>
+ <div class="clearfix"></div>
+ {% endif %}
+ {% if no_book_alloted %}
+ <center>
+ <div class="alert" style="width:400px;height:25px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>There is no book alloted to you. You cannot submit codes.</p>
+ </div>
+ </center>
+ <div class="clearfix"></div>
+ {% endif %}
+ {% if sample_notebook %}
+ <center>
+ <div class="alert" style="width:550px;height:40px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Sample notebook has been submitted successfully. Please be patient while the reviewer reviews your codes & get backs to you.</p>
+ </div>
+ </center>
+ <div class="clearfix"></div>
+ {% endif %}
+ {% if cannot_submit_sample %}
+ <center>
+ <div class="alert" style="width:400px;height:25px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>You have not been permitted to send sample notebook.</p>
+ </div>
+ </center>
+ <div class="clearfix"></div>
+ {% endif %}
+ <div class="row-fluid">
<center><h3>Recent Submissions</h3></center>
{% for item in items %}
<div class ="module-list">
@@ -193,7 +239,7 @@
<!--
<input type=text> <input type=submit value=Search>
-->
- {% endblock %}
+ {% endblock %}
<hr>
<footer>
@@ -217,6 +263,8 @@
ga('send', 'pageview');
</script>
<!-- / google analytics -->
+ {% block script %}
+ {% endblock %}
</body>
</html>
diff --git a/tbc/templates/tbc/aicte-books.html b/tbc/templates/tbc/aicte-books.html
new file mode 100644
index 0000000..4cc3d15
--- /dev/null
+++ b/tbc/templates/tbc/aicte-books.html
@@ -0,0 +1,25 @@
+{% extends 'base.html' %}
+{% load static %}
+{% block content %}
+ <center><h3>List of AICTE Books</h3></center>
+ <hr>
+ <div id="content-wrap">
+ <p>Below is the list of AICTE recommended books. You can propose a book just by clicking on the link. However, if you wish to submit your own preferences other than AICTE books, click the button given below.</p>
+ <a href="{% url 'tbc:SubmitProposal' %}" class="btn btn-primary">I don't want to propose AICTE book</a>
+ <hr>
+ <table class="table table-bordered table-hover">
+ <th>SR #</th>
+ <th>Book (click on the link to propose the book)</th>
+ {% for book in aicte_books %}
+ <tr>
+ <td>
+ {{ forloop.counter }}
+ </td>
+ <td>
+ <a href="{% url 'tbc:SubmitAICTEProposal' book.id %}">{{ book.title }} by {{ book.author }}, {{ book.edition }} Edition</a>
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+{% endblock %}
diff --git a/tbc/templates/tbc/ajax-matching-books.html b/tbc/templates/tbc/ajax-matching-books.html
new file mode 100644
index 0000000..c5fbfa8
--- /dev/null
+++ b/tbc/templates/tbc/ajax-matching-books.html
@@ -0,0 +1,24 @@
+<html>
+<body>
+<div>
+ <span id="flag">{% if flag %}match exists{% endif %}</span>
+ <div id="matches">
+ <center><h5>The books you have proposed may already be <b>under progress</b> or <b>completed</b> by some other contributor. Kindly verify and submit the proposal.</h5></center>
+ <hr>
+ {% for match in matches %}
+ {% if match %}
+ <b><h5>Potential matching books for your book preference {{ forloop.counter }}</h5></b>
+ {% else %}
+ <h5>No matching books found for book preference {{ forloop.counter }}</h5>
+ {% endif %}
+ <ul>
+ {% for book in match %}
+ <li>{{ book.title }} by {{ book.author }}</li>
+ {% endfor %}
+ </ul>
+ <hr>
+ {% endfor %}
+ </div>
+</div>
+</body>
+</html>
diff --git a/tbc/templates/tbc/book-review-details.html b/tbc/templates/tbc/book-review-details.html
index e55c23c..7e52c26 100644
--- a/tbc/templates/tbc/book-review-details.html
+++ b/tbc/templates/tbc/book-review-details.html
@@ -11,21 +11,27 @@
{% endfor %}
</div>
<hr>
-<ul>
-{% for chapter in chapters %}
- <li><a href="{% url 'tbc:ConvertNotebook' chapter.notebook %}">{{ chapter.name }}</a></li>
-{% endfor %}
-</ul>
+<table class="table table-bordered table-hover">
+ {% for chapter in chapters %}
+ <tr>
+ <td><a href="{% url 'tbc:ConvertNotebook' chapter.notebook %}">{{ chapter.name }}</a></td>
+ </tr>
+ {% endfor %}
+</table>
<hr>
-<form action="/approve-book/{{ book.id }}" method="POST">
-{% csrf_token %}
-<select name=approve_notify>
- <option value=none>Select an Action</option>
- <option value="approve">Approve</option>
- <option value="notify">Notify Changes</option>
-</select>
-<input type=submit value=GO>
-</form>
+{% if book.approved %}
+<h3>Book has been completed & approved</h3>
+{% else %}
+ <form action="/approve-book/{{ book.id }}" method="POST">
+ {% csrf_token %}
+ <select name=approve_notify>
+ <option value=none>Select an Action</option>
+ <option value="approve">Approve</option>
+ <option value="notify">Notify Changes</option>
+ </select>
+ <input type=submit value=GO>
+ </form>
+{% endif %}
<table>
<tr><td>Author: &nbsp;&nbsp;<td>{{ book.author }}
<tr><td>Publisher: &nbsp;&nbsp;<td>{{ book.publisher_place }}
@@ -33,4 +39,21 @@
<tr><td>Contributor: &nbsp;&nbsp;<td>{{ book.contributor.user.first_name }} {{ book.contributor.user.last_name }}
<tr><td>Email: &nbsp;&nbsp;<td>{{ book.contributor.user.email }}<br>
</table>
+<hr>
+<table class="table table-bordered table-hover">
+ <tr>
+ <th>User</th>
+ <th>Time</th>
+ <th>Activity</th>
+ <th class="span6">Conversation</th>
+ </tr>
+{% for log in logs %}
+<tr>
+ <td> {{ log.user }} </td>
+ <td> {{ log.action_time }} </td>
+ <td> {{ log.change_message }} </td>
+ <td> {{ log.conversation|linebreaksbr }} </td>
+</tr>
+{% endfor %}
+<table>
{% endblock %}
diff --git a/tbc/templates/tbc/book-review.html b/tbc/templates/tbc/book-review.html
index d7270b4..7bb88ff 100644
--- a/tbc/templates/tbc/book-review.html
+++ b/tbc/templates/tbc/book-review.html
@@ -23,4 +23,10 @@
<li><a href="{% url 'tbc:BookReview' book.id %}">{{ book.title }} {{ book.edition }} Edition</a>
{% endfor %}
</ol>
+<center><h3>Reviewed Books</h3></center>
+<ol>
+{% for book in approved_books %}
+<li><a href="{% url 'tbc:BookReview' book.id %}">{{ book.title }} {{ book.edition }} Edition</a></li>
+{% endfor %}
+<ol>
{% endblock %}
diff --git a/tbc/templates/tbc/confirm-aicte-details.html b/tbc/templates/tbc/confirm-aicte-details.html
new file mode 100644
index 0000000..e26c453
--- /dev/null
+++ b/tbc/templates/tbc/confirm-aicte-details.html
@@ -0,0 +1,29 @@
+{% extends 'base.html' %}
+{% block content %}
+ <div id="content-wrap" style="max-width:600px;">
+ <center>
+ <h3>AICTE Book Details</h3>
+ <hr>
+ <p>
+ Kindly verify the book details. Also, fill in the missing details & submit the proposal.
+ </p>
+ <hr>
+ </center>
+ <form id="proposal-form" action="/submit-aicte-proposal/{{ aicte_book.id }}/" method=POST enctype="multipart/form-data">
+ {% csrf_token %}
+ {{ form.as_p }}
+ <hr>
+ <input id="proposal-form-submit" class="btn btn-primary" type=submit value=submit>
+ </form>
+ </div>
+{% endblock %}
+
+{% block script %}
+<script>
+$( 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;
+});
+</script>
+{% endblock %}
diff --git a/tbc/templates/tbc/disapprove-sample.html b/tbc/templates/tbc/disapprove-sample.html
new file mode 100644
index 0000000..2632edb
--- /dev/null
+++ b/tbc/templates/tbc/disapprove-sample.html
@@ -0,0 +1,17 @@
+{% extends 'base.html' %}
+{% load static %}
+{% block content %}
+<center><h3>Diapprove Sample Notebook</h3>
+<hr>
+<h4>Notifing Chages for book {{ proposal.accepted.title }} to {{ proposal.user.user.first_name }} {{ proposal.user.user.last_name }}</h4></center>
+<form action="/disapprove-sample-notebook/{{ proposal.id }}" method=POST enctype="multipart/form-data">
+{% csrf_token %}
+ <table>
+ <tr><td>To</td></tr>
+ <tr><td><input type="text" value="{{ proposal.user.user.email }}" readonly></td></tr>
+ <tr><td>Changes Required</td></tr>
+ <tr><td><textarea rows="15" cols="100" name="changes_required" style="width:100%;"></textarea></td></tr>
+ <tr><td><input class="btn btn-primary" type="submit" value="Send"></td></tr>
+ </table>
+</form>
+{% endblock %}
diff --git a/tbc/templates/tbc/reject-proposal.html b/tbc/templates/tbc/reject-proposal.html
new file mode 100644
index 0000000..11ce874
--- /dev/null
+++ b/tbc/templates/tbc/reject-proposal.html
@@ -0,0 +1,17 @@
+{% extends 'base.html' %}
+{% load static %}
+{% block content %}
+<center><h3>Proposal Rejection</h3>
+<hr>
+<h4>Rejecting proposal submitted by {{ proposal.user.user.first_name }} {{ proposal.user.user.last_name }}.</h4></center>
+<form action="/reject-proposal/{{ proposal.id }}" method=POST enctype="multipart/form-data">
+{% csrf_token %}
+ <table>
+ <tr><td>To</td></tr>
+ <tr><td><input type="text" value="{{ proposal.user.user.email }}" readonly></td></tr>
+ <tr><td>Reason/Remarks for rejection</td></tr>
+ <tr><td><textarea rows="15" cols="100" name="remarks" style="width:100%;"></textarea></td></tr>
+ <tr><td><input class="btn btn-primary" type="submit" value="Send"></td></tr>
+ </table>
+</form>
+{% endblock %}
diff --git a/tbc/templates/tbc/review-proposal.html b/tbc/templates/tbc/review-proposal.html
new file mode 100644
index 0000000..c0ea983
--- /dev/null
+++ b/tbc/templates/tbc/review-proposal.html
@@ -0,0 +1,85 @@
+{% extends 'base.html' %}
+{% load static %}
+{% block content %}
+ <center><h2>New Proposals</h2></center>
+ <hr>
+ {% if no_new_proposal %}
+ <center><h4>There are no new proposals</h4></center>
+ {% endif %}
+ <ol>
+ {% for proposal in proposals %}
+ <li><h4>Proposal from {{ proposal.user.user.first_name }} {{ proposal.user.user.last_name }}</h4></li>
+ <div class="accordion" id="accordion1{{ forloop.parentloop.counter }}{{ forloop.counter }}">
+ {% for textbook in proposal.textbooks.all %}
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1{{ forloop.parentloop.counter }}{{ forloop.counter }}" href="#collapse1{{ forloop.parentloop.counter }}{{forloop.counter}}">
+ Book Preference {{ forloop.counter }} - {{ textbook.title }}
+ </a>
+ </div>
+ <div id="collapse1{{ forloop.parentloop.counter }}{{forloop.counter}}" class="accordion-body collapse">
+ <div class="accordion-inner">
+ Author: {{ textbook.author}}<br>
+ Edition: {{ textbook.edition }}<br>
+ Publisher: {{ textbook.publisher_place }}<br>
+ ISBN: {{ textbook.isbn }}<br>
+ Year of Pub.: {{ textbook.year_of_pub }}<br>
+ Category: {{ textbook.category }}<br>
+ <a class="btn btn-primary btn-mini" href="{% url 'tbc:ReviewProposals' proposal.id textbook.id %}">Approve & Ask for Samples</a>
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ <h5><b>Status:</b> You are yet to review this proposal</h5>
+ <a class="btn btn-primary" href="{% url 'tbc:RejectProposal' proposal.id %}">Reject</a>
+ </div>
+ {% endfor %}
+ </ol>
+ <hr>
+ <center><h2>Proposals in Sample Notebook phase</h2></center>
+ <hr>
+ <ol>
+ {% for proposal in old_proposals %}
+ <h4><li>Proposal from {{ proposal.proposal.user.user.first_name }} {{ proposal.proposal.user.user.last_name }}</h4></li>
+ <div class="accordion" id="accordion2{{ forloop.counter }}">
+ {% for textbook in proposal.proposal.textbooks.all %}
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2{{ forloop.parentloop.counter }}{{ forloop.counter }}" href="#collapse2{{ forloop.parentloop.counter }}{{forloop.counter}}">
+ Book Preference {{ forloop.counter }} - {{ textbook.title }}
+ </a>
+ </div>
+ <div id="collapse2{{ forloop.parentloop.counter }}{{forloop.counter}}" class="accordion-body collapse">
+ <div class="accordion-inner">
+ Author: {{ textbook.author}}<br>
+ Edition: {{ textbook.edition }}<br>
+ Publisher: {{ textbook.publisher_place }}<br>
+ ISBN: {{ textbook.isbn }}<br>
+ Year of Pub.: {{ textbook.year_of_pub }}<br>
+ Category: {{ textbook.category }}<br>
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ <h5>
+ <b>Status:</b>
+ {% ifequal proposal.proposal.status "samples" %}
+ Sample notebook phase
+ {% endifequal %}
+ </h5>
+ <h5><b>Book Accepted/Alloted:</b> {{ proposal.proposal.accepted.title }}</h5>
+ {% ifequal proposal.proposal.status "samples" %}
+ {% if proposal.sample.sample_notebook %}
+ <h5><a href="{% static 'uploads/' %}{{ proposal.sample.sample_notebook }}">sample notebook</a><br></h5>
+ {% else %}
+ <h5>Contributor has not submitted sample notebook yet.</h5>
+ {% endif %}
+ <a class="btn btn-primary" href="{% url 'tbc:DisapproveProposal' proposal.proposal.id %}">Disapprove Samples</a>
+ <a class="btn btn-primary" href="{% url 'tbc:AllotBook' proposal.proposal.id %}">Alot Book</a>
+ {% endifequal %}
+ </div>
+ {% endfor %}
+ </ol>
+{% endblock %}
+
+
diff --git a/tbc/templates/tbc/submit-proposal.html b/tbc/templates/tbc/submit-proposal.html
new file mode 100644
index 0000000..1da0e22
--- /dev/null
+++ b/tbc/templates/tbc/submit-proposal.html
@@ -0,0 +1,73 @@
+{% extends 'base.html' %}
+{% block content %}
+<div id="content-wrap" style="max-width:600px;">
+ <form id="proposal-form" action="/submit-proposal/" method=POST enctype="multipart/form-data">
+ {% csrf_token %}
+ {% for form in book_forms %}
+ <h4>Book Preference {{ forloop.counter }}</h4>
+ {{ form.as_p }}
+ {% endfor %}
+ <hr>
+ <input id="proposal-form-submit" class="btn btn-primary" type=submit value=submit>
+ </form>
+</div>
+
+
+<!-- Button to trigger modal -->
+<!-- Modal -->
+<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3 id="myModalLabel">Potential Matching Books</h3>
+ </div>
+ <div class="modal-body">
+ <p>One fine body…</p>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" data-dismiss="modal">Go Back</button>
+ <button id="modal-submit-proposal" class="btn btn-danger">Submit Proposal</button>
+ </div>
+</div>
+{% endblock %}
+
+{% block script %}
+ <script>
+ $(document).ready(function() {
+ $("#proposal-form-submit").click(function(e) {
+ var i = 0;
+ var titles = [];
+ $titles = $("input[name='title']");
+ $titles = $("input[name='title']");
+ $titles.each(function(index, value) {
+ titles[i] = $(this).val();
+ ++i;
+ });
+ titles = JSON.stringify(titles);
+
+ $.ajax({
+ url: "/ajax/matching-books/",
+ type: "POST",
+ dataType: "html",
+ data: {
+ titles: titles
+ },
+ success: function(output) {
+ console.log(output);
+ var $output = $(output);
+ if($output.find("#flag").html() == "") {
+ $("#proposal-form").submit();
+ } else {
+ $(".modal-body").html($output.find("#matches").html());
+ $("#myModal").modal();
+ }
+ }
+ });
+ e.preventDefault();
+ });
+ $("#modal-submit-proposal").click(function(e){
+ $("#proposal-form").submit();
+ e.preventDefault();
+ });
+ });
+ </script>
+{% endblock %}
diff --git a/tbc/templates/tbc/submit-sample.html b/tbc/templates/tbc/submit-sample.html
new file mode 100644
index 0000000..96f1209
--- /dev/null
+++ b/tbc/templates/tbc/submit-sample.html
@@ -0,0 +1,49 @@
+{% extends 'base.html' %}
+
+{% block script %}
+<script>
+function validate_content()
+{
+ no_notebooks = {{ no_notebooks }}.length;
+ extension = document.getElementById("sample_notebook").value;
+ extension = extension.split(".");
+ if (extension == "" || name == "")
+ {
+ alert("Chapter name or file field is empty !");
+ return false;
+ }
+ if(extension.slice(Math.max(extension.length - 1, 1)) == "ipynb")
+ return true;
+ else
+ alert("Oops ! You can upload only Ipython Notebooks (.ipynb extension)");
+ return false;
+ return true;
+}
+</script>
+{% endblock %}
+
+{% block content %}
+<div id="content-wrap" style="max-width:600px;">
+ <h5>You are uploading sample notebook for the book {{ 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();">
+ {% 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>
+ <br>
+ <hr>
+ <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();">
+ {% 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>
+ <br>
+ <hr>
+ <center><input class="btn btn-primary" type=submit value=submit></center>
+ </form>
+ {% endif %}
+</div>
+{% endblock %}
diff --git a/tbc/templates/tbc/upload-content.html b/tbc/templates/tbc/upload-content.html
index ddc0f72..2423bd4 100644
--- a/tbc/templates/tbc/upload-content.html
+++ b/tbc/templates/tbc/upload-content.html
@@ -44,10 +44,15 @@ function validate_content()
{% endblock %}
{% block content %}
+<center>
+ <h4>Submitting code for the book </h4>
+ <h4> {{ curr_book.title }} by {{ curr_book.author }}</h4>
+</center>
+<hr>
<div id="content-wrap" style="max-width:600px;">
<p>Upload chapters as individual IPython notebooks. Please do not use spaces to name your Ipython Notebook files. For ex.
use "chapter1.ipynb instead of chapter 1.ipynb"</p>
- <form action="/upload-content/{{ curr_book.id }}" method=POST enctype="multipart/form-data" onSubmit="return validate_content();">
+ <form action="/submit-code/" 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">
@@ -60,7 +65,8 @@ function validate_content()
<input type=text id=caption{{i}} name=caption{{i}} placeholder="Caption {{ forloop.counter }}">
<input type=file id=image{{i}} name=image{{i}}>
{% endfor %}
- <center><input class="btn btn-primary" type=submit value=submit></center>
+ <br><br>
+ <center><input class="btn btn-primary" type=submit value=submit onClick="return validate_content();"></center>
</form>
</div>
{% endblock %}