|
0
|
1 |
{% load com %} |
|
|
2 |
{% load i18n %} |
|
|
3 |
| <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 |
|
|
4 |
<script type="text/javascript"> |
|
|
5 |
<!-- |
|
|
6 |
$("#user-approve-{{ user.get_profile.key }}").click(function(){ |
|
|
7 |
url = '{% url user-enable user.get_profile.key %}'; |
|
|
8 |
question = "{% blocktrans %}Are you sure you want to approve this user's membership to the workspace?{% endblocktrans %}"; |
|
|
9 |
if (confirm(question)) { |
|
|
10 |
$.post(url, function(data){ |
|
|
11 |
window.location = '{% url user %}'; |
|
|
12 |
}); |
|
|
13 |
} |
|
|
14 |
}); |
|
|
15 |
$("#user-refuse-{{ user.get_profile.key }}").click(function(){ |
|
|
16 |
url = '{% url user-suspend user.get_profile.key %}'; |
|
|
17 |
question = "{% blocktrans %}Are you sure you want to refuse this user's membership to the workspace?{% endblocktrans %}"; |
|
|
18 |
if (confirm(question)) { |
|
|
19 |
$.post(url, function(data){ |
|
|
20 |
window.location = '{% url user %}'; |
|
|
21 |
}); |
|
|
22 |
} |
|
|
23 |
}); |
|
|
24 |
--> |
|
|
25 |
</script> |