fixed register modal form submit disabled

This commit is contained in:
Bachir Soussi Chiadmi 2022-02-22 10:11:14 +01:00
parent dee3365fa4
commit 72cc12b49b
4 changed files with 11 additions and 6 deletions

View File

@ -69,7 +69,8 @@ function materio_user_form_user_modal_form_alter(&$form, FormStateInterface $for
$form['actions']['submit']['#attributes'] = array( $form['actions']['submit']['#attributes'] = array(
"@click.prevent" => "register", "@click.prevent" => "register",
"@keyup.enter" => "register", "@keyup.enter" => "register",
"ref" => "register" "ref" => "register",
"disabled" => true
// ":class" => "can_register" // ":class" => "can_register"
); );

File diff suppressed because one or more lines are too long

View File

@ -55,11 +55,15 @@ export default {
}, },
checkSubmitEnabled () { checkSubmitEnabled () {
console.log("checkSubmitEnabled", this) console.log("checkSubmitEnabled", this)
if (this.ps === 'Strong') { // debugger;
this.$refs.register.disabled = false if (this.$refs.register) {
} else { if (this.ps === 'Strong') {
this.$refs.register.disabled = true this.$refs.register.disabled = false
} else {
this.$refs.register.disabled = true
}
} }
}, },
register () { register () {
console.log('register', this.mail, this.pass1, this.pass2) console.log('register', this.mail, this.pass1, this.pass2)