Merge "Control password field duplication"
This commit is contained in:
commit
1103077917
|
@ -237,6 +237,7 @@ class PasswordField(CharField):
|
|||
js = ('muranodashboard/js/passwordfield.js',)
|
||||
|
||||
def __init__(self, label, *args, **kwargs):
|
||||
self.confirm_input = kwargs.pop('confirm_input', True)
|
||||
help_text = kwargs.get('help_text')
|
||||
if not help_text:
|
||||
help_text = _('Enter a complex password with at least one letter, \
|
||||
|
|
|
@ -175,10 +175,10 @@ class UpdatableFieldsForm(forms.Form):
|
|||
|
||||
for name, field in six.iteritems(self.fields):
|
||||
updated_fields[name] = field
|
||||
if (isinstance(field, fields.PasswordField) and
|
||||
not field.has_clone and field.original):
|
||||
updated_fields[
|
||||
field.get_clone_name(name)] = field.clone_field()
|
||||
if isinstance(field, fields.PasswordField) and field.confirm_input:
|
||||
if not field.has_clone and field.original:
|
||||
updated_fields[
|
||||
field.get_clone_name(name)] = field.clone_field()
|
||||
|
||||
self.fields = updated_fields
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
|
||||
features:
|
||||
- Dynamic UI field of type *password* supports ``confirmInput`` parameter
|
||||
now. It controls whethere password field should be cloned or not.
|
||||
If application author decided to turn off automatic field cloning, he
|
||||
should set the new parameter to *false*.
|
||||
|
Loading…
Reference in New Issue