Commit 5a0f5302 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Project joined success message

Display success message after successfully joins a project
parent 6e4d5045
......@@ -178,6 +178,7 @@ UNKNOWN_IDENTIFIER = 'Unknown identifier.'
PENDING_MEMBERSHIP_LEAVE = 'Your request is pending moderation by the Project owner.'
USER_JOINED_PROJECT = '%(realname)s has joined the Project.'
USER_LEFT_PROJECT = '%(realname)s has left the Project.'
USER_JOIN_REQUEST_SUBMITED = 'Join request submitted.'
# Auth providers messages
AUTH_PROVIDER_NOT_ACTIVE = "'%(provider)s' is disabled."
......
......@@ -1188,12 +1188,15 @@ def project_search(request):
def project_join(request, application_id):
next = request.GET.get('next')
if not next:
next = reverse('astakos.im.views.project_list')
next = reverse('astakos.im.views.project_detail',
args=(application_id,))
rollback = False
try:
application_id = int(application_id)
join_project(application_id, request.user)
# TODO: distinct messages for request/auto accept ???
messages.success(request, _(astakos_messages.USER_JOIN_REQUEST_SUBMITED))
except (IOError, PermissionDenied), e:
messages.error(request, e)
except BaseException, e:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment