Add view statment src
This commit is contained in:
parent
c0dc6f4474
commit
bd703af53e
2 changed files with 6 additions and 0 deletions
|
@ -52,6 +52,8 @@
|
|||
{{ problem.description|markdown("problem", MATH_ENGINE)|reference|str|safe }}
|
||||
{% endcache %}
|
||||
{% if feed_type=='volunteer' and request.user.has_perm('judge.suggest_problem_changes') %}
|
||||
<a href="#" class="view-statement-src">{{ _('View source') }}</a>
|
||||
<pre class="statement-src" style="display: none">{{ problem.description|str }}</pre>
|
||||
<hr>
|
||||
<center><h3>{{_('Volunteer form')}}</h3></center>
|
||||
<br>
|
||||
|
|
|
@ -155,6 +155,10 @@
|
|||
});
|
||||
}
|
||||
{% if feed_type=='volunteer' and request.user.has_perm('judge.suggest_problem_changes') %}
|
||||
$(".view-statement-src").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$(this).siblings('.statement-src').toggle();
|
||||
});
|
||||
$(".edit-btn").on('click', function() {
|
||||
var pid = $(this).attr('pid');
|
||||
$('#volunteer-types-' + pid).css({'width': '100%'});
|
||||
|
|
Loading…
Reference in a new issue