mirror of
https://github.com/exane/not-gwent-online
synced 2025-11-08 09:08:40 +00:00
little register logic
This commit is contained in:
@@ -4,11 +4,21 @@ module.exports = {
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
username: '',
|
||||
password: '',
|
||||
email: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
register: function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
console.log("bal");
|
||||
if( ! this.username || ! this.password || ! this.email) {
|
||||
$('.form-error').hide().fadeIn('fast');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<form class="form-session">
|
||||
<input type="text" placeholder="Username" class="field-session" autofocus>
|
||||
<input type="text" placeholder="E-Mail" class="field-session">
|
||||
<input type="password" placeholder="Password" class="field-session">
|
||||
<input type="text" placeholder="Username" class="field-session field-username" autofocus v-model="username">
|
||||
<input type="text" placeholder="E-Mail" class="field-session field-email" v-model="email">
|
||||
<input type="password" placeholder="Password" class="field-session field-password" v-model="password">
|
||||
|
||||
<div class="wrap-btn-action btn-register-action" v-on="click: register">
|
||||
<input type="submit" value="Register" class="btn-action" v-on="submit: register">
|
||||
|
||||
Reference in New Issue
Block a user