diff --git a/tom_eso/forms.py b/tom_eso/forms.py index 0477415..31b07da 100644 --- a/tom_eso/forms.py +++ b/tom_eso/forms.py @@ -12,7 +12,8 @@ class ESOProfileForm(forms.ModelForm): p2_password = forms.CharField( required=False, label="P2 password", - help_text="Enter your Phase 2 Tool password. Leave blank to keep unchanged." + help_text="Enter your Phase 2 Tool password. Leave blank to keep unchanged.", + widget=forms.PasswordInput(render_value=True) ) def __init__(self, *args, **kwargs): diff --git a/tom_eso/templates/tom_eso/partials/eso_user_profile.html b/tom_eso/templates/tom_eso/partials/eso_user_profile.html index 35ee751..aab8e00 100644 --- a/tom_eso/templates/tom_eso/partials/eso_user_profile.html +++ b/tom_eso/templates/tom_eso/partials/eso_user_profile.html @@ -13,14 +13,20 @@
- ESO P2 Tool Configuraton and Credentials + ESO P2 Tool Configuration and Credentials
No ESO Profile items yet for this user.
diff --git a/tom_eso/templatetags/eso_extras.py b/tom_eso/templatetags/eso_extras.py index 755770c..9e157fa 100644 --- a/tom_eso/templatetags/eso_extras.py +++ b/tom_eso/templatetags/eso_extras.py @@ -56,6 +56,8 @@ def eso_profile_data(user) -> dict: if decrypted_password is None: password_value = "[Password not available]" - profile_data_list.append({'label': password_label, 'value': password_value}) + profile_data_list.append( + {"label": password_label, "value": password_value, "is_password": True} + ) return {'user': user, 'eso_profile': profile, 'profile_data_list': profile_data_list}