Commit 603a067025c890b9e6a623ec6f11be26897697e2
1 parent
1c19423626
Exists in
master
and in
3 other branches
implemented change and forgot password funcatinallity
Showing
3 changed files
with
22 additions
and
24 deletions
Show diff stats
src/pages/Authentication/Login.vue
1 | 1 | <template> |
2 | 2 | <v-app id="login"> |
3 | - <v-toolbar color="grey lighten"> | |
3 | + <v-toolbar class="fixcolor"> | |
4 | 4 | <v-toolbar-items> |
5 | 5 | <!-- <img src="/static/ana@2x.png" height="36" alt="ana"> --> |
6 | 6 | <h3 class="white--text my-3 ml-4">School-Management</h3> |
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | >{{ text }}</v-snackbar> |
19 | 19 | <v-layout align-center justify-center> |
20 | 20 | <v-flex xs12 sm10 md6 lg4> |
21 | - <v-toolbar color="black" dark> | |
21 | + <v-toolbar class="fixcolor" dark> | |
22 | 22 | <v-spacer></v-spacer> |
23 | 23 | <v-toolbar-title>School Login</v-toolbar-title> |
24 | 24 | <v-spacer></v-spacer> |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | </v-form> |
48 | 48 | <v-layout row wrap> |
49 | 49 | <v-flex xs6> |
50 | - <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> | |
50 | + <!-- <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> --> | |
51 | 51 | </v-flex> |
52 | 52 | <v-flex xs6> |
53 | 53 | <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword" style="border-bottom: 2px solid #aaa;">Forgot Password</router-link></h5> |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | </v-card-text> |
58 | 58 | <v-layout> |
59 | 59 | <v-flex sm12 class="my-3"> |
60 | - <v-btn style="margin: auto;display: block;" round color="black" dark large @click="login" :loading="loading">Login</v-btn> | |
60 | + <v-btn style="margin: auto;display: block;b" class="fixcolor" round dark large @click="login" :loading="loading">Login</v-btn> | |
61 | 61 | </v-flex> |
62 | 62 | </v-layout> |
63 | 63 | <v-layout> |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | </v-layout> |
68 | 68 | </v-container> |
69 | 69 | </v-content> |
70 | - <v-footer class="pa-4" color="grey darken-2"></v-footer> | |
70 | + <v-footer class="pa-4" style="background:linear-gradient(90deg,#f58753 30%,#f15e5f 110%)"></v-footer> | |
71 | 71 | </v-app> |
72 | 72 | </template> |
73 | 73 | ... | ... |
src/pages/Authentication/changepassword.vue
1 | 1 | <template> |
2 | 2 | <v-app id="login"> |
3 | - <!-- <v-toolbar color="grey lighten"> | |
4 | - <v-toolbar-items> | |
5 | - <img src="/static/ana@2x.png" height="36" alt="ana"> | |
6 | - </v-toolbar-items> | |
7 | - </v-toolbar> --> | |
8 | - <!-- <v-content> --> | |
9 | 3 | <app-toolbar class="app--toolbar"></app-toolbar> |
10 | 4 | <v-container fluid fill-height> |
11 | 5 | <v-layout> |
12 | - <v-flex xs12 sm8 md8 lg5 offset-sm2 offset-lg3> | |
13 | - <v-toolbar color="black" dark> | |
6 | + <v-flex xs12 sm8 md8 lg5 offset-sm2 offset-lg3 class="mt-5"> | |
7 | + <v-toolbar class="fixcolors mt-5" dark> | |
14 | 8 | <v-spacer></v-spacer> |
15 | 9 | <v-toolbar-title>Change Password</v-toolbar-title> |
16 | 10 | <v-spacer></v-spacer> |
... | ... | @@ -22,7 +16,6 @@ |
22 | 16 | <v-form class="mt-3" > |
23 | 17 | <v-text-field |
24 | 18 | :rules="[rules.required]" |
25 | - | |
26 | 19 | v-model="adminChangePasswordcredentials.oldPassword" |
27 | 20 | label="Old Password"> |
28 | 21 | </v-text-field> | ... | ... |
src/pages/Authentication/forgetpassword.vue
1 | 1 | <template> |
2 | 2 | <v-app id="login"> |
3 | - <v-toolbar color="grey lighten"> | |
3 | + <v-toolbar class="fixcolors"> | |
4 | 4 | <v-toolbar-items> |
5 | 5 | <!-- <img src="/static/ana@2x.png" height="36" alt="ana" /> --> |
6 | 6 | <h3 class="white--text my-3 ml-4">School-Management</h3> |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | <v-container fluid class="content"> |
24 | 24 | <v-layout align-center justify-center fill-height> |
25 | 25 | <v-flex xs12 sm8 md7 lg8> |
26 | - <v-toolbar color="black" dark> | |
26 | + <v-toolbar class="fixcolors" dark> | |
27 | 27 | <v-spacer></v-spacer> |
28 | 28 | <v-toolbar-title>Forget Password</v-toolbar-title> |
29 | 29 | <v-spacer></v-spacer> |
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5> |
34 | 34 | <h5 class="text-xs-center"> We'll send you a reset.</h5> |
35 | 35 | <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3> |
36 | - <v-form class="mt-4"> | |
36 | + <v-form ref="form" v-model="valid" lazy-validation> | |
37 | 37 | <div class="custom-input-align"> |
38 | 38 | <v-text-field |
39 | 39 | class="text-md-center" |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | </v-card-text> |
48 | 48 | <v-card-actions> |
49 | 49 | <v-flex text-xs-center> |
50 | - <v-btn round class="mt-1 button" color="black" dark large @click="reset">Send Request</v-btn> | |
50 | + <v-btn round class="mt-1 button fixcolors" dark large @click="reset">Send Request</v-btn> | |
51 | 51 | </v-flex> |
52 | 52 | </v-card-actions> |
53 | 53 | <v-snackbar |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | <v-container fluid fill-height> |
73 | 73 | <v-layout align-center justify-center> |
74 | 74 | <v-flex xs12 sm8 md7 lg8> |
75 | - <v-toolbar color="black" dark> | |
75 | + <v-toolbar class="fixcolors" dark> | |
76 | 76 | <v-spacer></v-spacer> |
77 | 77 | <v-toolbar-title>Forget Password</v-toolbar-title> |
78 | 78 | <v-spacer></v-spacer> |
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | </v-card-text> |
107 | 107 | <v-card-actions> |
108 | 108 | <v-flex text-xs-center> |
109 | - <v-btn round class="mt-1 button" color="black" dark large @click="resetPassword">Send Request</v-btn> | |
109 | + <v-btn round class="mt-1 button fixcolors" dark large @click="resetPassword">Send Request</v-btn> | |
110 | 110 | </v-flex> |
111 | 111 | </v-card-actions> |
112 | 112 | <v-snackbar |
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 | </v-container> |
127 | 127 | </v-content> |
128 | 128 | <v-btn |
129 | - color="black" | |
129 | + color="primary" | |
130 | 130 | dark |
131 | 131 | @click="e2 = 1" |
132 | 132 | > |
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | </v-flex> |
141 | 141 | </v-layout> |
142 | 142 | </v-container> |
143 | - <v-footer class="pa-4" color="grey darken-2"> | |
143 | + <v-footer class="pa-4 fixcolors"> | |
144 | 144 | </v-footer> |
145 | 145 | </v-app> |
146 | 146 | </template> |
... | ... | @@ -165,9 +165,12 @@ export default { |
165 | 165 | forgetemail:'', |
166 | 166 | password:'', |
167 | 167 | changepassword:'', |
168 | + valid: true, | |
168 | 169 | emailRules: [ |
169 | - v => !!v || "Email is required" | |
170 | - | |
170 | + v => !!v || "E-mail is required", | |
171 | + v => | |
172 | + /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || | |
173 | + "E-mail must be valid" | |
171 | 174 | ], |
172 | 175 | rules: { |
173 | 176 | required: value => !!value || "password is Required.", |
... | ... | @@ -182,6 +185,7 @@ export default { |
182 | 185 | |
183 | 186 | methods: { |
184 | 187 | reset () { |
188 | + if (this.$refs.form.validate()) { | |
185 | 189 | http().get('/schoolForgotPassword?email='+ this.forgetemail) |
186 | 190 | .then(response => { |
187 | 191 | // console.log("response=====>",response.data.data.token); |
... | ... | @@ -196,6 +200,7 @@ export default { |
196 | 200 | this.snackbar= true; |
197 | 201 | this.loading = false; |
198 | 202 | }) |
203 | + } | |
199 | 204 | }, |
200 | 205 | resetPassword(){ |
201 | 206 | let forgotPassword = { | ... | ... |