API tests, email tests, working notifications

This commit is contained in:
Julia Hansbrough
2013-10-07 17:59:58 +00:00
parent 259d728018
commit bce220d7ab
7 changed files with 112 additions and 138 deletions

View File

@@ -1,63 +0,0 @@
<%! from django.utils.translation import ugettext as _ %>
<%page args="section_data"/>
<h2>Email</h2>
<form>
<ul class="list-fields">
<li class="field">
<label for="id_to">${_("Send to:")}</label>
<select id="id_to" name="to_option">
<option value="myself">${_("Myself")}</option>
%if to_option == "staff":
<option value="staff" selected="selected">${_("Staff and instructors")}</option>
%else:
<option value="staff">${_("Staff and instructors")}</option>
%endif
%if to_option == "all":
<option value="all" selected="selected">${_("All (students, staff and instructors)")}</option>
%else:
<option value="all">${_("All (students, staff and instructors)")}</option>
%endif
</select>
</li>
<li class="field">
<label for="id_subject">${_("Subject: ")}</label>
%if subject:
<input type="text" id="id_subject" name="subject" maxlength="100" size="75" value="${subject}">
%else:
<input type="text" id="id_subject" name="subject" maxlength="100" size="75">
%endif
</li>
<li class="field">
<label>Message:</label>
<div class="email-editor">
<section class="xmodule_edit xmodule_HtmlDescriptor" data-type="HTMLEditingDescriptor">
<section class="html-editor editor">
<div class="row">
<textarea class="tiny-mce">&lt;p&gt;hihihi&lt;/p&gt;</textarea>
</div>
</section>
</section>
</div>
<input type="hidden" name="message" value="">
</li>
</ul>
<div class="submit-email-action">
${_("Please try not to email students more than once a day. Important things to consider before sending:")}
<ul class="list-advice">
<li class="item">${_("Have you read over the email to make sure it says everything you want to say?")}</li>
<li class="item">${_("Have you sent the email to yourself first to make sure you're happy with how it's displayed?")}</li>
</ul>
<input type="submit" name="send-email" value="Send email" data-endpoint="${ section_data[get_send_email_url']}">
</div>
</form>

View File

@@ -6,7 +6,7 @@
<script type="text/javascript" src="jsi18n/"></script>
<div class="vert-left send-email">
<h2> ${_("Send Email")} </h2>
<div class="request-response msg msg-confirm" id="request-response"></div>
<div class="request-response msg msg-confirm copy" id="request-response"></div>
<ul class="list-fields">
<li class="field">
<label for="id_to">${_("Send to:")}</label><br/>
@@ -45,5 +45,6 @@
</ul>
</div>
<input type="button" name="send" value="${_("Send Email")}" data-endpoint="${ section_data['send_email'] }" >
<input type="button" name="send" value="${_("Send")}" data-endpoint="${ section_data['send_email'] }" >
<div class="request-response-error"></div>
</div>
</div>