fixed ajax register modal form
This commit is contained in:
@@ -55,9 +55,12 @@ function materio_user_form_user_modal_form_alter(&$form, FormStateInterface $for
|
||||
"title" => $form['account']['mail']['#description']
|
||||
);
|
||||
|
||||
// https://drupal.stackexchange.com/a/217112
|
||||
// ? https://drupal.stackexchange.com/a/217112
|
||||
// Get default process function array:
|
||||
$element_info = element_info('password_confirm');
|
||||
// $element_info = element_info('password_confirm');
|
||||
// ? https://api.drupal.org/api/drupal/core%21includes%21common.inc/function/element_info/8.2.x
|
||||
$element_info = \Drupal::service('element_info')->getInfo('password_confirm');
|
||||
|
||||
$process = $element_info['#process'];
|
||||
// Add our process function to the array:
|
||||
$process[] = '_materio_user_process_password_confirm';
|
||||
@@ -81,7 +84,6 @@ function materio_user_form_user_modal_form_alter(&$form, FormStateInterface $for
|
||||
}
|
||||
|
||||
function _materio_user_process_password_confirm($element){
|
||||
// ksm($element);
|
||||
$element['pass1']['#description'] = t('Password must contains height lowercase, uppercase, digits and special characters.');
|
||||
$element['pass1']['#attributes'] += array(
|
||||
"v-model" => "pass1",
|
||||
|
Reference in New Issue
Block a user