src/cm/templates/site/macros/user_moderation.html
author rbernard
Fri, 12 Feb 2010 21:58:53 +0100
changeset 172 9a355903350d
parent 0 40c8f766c9b8
permissions -rw-r--r--
renaming variables

{% 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>