1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-12-23 21:03:14 +00:00

little register logic

This commit is contained in:
devfake 2015-06-23 15:10:01 +02:00
parent 75990b84c7
commit 313c660ba5
4 changed files with 25 additions and 4 deletions

View File

@ -18,6 +18,8 @@
<a class="btn-second btn-guest" v-on="click: asGuest">Play as guest <i class="icon-guest-load"></i></a>
<a class="btn-none btn-login" v-on="click: openLogin">Login</a>
<span class="form-error">Nope Nope</span>
</div>
</div>
</section>

View File

@ -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;
}

View File

@ -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">

View File

@ -101,4 +101,13 @@
}
:-ms-input-placeholder {
color: darken(#8798ac, 10%);
}
.form-error {
float: left;
clear: both;
color: #c64b4b;
font-size: 15px;
margin: 20px 0;
display: none;
}