-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
108 lines (104 loc) · 5.65 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Starter Kit</title>
<link media="all" rel="stylesheet" href="assets/css/vendor.min.css">
<link media="all" rel="stylesheet" href="assets/css/style.min.css">
</head>
<body>
<div id="wrapper">
<div class="container">
<div id="form-app">
<div class="row">
<form @submit.prevent="addInfo" v-show="steps[stepIndex] === 'registration'" data-vv-scope="registration" class="col-md-6 offset-md-3">
<div class="form-group">
<label for="first-name">First name</label>
<input class="form-control" type="text" placeholder="First Name" name="first-name" v-validate data-vv-rules="required|min:4"
data-vv-as="First Name" :class="{'input': true, 'is-danger': errors.has('registration.first-name') }" v-model="userInfo.firstName">
<span v-show="errors.has('registration.first-name')" class="help is-danger">{{ errors.first('registration.first-name') }}</span>
</div>
<div class="form-group">
<label for="last-name">Last name</label>
<input class="form-control" type="text" placeholder="Last Name" name="last-name" v-validate data-vv-rules="required|min:4"
data-vv-as="Last Name" :class="{'input': true, 'is-danger': errors.has('registration.last-name') }" v-model="userInfo.lastName">
<span v-show="errors.has('registration.last-name')" class="help is-danger">{{ errors.first('registration.last-name') }}</span>
</div>
<label for="user-email">Email</label>
<input class="form-control" type="text" placeholder="Last Name" name="email" v-validate data-vv-rules="required|email" data-vv-as="Email"
:class="{'input': true, 'is-danger': errors.has('registration.email') }" v-model="userInfo.userEmail">
<span v-show="errors.has('registration.email')" class="help is-danger">{{ errors.first('registration.email') }}</span>
<div class="form-group">
<label for="user-age">Age</label>
<input class="form-control" type="text" placeholder="Age" name="age" v-validate data-vv-rules="numeric|min_value:1|max_value:120"
data-vv-as="Age" :class="{'input': true, 'is-danger': errors.has('registration.age') }" v-model="userInfo.userAge">
<span v-show="errors.has('registration.age')" class="help is-danger">{{ errors.first('registration.age') }}</span>
</div>
<div class="form-group">
<label for="user-skype">Skype</label>
<input class="form-control" type="text" placeholder="Skype" name="skype" v-validate data-vv-rules="min:4|max:10" data-vv-as="Skype"
:class="{'input': true, 'is-danger': errors.has('registration.skype') }" v-model="userInfo.userSkype">
<span v-show="errors.has('registration.skype')" class="help is-danger">{{ errors.first('registration.skype') }}</span>
</div>
<div class="row">
<button class="btn btn-default" type="button" @click="back">Back</button>
<button class="btn btn-default">Next</button>
</div>
</form>
<form @submit.prevent="addInfo" novalidate v-show="steps[stepIndex] === 'info'" class="col-md-6 offset-md-3" data-vv-scope="info">
<div class="form-group">
<label for="user-hobby">hobby</label>
<input class="form-control" type="text" id="user-hobby" placeholder="Hobby" v-model="userInfo.userHobby">
</div>
<div class="form-group">
<label for="user-telephone">Telephone</label>
<input class="form-control" type="text" id="user-telephone" placeholder="Telephone" v-model="userInfo.userTelephone">
</div>
<div class="form-group">
<label for="user-nickname">Nickname</label>
<input class="form-control" type="text" placeholder="Nickname" name="nickname" v-validate data-vv-rules="nickname" data-vv-as="Nickname"
:class="{'input': true, 'is-danger': errors.has('nickname') }" v-model="userInfo.nickname">
<span v-show="errors.has('info.nickname')" class="help is-danger">{{ errors.first('info.nickname') }}</span>
</div>
<div class="row">
<button class="btn btn-default" type="button" @click="back">Back</button>
<button class="btn btn-default">Add info</button>
</div>
</form>
</div>
<div class="row">
<table class="table table-striped">
<tr>
<th>Nickname</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Age</th>
<th>Skype</th>
<th>Telephone</th>
<th>Hobby</th>
<td></td>
</tr>
<tr v-for="(user, index) in users">
<td>{{user.nickname}}</td>
<td>{{user.firstName}}</td>
<td>{{user.lastName}}</td>
<td>{{user.userEmail}}</td>
<td>{{user.userAge}}</td>
<td>{{user.userSkype}}</td>
<td>{{user.userTelephone}}</td>
<td>{{user.userHobby}}</td>
<td>
<button class="btn btn-xs btn-warning" @click="deleteUser(index)">delete</button>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<script src="assets/js/vendor.min.js" defer></script>
<script src="assets/js/app.js" defer></script>
</body>
</html>