From 1407dcdee0659e1aa5fa229627b6603c93abed35 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Fri, 30 Jan 2015 16:11:22 +0530 Subject: formatted mail message for proposal rejection & edited javascript for update code --- tbc/templates/tbc/update-code.html | 45 ++++++++++++++++++++++++++++++++++++-- tbc/views.py | 3 ++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/tbc/templates/tbc/update-code.html b/tbc/templates/tbc/update-code.html index ee1d5b5..536617b 100644 --- a/tbc/templates/tbc/update-code.html +++ b/tbc/templates/tbc/update-code.html @@ -9,6 +9,47 @@ $(document).ready(function() { }); }); + + {% endblock %} {% block content %}
@@ -18,7 +59,7 @@ $(document).ready(function() { {% csrf_token %} {% for chapter in chapters %} - + {% endfor %}

@@ -33,7 +74,7 @@ $(document).ready(function() { {% endfor %}

-
+
{% endblock %} diff --git a/tbc/views.py b/tbc/views.py index 4ad7f8e..37891a4 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -665,7 +665,7 @@ def RejectProposal(request, proposal_id=None): proposal.save() remarks = request.POST['remarks'] subject = "Python-TBC: Rejection of Proposal" - message = """Dear """+proposal.user.user.first_name+"""\nYour recent proposal for contributing in Python TBC has been rejected for the following reasons"""+request.POST.get('remarks')+"""\nHowever, your last proposal will be saved and you can edit the same proposal or propose a fresh one again.\n\nRegards\nPython TBC Team\nFOSSEE - IIT Bombay""" + message = """Dear """+proposal.user.user.first_name+"""\nYour recent proposal for contributing in Python TBC has been rejected for the following reasons\n"""+request.POST.get('remarks')+"""\n\nHowever, your last proposal will be saved and you can edit the same proposal or propose a fresh one again.\n\nRegards\nPython TBC Team\nFOSSEE - IIT Bombay""" add_log(request.user, proposal, CHANGE, 'Proposal rejected', proposal.id, chat=subject + '\n' + remarks) email_send(proposal.user.user.email, subject, message) @@ -738,6 +738,7 @@ def ConfirmBookDetails(request): context['book'] = book_to_update context['chapters'] = chapters context['screenshots'] = screen_shots + context['no_notebooks'] = book_to_update.no_chapters return render_to_response('tbc/update-code.html', context) if request.method == 'POST': book_form = BookForm(request.POST, instance=book_to_update) -- cgit