added login failed message (remains register message); installed flood_control contrib module
This commit is contained in:
@@ -15,15 +15,15 @@ use \Drupal\Core\Link;
|
||||
*
|
||||
*/
|
||||
function materio_user_form_user_login_form_alter(&$form, FormStateInterface $form_state, $form_id) {
|
||||
// Drupal::logger('materio_user')->notice(print_r($form, true));
|
||||
|
||||
$form['name']['#attributes'] += array(
|
||||
"v-model" => "mail",
|
||||
"@keyup.enter" => "login"
|
||||
// "@keyup.enter" => "login"
|
||||
);
|
||||
|
||||
$form['pass']['#attributes'] = array(
|
||||
"v-model" => "password",
|
||||
"@keyup.enter" => "login"
|
||||
// "@keyup.enter" => "login"
|
||||
);
|
||||
|
||||
$url = Url::fromRoute('user.pass');
|
||||
@@ -34,6 +34,14 @@ function materio_user_form_user_login_form_alter(&$form, FormStateInterface $for
|
||||
"@click.prevent" => "login"
|
||||
);
|
||||
|
||||
$form['message'] = array(
|
||||
'#markup' => '
|
||||
<span class="login-message" v-if="loginMessage">
|
||||
{{ loginMessage }}
|
||||
</span>
|
||||
'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function materio_user_form_user_modal_form_alter(&$form, FormStateInterface $form_state, $form_id) {
|
||||
|
Reference in New Issue
Block a user