소스 검색

Redirecting when cancel button on registration pages are clicked

master
Lene Scholtz 5 년 전
부모
커밋
a9c5ada928
2개의 변경된 파일20개의 추가작업 그리고 4개의 파일을 삭제
  1. 10
    2
      src/components/user/registerAgencySection.vue
  2. 10
    2
      src/components/user/registerPage.vue

+ 10
- 2
src/components/user/registerAgencySection.vue 파일 보기

@@ -200,7 +200,11 @@
200 200
               <button @click="SubmitData()" class="btn btn-b-n" type="button">Submit</button>
201 201
             </div>
202 202
             <div class="col-md-2 offset-md-1">
203
-              <button @click="Cancel()" class="btn btn-b-n" type="button">Cancel</button>
203
+              <button
204
+                @click="Close(routerGoTo('/user/login'))"
205
+                class="btn btn-b-n"
206
+                type="button"
207
+              >Cancel</button>
204 208
             </div>
205 209
           </div>
206 210
         </div>
@@ -244,6 +248,10 @@ export default {
244 248
       'clearAgency',
245 249
     ]),
246 250
 
251
+    routerGoTo(goTo) {
252
+      this.$emit('routerGoTo', goTo);
253
+    },
254
+
247 255
     togglePassword() {
248 256
       this.showPassword = true;
249 257
       this.isPasswordShown = 'text';
@@ -257,7 +265,7 @@ export default {
257 265
       this.$router.push('/user/login');
258 266
     },
259 267
     Close() {
260
-      this.$router.push('/registerAgency/');
268
+      this.$router.push('/user/login');
261 269
     },
262 270
   },
263 271
 };

+ 10
- 2
src/components/user/registerPage.vue 파일 보기

@@ -146,7 +146,11 @@
146 146
               <button @click="SubmitData()" class="btn btn-b-n" type="submit">Submit</button>
147 147
             </div>
148 148
             <div class="col-md-2 offset-md-1">
149
-              <button @click="Cancel()" class="btn btn-b-n" type="submit">Cancel</button>
149
+              <button
150
+                @click="Close(routerGoTo('/user/login'))"
151
+                class="btn btn-b-n"
152
+                type="submit"
153
+              >Cancel</button>
150 154
             </div>
151 155
           </div>
152 156
         </div>
@@ -192,6 +196,10 @@ export default {
192 196
       'clearIndividual',
193 197
     ]),
194 198
 
199
+    routerGoTo(goTo) {
200
+      this.$emit('routerGoTo', goTo);
201
+    },
202
+
195 203
     togglePassword() {
196 204
       this.showPassword = true;
197 205
       this.isPasswordShown = 'text';
@@ -206,7 +214,7 @@ export default {
206 214
       this.$router.push('/user/login');
207 215
     },
208 216
     Close() {
209
-      this.$router.push('/registerIndividual/');
217
+      this.$router.push('/user/login');
210 218
     },
211 219
   },
212 220
 };

Loading…
취소
저장