X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fmanageuserview.py;h=3cbb91df5d35be279ace13bc0d8c70690e43b4fe;hb=507aaa799377f1f5838bd8b8de19c4aef90e0ddc;hp=594c02a7ad5fcff9f788abf7fd69f584e58ae112;hpb=279fdf0cdb135d602abe1bf5140391d494da42a4;p=myslice.git diff --git a/portal/manageuserview.py b/portal/manageuserview.py index 594c02a7..3cbb91df 100644 --- a/portal/manageuserview.py +++ b/portal/manageuserview.py @@ -10,7 +10,7 @@ from ui.topmenu import topmenu_items_live, the_user from django.http import HttpResponse, HttpResponseRedirect from django.contrib import messages from django.contrib.auth.decorators import login_required -from theme import ThemeView +from myslice.theme import ThemeView # import json, os, re, itertools @@ -24,8 +24,8 @@ class UserView(LoginRequiredAutoLogoutView, ThemeView): def get_context_data(self, **kwargs): page = Page(self.request) - page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js", "js/my_account.edit_profile.js" ] ) - page.add_css_files ( [ "css/onelab.css", "css/account_view.css","css/plugin.css" ] ) + page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js", "js/my_account.edit_profile.js", "js/jquery-ui.js" ] ) + page.add_css_files ( [ "css/onelab.css", "css/account_view.css","css/plugin.css","css/jquery-ui.css" ] ) for key, value in kwargs.iteritems(): #print "%s = %s" % (key, value) @@ -281,16 +281,16 @@ def user_process(request, **kwargs): if 'N/A' not in acc_auth_cred: auth_list = [] auth_cred = [] - for key, value in acc_auth_cred.iteritems(): - auth_list.append(key) - auth_cred.append(value) - # special case: download each slice credentials separately - for i in range(0, len(auth_list)): - if 'dl_'+auth_list[i] in request.POST: - auth_detail = "Authority: " + auth_list[i] +"\nAuthority Credentials: \n"+ auth_cred[i] - response = HttpResponse(auth_detail, content_type='text/plain') - response['Content-Disposition'] = 'attachment; filename="auth_credential.txt"' - return response + for key, value in acc_auth_cred.iteritems(): + auth_list.append(key) + auth_cred.append(value) + # special case: download each slice credentials separately + for i in range(0, len(auth_list)): + if 'dl_'+auth_list[i] in request.POST: + auth_detail = "Authority: " + auth_list[i] +"\nAuthority Credentials: \n"+ auth_cred[i] + response = HttpResponse(auth_detail, content_type='text/plain') + response['Content-Disposition'] = 'attachment; filename="auth_credential.txt"' + return response if 'submit_name' in request.POST: edited_first_name = request.POST['fname']