summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/forms_common.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 4c7fb32aa..93e1839f0 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -44,7 +44,7 @@ from ishtar_common.templatetags.link_to_window import simple_link_to_window
from .forms import FinalForm, FormSet, reverse_lazy, name_validator, \
TableSelect, ManageOldType, CustomForm, FieldType, FormHeader, \
FormSetWithDeleteSwitches, BSForm, get_data_from_formset, \
- file_size_validator, HistorySelect, CustomFormSearch, QAForm
+ file_size_validator, HistorySelect, CustomFormSearch, QAForm, IshtarForm
from ishtar_common.utils import is_downloadable, clean_session_cache, \
max_size_help
@@ -758,7 +758,7 @@ class PersonTypeForm(ManageOldType, forms.Form):
self.fields['person_type'].help_text = models.PersonType.get_help()
-class AccountForm(forms.Form):
+class AccountForm(IshtarForm):
form_label = _("Account")
associated_models = {'pk': models.Person}
currents = {'pk': models.Person}
@@ -774,6 +774,15 @@ class AccountForm(forms.Form):
label=_(u"New password (confirmation)"), max_length=128,
widget=forms.PasswordInput, required=False)
+ HEADERS = {
+ 'hidden_password': FormHeader(
+ _(u"New password"),
+ help_message=_("Keep theses fields empty if you do not want to "
+ "change password. On creation, if you leave these "
+ "fields empty, the user will not be able to "
+ "connect.")),
+ }
+
def __init__(self, *args, **kwargs):
person = None
if 'initial' in kwargs and 'pk' in kwargs['initial']: