From d4d9f6a49a5f4df3ec9ca32c2d6689b0f2e030f3 Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Sat, 30 Apr 2016 15:10:39 +0000 Subject: [PATCH] DJ1.9 compat field.related --- orchestra/contrib/databases/forms.py | 2 +- orchestra/contrib/saas/forms.py | 2 +- orchestra/forms/options.py | 4 +-- orchestra/templates/admin/orchestra/menu.html | 29 +++++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/orchestra/contrib/databases/forms.py b/orchestra/contrib/databases/forms.py index 59aa4745..75dc3a3c 100644 --- a/orchestra/contrib/databases/forms.py +++ b/orchestra/contrib/databases/forms.py @@ -112,7 +112,7 @@ class DatabaseUserChangeForm(forms.ModelForm): password = ReadOnlySQLPasswordHashField(label=_("Password"), help_text=_("Raw passwords are not stored, so there is no way to see " "this user's password, but you can change the password " - "using this form.")) + "using this form.")) class Meta: model = DatabaseUser diff --git a/orchestra/contrib/saas/forms.py b/orchestra/contrib/saas/forms.py index 086a29e7..d7292fd7 100644 --- a/orchestra/contrib/saas/forms.py +++ b/orchestra/contrib/saas/forms.py @@ -60,7 +60,7 @@ class SaaSPasswordForm(SaaSBaseForm): ], help_text=_("Passwords are not stored, so there is no way to see this " "service's password, but you can change the password using " - "this form.")) + "this form.")) password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput(attrs={'autocomplete': 'off'}), validators=[validators.validate_password]) diff --git a/orchestra/forms/options.py b/orchestra/forms/options.py index 8d4875bf..a7a5bbe6 100644 --- a/orchestra/forms/options.py +++ b/orchestra/forms/options.py @@ -62,7 +62,7 @@ class UserChangeForm(forms.ModelForm): password = auth_forms.ReadOnlyPasswordHashField(label=_("Password"), help_text=_("Raw passwords are not stored, so there is no way to see " "this user's password, but you can change it by " - "using this form.")) + "using this form.")) def clean_password(self): # Regardless of what the user provides, return the initial value. @@ -75,7 +75,7 @@ class NonStoredUserChangeForm(forms.ModelForm): password = forms.CharField(label=_("Password"), required=False, widget=SpanWidget(display='Unknown password'), help_text=_("This service's password is not stored, so there is no way to see it, " - "but you can change it using this form.")) + "but you can change it using this form.")) class ReadOnlyFormMixin(object): diff --git a/orchestra/templates/admin/orchestra/menu.html b/orchestra/templates/admin/orchestra/menu.html index 1b1ae184..7ae238d2 100644 --- a/orchestra/templates/admin/orchestra/menu.html +++ b/orchestra/templates/admin/orchestra/menu.html @@ -49,18 +49,23 @@
{% for item in menu.children %}{% admin_tools_render_menu_item item forloop.counter %}{% endfor %} -
- -
- - {% url 'admin:accounts_account_change' user.pk as user_change_url %} - {% filter force_escape %}{% firstof user.get_short_name user.username %}{% endfilter %} - Change password / Log out + + + + {% url 'admin:accounts_account_change' user.pk as user_change_url %} + {% filter force_escape %}{% firstof user.get_short_name user.username %}{% endfilter %} + Change password / Log out
{% endif %}