Blame view
src/pages/forgetpassword.vue
3.55 KB
93a68cfa1
|
1 2 |
<template> <v-app id="login"> |
07095d4d8
|
3 |
<v-toolbar color="grey lighten"> |
93a68cfa1
|
4 |
<v-toolbar-items> |
07095d4d8
|
5 |
<img src="/static/ana@2x.png" height="36" alt="ana" /> |
93a68cfa1
|
6 7 8 9 10 |
</v-toolbar-items> </v-toolbar> <v-content> <v-container fluid fill-height> <v-layout align-center justify-center> |
03dcbf0c1
|
11 |
<v-flex xs12 sm8 md7 lg5> |
7e8044568
|
12 13 |
<v-toolbar color="black" dark> <v-spacer></v-spacer> |
93a68cfa1
|
14 |
<v-toolbar-title>Forget Password</v-toolbar-title> |
03dcbf0c1
|
15 |
<v-spacer></v-spacer> |
93a68cfa1
|
16 |
</v-toolbar> |
04e3fbc56
|
17 |
<v-card class="elevation-1 pa-1"> |
93a68cfa1
|
18 |
<v-card-text> |
03dcbf0c1
|
19 20 21 |
<h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5> <h5 class="text-xs-center"> We'll send you a reset.</h5> <v-flex lg4 sm6 xs10 offset-sm3 offset-xs1 offset-lg4> |
4413a8d93
|
22 23 |
<v-form class="mt-4"> <div class="custom-input-align"> |
7e8044568
|
24 |
<v-text-field |
4413a8d93
|
25 26 |
class="text-md-center" v-validate="'required|email'" |
03dcbf0c1
|
27 |
v-model="changePassword" |
4413a8d93
|
28 29 30 |
:error-messages="errors.collect('email')" label="Enter Your email ID" data-vv-name="email" |
7e8044568
|
31 32 |
required> </v-text-field> |
03dcbf0c1
|
33 34 35 36 37 |
</div> </v-form></v-flex> </v-card-text> <v-card-actions> <v-flex text-xs-center> |
9f9522c1d
|
38 |
<v-btn round class="mt-1 button" color="black" dark large @click="reset">Send Request</v-btn></v-flex> |
93a68cfa1
|
39 |
</v-card-actions> |
04e3fbc56
|
40 41 |
<v-snackbar :timeout="timeout" |
03dcbf0c1
|
42 43 44 |
:top="y === 'top'" :right="x === 'right'" :vertical="mode === 'vertical'" |
04e3fbc56
|
45 |
v-model="snackbar" |
03dcbf0c1
|
46 47 48 49 |
:color= color > {{ text }} </v-snackbar> |
7e8044568
|
50 |
</v-snackbar> |
93a68cfa1
|
51 52 53 54 55 |
</v-card> </v-flex> </v-layout> </v-container> </v-content> |
03dcbf0c1
|
56 |
<v-footer class="pa-4" color="grey darken-2"> |
93a68cfa1
|
57 58 59 60 |
</v-footer> </v-app> </template> <script> |
03dcbf0c1
|
61 |
import http from '@/Services/http.js'; |
93a68cfa1
|
62 63 |
export default { data: () => ({ |
03dcbf0c1
|
64 |
changePassword:'', |
04e3fbc56
|
65 |
snackbar: false, |
03dcbf0c1
|
66 67 68 69 70 |
y: 'top', x: 'right', mode: '', timeout: 4000, text: '', |
93a68cfa1
|
71 |
loading: false, |
04e3fbc56
|
72 |
email: '' |
93a68cfa1
|
73 74 75 |
}), methods: { |
e173bab21
|
76 |
reset () { |
03dcbf0c1
|
77 78 |
http().get('/adminForgotPassword?email='+ this.changePassword) |
e173bab21
|
79 |
.then(response => { |
03dcbf0c1
|
80 81 82 83 84 85 86 87 |
console.log("response=====>",response); this.loading = true; if(this.snackbar=true){ this.text= "Please check your email and Copy your password!" } setTimeout(() => { this.$router.push('/'); }, 1000); |
e173bab21
|
88 |
}).catch(err => { |
03dcbf0c1
|
89 90 91 |
this.text="User Not Found or Incorrect Email" this.snackbar= true; this.loading = false; |
e173bab21
|
92 |
}) |
93a68cfa1
|
93 |
} |
03dcbf0c1
|
94 95 96 97 98 99 |
}, computed:{ color(){ return this.loading ? 'success' : 'error' } } |
93a68cfa1
|
100 101 102 103 104 105 106 107 108 109 110 111 112 |
}; </script> <style scoped lang="css"> #login { height: 50%; width: 100%; position: absolute; top: 0; left: 0; content: ""; z-index: 0; } |
04e3fbc56
|
113 114 115 116 117 118 119 120 |
img{ position:absolute; top:13px; left:50px; } .v-btn--large { padding: 0px 74px; } |
9f9522c1d
|
121 122 123 |
.button{ text-transform: none; } |
03dcbf0c1
|
124 125 126 127 128 129 130 131 132 |
@media screen and (max-width: 472px) { .v-btn--large { padding:0px 20px !important; font-size:13px; } h5 { font-size: 11px; } } |
a0fe54618
|
133 134 135 136 137 138 139 140 |
@media screen and (max-width: 600px) { img{ top:16px; left:10px; height: 24px; width: 66px;; } } |
93a68cfa1
|
141 |
</style> |