Преглед на файлове

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
               <button @click="SubmitData()" class="btn btn-b-n" type="button">Submit</button>
200
               <button @click="SubmitData()" class="btn btn-b-n" type="button">Submit</button>
201
             </div>
201
             </div>
202
             <div class="col-md-2 offset-md-1">
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
             </div>
208
             </div>
205
           </div>
209
           </div>
206
         </div>
210
         </div>
244
       'clearAgency',
248
       'clearAgency',
245
     ]),
249
     ]),
246
 
250
 
251
+    routerGoTo(goTo) {
252
+      this.$emit('routerGoTo', goTo);
253
+    },
254
+
247
     togglePassword() {
255
     togglePassword() {
248
       this.showPassword = true;
256
       this.showPassword = true;
249
       this.isPasswordShown = 'text';
257
       this.isPasswordShown = 'text';
257
       this.$router.push('/user/login');
265
       this.$router.push('/user/login');
258
     },
266
     },
259
     Close() {
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
               <button @click="SubmitData()" class="btn btn-b-n" type="submit">Submit</button>
146
               <button @click="SubmitData()" class="btn btn-b-n" type="submit">Submit</button>
147
             </div>
147
             </div>
148
             <div class="col-md-2 offset-md-1">
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
             </div>
154
             </div>
151
           </div>
155
           </div>
152
         </div>
156
         </div>
192
       'clearIndividual',
196
       'clearIndividual',
193
     ]),
197
     ]),
194
 
198
 
199
+    routerGoTo(goTo) {
200
+      this.$emit('routerGoTo', goTo);
201
+    },
202
+
195
     togglePassword() {
203
     togglePassword() {
196
       this.showPassword = true;
204
       this.showPassword = true;
197
       this.isPasswordShown = 'text';
205
       this.isPasswordShown = 'text';
206
       this.$router.push('/user/login');
214
       this.$router.push('/user/login');
207
     },
215
     },
208
     Close() {
216
     Close() {
209
-      this.$router.push('/registerIndividual/');
217
+      this.$router.push('/user/login');
210
     },
218
     },
211
   },
219
   },
212
 };
220
 };

Loading…
Отказ
Запис