Blame view
src/components/ChangePassword.vue
6.56 KB
5684145ce
|
1 2 3 4 |
<template> <main class="landing-page"> <div class="container-fluid main-wrp"> <nav class="navbar navbar-expand-sm spotLight-nav"> |
56f4b7548
|
5 |
<a class="navbar-brand" href="javascript:void(0);" |
5684145ce
|
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
><img src="../assets/images/logo.png" /></a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample03" aria-controls="navbarsExample03" aria-expanded="false" aria-label="Toggle navigation" > <span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarsExample03"> <ul class="navbar-nav mr-auto"> <li class="nav-item active"> |
56f4b7548
|
25 |
<a class="nav-link" href="javascript:void(0);">About</a> |
5684145ce
|
26 27 |
</li> <li class="nav-item"> |
56f4b7548
|
28 |
<a class="nav-link" href="javascript:void(0);">Masterclass</a> |
5684145ce
|
29 30 |
</li> <li class="nav-item"> |
56f4b7548
|
31 |
<a class="nav-link" href="javascript:void(0);">Stories</a> |
5684145ce
|
32 33 |
</li> <li class="nav-item spotLight-img"> |
56f4b7548
|
34 |
<a class="nav-link" href="javascript:void(0);" |
5684145ce
|
35 36 37 38 |
><img src="../assets/images/SPOTLight.svg" /></a> </li> <li class="nav-item"> |
56f4b7548
|
39 |
<a class="nav-link" href="javascript:void(0);">Library</a> |
5684145ce
|
40 41 42 43 44 45 46 47 48 |
</li> </ul> </div> </nav> <!-- menu wrapper --> <div class="sign-wrp"> <div class="row col-reverse"> <div class="col-sm-3 col-md-1 col-lg-1 col-xl-3"></div> <!-- users land image --> |
56f4b7548
|
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 |
<div class="col-sm-5 col-md-6 col-lg-7 col-xl-4 wc-spc-lf-tp"> <h1> <!-- Welcome to <br /> Productgrowth --> Hello, there!<br /> welcome to spotlight </h1> <ul class="sign-in-up-list"> <li> <img src="../assets/images/check.svg" /><span >Collaborate, Contribute and Explore with fellow product enthusiasts</span > </li> <li> <img src="../assets/images/check.svg" /><span >Get access to insightful Case Studies and participate in Roundtables</span > </li> <li> <img src="../assets/images/check.svg" /><span >Engage actively on the Bounce Board - we’re all ears! </span > </li> </ul> </div> |
5684145ce
|
76 77 78 79 80 81 82 83 |
<!-- users land image --> <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> <div class="form-layout signup-frm-spc"> <form> <!-- <h5>SignUp Using</h5> --> <div class="social-login" style="visibility: hidden"> <ul> <li> |
56f4b7548
|
84 |
<a href="javascript:void(0);"><img src="../assets/images/google.svg" /></a> |
5684145ce
|
85 86 |
</li> <li> |
56f4b7548
|
87 |
<a href="javascript:void(0);"><img src="../assets/images/linkdin.svg" /></a> |
5684145ce
|
88 89 |
</li> <li> |
56f4b7548
|
90 |
<a href="javascript:void(0);"><img src="../assets/images/twitter.svg" /></a> |
5684145ce
|
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
</li> </ul> </div> <h5> Setup a new password. Please enter the OTP shared to {{email}} to confirm your email address </h5> <div class="fill-form"> <label for="inputEmail" class="sr-only">OTP</label> <input type="text" id="inputEmail" class="form-control" placeholder="Your OTP" v-model="otp" autocomplete="off" /> <label for="inputEmail" class="sr-only">New Password</label> <input type="password" id="inputEmail" class="form-control" placeholder="Your New Password" v-model="password" autocomplete="off" /> <!-- <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> --> <a href="javascript:void(0);" class="btn btn-lg sb-button" @click="changePassword"> |
d974d3228
|
123 |
<img src="../assets/images/password-reload.png" />Update Password |
5684145ce
|
124 |
</a> |
56f4b7548
|
125 |
<h3 class="ft-normal">Didn’t Get the OTP? <a class="cursor-pointer no-underline" @click="ResendEmail">Resend</a></h3> |
5684145ce
|
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
<!-- <h3>Didn’t Get the OTP?<a @click="goToLogin">Login</a></h3> --> </div> </form> </div> </div> <!-- sign up --> </div> </div> <!-- body wrapper --> </div> </main> </template> <script> import Vue from "vue"; import router from "../router"; import axios from "axios"; export default { name: "ChangePassword", data() { return { email:null, otp:null, password:null, }; }, mounted() { this.email = localStorage.getItem("spotlight_email"); console.log("this.$route.params.flag",this.$route.params.flag) if(this.$route.params.flag == true){ this.ResendEmail(false); } }, methods: { goToLogin() { |
56f4b7548
|
164 |
this.$router.push("/login"); |
5684145ce
|
165 166 167 168 169 170 171 172 |
}, changePassword(){ axios .post("/resetPassword", {'email':this.email,'otp':this.otp,'newPassword':this.password}) .then((response) => { console.log("resetPassword- response",response) this.$toaster.success(response.data.message) if(response.data.status == "success"){ |
56f4b7548
|
173 |
this.$router.push("/login"); |
5684145ce
|
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
} }) .catch( (error) =>{ if (error.response) { this.$toaster.error(error.response.data.message) } }); }, ResendEmail(){ axios .post("/forgotPassword", {'email':this.email,'otp':true}) .then((response) => { console.log("forgotPassword- response",response) this.$toaster.success(response.data.message) }) .catch( (error) =>{ if (error.response) { this.$toaster.error(error.response.data.message) } }); } }, }; </script> |