Skip to content

Commit

Permalink
Merge pull request #776 from malemburg/master
Browse files Browse the repository at this point in the history
Add more canned responses.
  • Loading branch information
malemburg committed Jun 5, 2015
2 parents fae7dc6 + 5ce6299 commit 46da9d9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions templates/jobs/job_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ <h2>Job Review Discussion<small>({{ comment_count }} Comment{{ comment_count|plu
<strong>Insert Canned response:</strong>
<select id="canned_response">
<option value="empty">---</option>
<option value="voluntary">Voluntary</option>
<option value="not_python">Not python</option>
<option value="not_python">No or not enough emphasis on Python</option>
<option value="formatting">Formatting broken</option>
<option value="duplicate">Duplicate posting</option>
<option value="voluntary">Voluntary, non paid job</option>
</select>
<h3>Review action</h3>
<form action="{% url "jobs:job_review" %}" method="post">
Expand Down Expand Up @@ -198,7 +200,9 @@ <h3 class="widget-title">More jobs in <a href="{% url 'jobs:job_list_category' s
<script type="text/javascript">
// TODO: allow configuring canned responses in admin
var voluntary_response = "The Python Job Board is for paid positions only. The Python Community has a separate Wiki for listing voluntary positions available at http://wiki.python.org/moin/VolunteerOpportunities.";
var not_python_response = "The Python Job Board is for positions in which the primary role involves the Python programming language or development frameworks based on Python."
var not_python_response = "The Python Job Board is for positions in which the primary role involves the Python programming language or development frameworks based on Python.\n\nPlease rephrase and resubmit.\n\nThanks.";
var formatting_response = "Please resubmit your posting and check that the job description and/or requirements text renders fine in an online ReST editor such as http://rst.ninjs.org/.\n\nThanks.";
var duplicate_response = "This seems to be a duplicate of your earlier posting.\n\nIf not, please rephrase to make the difference clear.\n\nThanks.";
$(document).ready(function() {
var commment_field = $('#id_comment');
$('#canned_response').change(function(){
Expand All @@ -209,6 +213,12 @@ <h3 class="widget-title">More jobs in <a href="{% url 'jobs:job_list_category' s
case 'not_python':
commment_field.val(not_python_response);
break;
case 'formatting':
commment_field.val(formatting_response);
break;
case 'duplicate':
commment_field.val(duplicate_response);
break;
}
});
$('.review_button').click(function(){
Expand Down

0 comments on commit 46da9d9

Please sign in to comment.