- Strings marked for translation need to be wrapped in quotes to be string type. - Update old post function call - Remove extra close brackets in function definitions - Wrap href attribute in quotes - Move square bracket outside of translated text
46 lines
1.2 KiB
HTML
46 lines
1.2 KiB
HTML
<%! from django.utils.translation import ugettext as _ %>
|
|
|
|
<%inherit file="main.html" />
|
|
<script>
|
|
function name_confirm(id) {
|
|
$.post('/accept_name_change',{"id":id},
|
|
function(data){
|
|
if(data.success){
|
|
$("#div"+id).html("${_('Accepted')}");
|
|
} else {
|
|
alert("${_('Error')}");
|
|
}
|
|
});
|
|
}
|
|
|
|
function name_deny(id) {
|
|
$.post('/reject_name_change',{"id":id},
|
|
function(data){
|
|
if(data.success){
|
|
$("#div"+id).html("${_('Rejected')}");
|
|
} else {
|
|
alert("${_('Error')}");
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<section class="container">
|
|
<div class="gradebook-wrapper">
|
|
<section class="gradebook-content">
|
|
<h1>${_("Pending name changes")}</h1>
|
|
<table>
|
|
% for s in students:
|
|
<tr>
|
|
<td><a href="/profile/${s['uid']}"/>${s['old_name']}</td>
|
|
<td>${s['new_name']|h}</td>
|
|
<td>${s['email']|h}</td>
|
|
<td>${s['rationale']|h}</td>
|
|
<td><span id="div${s['cid']}"><span onclick="name_confirm(${s['cid']});">[${_("Confirm")}]</span>
|
|
<span onclick="name_deny(${s['cid']});">[${_("Reject")}]</span></span></td></tr>
|
|
% endfor
|
|
</table>
|
|
</section>
|
|
</div>
|
|
</section>
|