|
@@ -7,6 +7,8 @@
|
|
|
|
|
|
use \Drupal\Core\Form\FormStateInterface;
|
|
|
use \Drupal\Core\Block\BlockPluginInterface;
|
|
|
+use \Drupal\Core\Url;
|
|
|
+use \Drupal\Core\Link;
|
|
|
|
|
|
/**
|
|
|
* implements hook_form_FORM_ID_alter()
|
|
@@ -24,6 +26,10 @@ function materio_user_form_user_login_form_alter(&$form, FormStateInterface $for
|
|
|
"@keyup.enter" => "login"
|
|
|
);
|
|
|
|
|
|
+ $url = Url::fromRoute('user.pass');
|
|
|
+ $form['pass']['#description'] = Link::fromTextAndUrl('Forgot your password?', $url)->toString();
|
|
|
+ // "<a href="{{ path('user.pass') }}">{{ 'Forgot your password?'|t }}</a>";
|
|
|
+
|
|
|
$form['actions']['submit']['#attributes'] = array(
|
|
|
"@click.prevent" => "login"
|
|
|
);
|
|
@@ -59,6 +65,7 @@ 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 Lowercase and Uppercase Letters, numbers, and punctuation.');
|
|
|
$element['pass1']['#attributes'] += array(
|
|
|
"v-model" => "pass1",
|
|
|
"placeholder" => $element['pass1']['#title'],
|