src/cm/templates/site/macros/user_moderation.html
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 18:35:26 +0200
changeset 656 a84519031134
parent 0 40c8f766c9b8
permissions -rw-r--r--
add link to "privacy policy" in the header test

{% load com %}
{% load i18n %}
| <a id="user-approve-{{ user.get_profile.key }}" href="#">{% blocktrans %}Approve{% endblocktrans %}</a>/<a id="user-refuse-{{ user.get_profile.key }}" href="#">Refuse</a> membership
<script type="text/javascript">
<!--
$("#user-approve-{{ user.get_profile.key }}").click(function(){
    url = '{% url user-enable user.get_profile.key %}';
	question = "{% blocktrans %}Are you sure you want to approve this user's membership to the workspace?{% endblocktrans %}";
    if (confirm(question)) {
        $.post(url, function(data){
              window.location = '{% url user %}';
            });                        
    }
});
$("#user-refuse-{{ user.get_profile.key }}").click(function(){
    url = '{% url user-suspend user.get_profile.key %}';
	question = "{% blocktrans %}Are you sure you want to refuse this user's membership to the workspace?{% endblocktrans %}";
    if (confirm(question)) {
        $.post(url, function(data){
              window.location = '{% url user %}';
            });                        
    }
});
--> 
</script>