From: Yasin Date: Mon, 20 Jan 2014 17:02:53 +0000 (+0100) Subject: MyAcc: using JS confirm instead of JS Alert X-Git-Tag: myslice-0.3-0~27 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=1ca2768a7aad52401201b6746e42d51194c00f15 MyAcc: using JS confirm instead of JS Alert --- diff --git a/portal/accountview.py b/portal/accountview.py index 73b55fdc..f3a15275 100644 --- a/portal/accountview.py +++ b/portal/accountview.py @@ -328,7 +328,7 @@ def account_process(request): public_key = public_key.replace('"', ''); user_pub_key = {'keys': public_key} sfa_update_user(request, user_hrn, user_pub_key) - messages.success(request, 'Sucess: New Keypair Generated!') + messages.success(request, 'Sucess: New Keypair Generated! Delegation of your credentials will be automatic.') return HttpResponseRedirect("/portal/account/") else: messages.error(request, 'Account error: You need an account in myslice platform to perform this action') @@ -413,6 +413,7 @@ def account_process(request): user_params = { 'config': updated_config, 'auth_type':'user'} manifold_update_account(request,user_params) messages.success(request, 'Private Key deleted. You need to delegate credentials manually once it expires.') + messages.success(request, 'Once your credentials expire, Please delegate manually using SFA: http://trac.myslice.info/wiki/DelegatingCredentials') return HttpResponseRedirect("/portal/account/") else: messages.error(request, 'Delete error: Private key is not stored in the server') diff --git a/portal/static/css/account_view.css b/portal/static/css/account_view.css index f445aeea..4984ed08 100644 --- a/portal/static/css/account_view.css +++ b/portal/static/css/account_view.css @@ -262,6 +262,24 @@ table.profile button { margin-right: 15px; } +#delete { + width: 80px; + vertical-align: middle; + float: right; + margin-right: 15px; + +} + +#upload_key { + width: 80px; + vertical-align: middle; + float: right; + margin-right: 15px; + +} + + + table.profile span.hide_this{ display: inline; display: none; diff --git a/portal/static/js/my_account.edit_profile.js b/portal/static/js/my_account.edit_profile.js index dcbfbb30..70607ba9 100644 --- a/portal/static/js/my_account.edit_profile.js +++ b/portal/static/js/my_account.edit_profile.js @@ -162,16 +162,19 @@ jQuery(document).ready(function(){ }); }); -// alert box for the "Generate new Key Pair button" -function myFunction() + +function editAlert() { -alert("You have requested to generate new key pairs. Please download and save the new keypairs after receiving the success message."); +alert("You can't edit email/authority. Please contact support and specify your requirements."); +window.location.href = "/portal/contact/"; } -function emailAlert() + +/* +// alert box for the "Generate new Key Pair button" +function myFunction() { -alert("To edit email please contact the administratior. You will be redirected to the support page now"); -window.location.href = "/portal/contact/"; +alert("You have requested to generate new key pairs. Please download and save the new keypairs after receiving the success message."); } function affAlert() @@ -179,7 +182,7 @@ function affAlert() alert("To edit affiliation please contact the administratior. You will be redirected to the support page now"); window.location.href = "/portal/contact/"; } -/* + // alert having ok or cancel option function show_confirm() { diff --git a/portal/templates/account-view.html b/portal/templates/account-view.html index 83e03d3d..3c3d5438 100644 --- a/portal/templates/account-view.html +++ b/portal/templates/account-view.html @@ -26,7 +26,7 @@ Email {{ person.email }} - @@ -78,17 +78,17 @@ Authority {{ authority }} - Generate Keys - - + + @@ -98,11 +98,10 @@
-
- - + + +
- + {%else%} Private Key @@ -128,7 +128,8 @@ - + {%endif%}