Datamanager 2 password widget

This is a simple widget to request a password. It will render two password input fields, whose values need to be identical for the password to be accepted. HTML_QuickForm compare rules are used to enforce this. The value is taken from any valid text type which has a value member, but initialization is always with an empty string, as this widget cannot (and should not) display an existing password. The rule is, that as long as the value is empty, no password change will be given to the caller during the synchronization (effectively skipping the operation).

Available configuration options:

  • string confirm_text: The confirm-note appended to the second fields label. This is put through the regular schema translation pipe and defaults to '(confirm)'.
package midcom.helper.datamanager2


_on_initialize ()

The initialization event handler verifies the used type.


booleanIndicating Success

add_elements_to_form ($attributes)

Adds a pair of password input fields as a group to the form.



freeze ()

Unfreeze the confirmation widget as well as the main widget.

sync_type_with_widget ($results)





string $confirm_text

The confirmation note appended to the label of the second, password confirmation field.

boolean $require_password

Explicitly allow empty password