|
@ -66,6 +66,7 @@ def show( request, server ): |
|
|
adminform = None; |
|
|
adminform = None; |
|
|
|
|
|
|
|
|
registered = False; |
|
|
registered = False; |
|
|
|
|
|
|
|
|
if request.user.is_authenticated(): |
|
|
if request.user.is_authenticated(): |
|
|
if request.method == 'POST' and 'mode' in request.POST and request.POST['mode'] == 'reg': |
|
|
if request.method == 'POST' and 'mode' in request.POST and request.POST['mode'] == 'reg': |
|
|
try: |
|
|
try: |
|
@ -92,8 +93,18 @@ def show( request, server ): |
|
|
else: |
|
|
else: |
|
|
regform = MumbleUserForm( instance=user ); |
|
|
regform = MumbleUserForm( instance=user ); |
|
|
registered = True; |
|
|
registered = True; |
|
|
|
|
|
|
|
|
|
|
|
if request.method == 'POST' and 'mode' in request.POST and request.POST['mode'] == 'texture' and registered: |
|
|
|
|
|
textureform = MumbleTextureForm( request.POST, request.FILES ); |
|
|
|
|
|
if textureform.is_valid(): |
|
|
|
|
|
user.setTexture( request.FILES['texturefile'] ); |
|
|
|
|
|
return HttpResponseRedirect( '/mumble/%d' % int(server) ); |
|
|
|
|
|
else: |
|
|
|
|
|
textureform = MumbleTextureForm(); |
|
|
|
|
|
|
|
|
else: |
|
|
else: |
|
|
regform = None; |
|
|
regform = None; |
|
|
|
|
|
textureform = None; |
|
|
|
|
|
|
|
|
return render_to_response( |
|
|
return render_to_response( |
|
|
'mumble/mumble.htm', |
|
|
'mumble/mumble.htm', |
|
@ -104,6 +115,7 @@ def show( request, server ): |
|
|
"CurrentUserIsAdmin": isAdmin, |
|
|
"CurrentUserIsAdmin": isAdmin, |
|
|
"AdminForm": adminform, |
|
|
"AdminForm": adminform, |
|
|
"RegForm": regform, |
|
|
"RegForm": regform, |
|
|
|
|
|
"TextureForm": textureform, |
|
|
"Registered": registered, |
|
|
"Registered": registered, |
|
|
"DisplayTab": displayTab, |
|
|
"DisplayTab": displayTab, |
|
|
'MumbleActive': True, |
|
|
'MumbleActive': True, |
|
@ -168,5 +180,3 @@ def renderListItem( item, level ): |
|
|
Storage.s.append( ( level, item ) ); |
|
|
Storage.s.append( ( level, item ) ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|