Fix bug leave org
This commit is contained in:
parent
120335ee1c
commit
a026b034e6
1 changed files with 6 additions and 4 deletions
|
@ -29,13 +29,15 @@
|
|||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.leave-organization').click(function () {
|
||||
return confirm('{{ _('Are you sure you want to leave this organization?') }}\n' +
|
||||
if (confirm('{{ _('Are you sure you want to leave this organization?') }}\n' +
|
||||
{% if organization.is_open %}
|
||||
'{{ _('You will have to rejoin to show up on the organization leaderboard.') }}'
|
||||
{% else %}
|
||||
'{{ _('You will have to request membership in order to join again.') }}'
|
||||
{% endif %}
|
||||
);
|
||||
)) {
|
||||
$(this).parent().submit();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
|
@ -76,7 +78,7 @@
|
|||
{% elif organization.is_open or can_edit %}
|
||||
<form method="post" action="{{ url('join_organization', organization.id, organization.slug) }}">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="unselectable button" value="{{ _('Join organization') }}">
|
||||
<input type="submit" class="unselectable button" value="{{ _('Join organization') }}" style="margin-right: 1em">
|
||||
</form>
|
||||
{% else %}
|
||||
<a href="{{ url('request_organization', organization.id, organization.slug) }}"
|
||||
|
@ -162,7 +164,7 @@
|
|||
<li>
|
||||
<form method="post" action="{{ url('leave_organization', organization.id, organization.slug) }}">
|
||||
{% csrf_token %}
|
||||
<a type="submit" href="#" class="leave-organization">{{ _('Leave organization') }}</a>
|
||||
<a href="#" class="leave-organization">{{ _('Leave organization') }}</a>
|
||||
</form>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue