text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Register"],{"73cf":function(e,r,s){"use strict";s.r(r);var a=function(){var e=this,r=e.$createElement,s=e._self._c||r;return s("div",{staticClass:"container"},[s("h2",[e._v("Register Here")]),s("b-form",{staticClass:"w-100",on:{submit:e.handleSubmit,reset:e.onResetSignup}},[s("b-form-group",{attrs:{id:"form-name-signup-group",label:"Email:","label-for":"form-name-signup-input"}},[s("b-form-input",{class:{"is-invalid":e.submitted&&e.$v.form.email.$error},attrs:{id:"form-name-signup-input",type:"text",placeholder:"Enter Name"},model:{value:e.form.email,callback:function(r){e.$set(e.form,"email",r)},expression:"form.email"}}),e.submitted&&!e.$v.form.email.required?s("span",{staticClass:"invalid-feedback"},[e._v("Email is required")]):e._e(),e.submitted&&!e.$v.form.email.email?s("span",{staticClass:"invalid-feedback"},[e._v("Valid Email is required")]):e._e()],1),s("b-form-group",{attrs:{id:"form-uname-signup-group",label:"Desired Username:","label-for":"form-uname-signup-input"}},[s("b-form-input",{class:{"is-invalid":e.submitted&&e.$v.form.username.$error},attrs:{id:"form-uname-signup-input",type:"text",placeholder:"Enter Username"},model:{value:e.form.username,callback:function(r){e.$set(e.form,"username",r)},expression:"form.username"}}),e.submitted&&!e.$v.form.username.required?s("span",{staticClass:"invalid-feedback"},[e._v("Username is required")]):e._e()],1),s("b-form-group",{attrs:{id:"form-password-signup-group",label:"Password:","label-for":"form-password-signup-input"}},[s("b-form-input",{class:{"is-invalid":e.submitted&&e.$v.form.password.$error},attrs:{id:"form-password-signup-input",type:"password",placeholder:"Enter password"},model:{value:e.form.password,callback:function(r){e.$set(e.form,"password",r)},expression:"form.password"}}),e.submitted&&!e.$v.form.password.required?s("span",{staticClass:"invalid-feedback"},[e._v("Password is required")]):e._e(),e.submitted&&!e.$v.form.password.minLength?s("span",{staticClass:"invalid-feedback"},[e._v("Minimum length of 6 characters")]):e._e()],1),s("b-form-group",{attrs:{id:"form-cpassword-signup-group",label:"Confirm Password:","label-for":"form-cpassword-signup-input"}},[s("b-form-input",{class:{"is-invalid":e.submitted&&e.$v.form.confirmPassword.$error},attrs:{id:"form-cpassword-signup-input",type:"password",placeholder:"Confirm password"},model:{value:e.form.confirmPassword,callback:function(r){e.$set(e.form,"confirmPassword",r)},expression:"form.confirmPassword"}}),e.submitted&&!e.$v.form.confirmPassword.required?s("span",{staticClass:"invalid-feedback"},[e._v("This field can't be left empty")]):e._e(),e.submitted&&!e.$v.form.confirmPassword.sameAsPassword?s("span",{staticClass:"invalid-feedback"},[e._v("Passwords do not match")]):e._e()],1),s("b-button",{staticClass:"mr-2",attrs:{type:"submit",variant:"primary"}},[e._v("Submit")]),s("b-button",{attrs:{type:"reset",variant:"danger"}},[e._v("Reset")])],1),e.showError?s("p",{attrs:{id:"error"}},[e._v("Username already exists")]):e._e()],1)},i=[],t=(s("96cf"),s("1da1")),o=s("5530"),n=s("b5ae"),m=s("2f62"),u={title:"SLDB - Signup Page",name:"Register",data:function(){return{form:{email:"",username:"",password:"",confirmPassword:""},showError:!1,submitted:!1}},validations:{form:{email:{required:n["required"],email:n["email"]},username:{required:n["required"]},password:{required:n["required"],minLength:Object(n["minLength"])(6)},confirmPassword:{required:n["required"],sameAsPassword:Object(n["sameAs"])("password")}}},methods:Object(o["a"])(Object(o["a"])({},Object(m["b"])(["Register"])),{},{submit:function(e){var r=this;return Object(t["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,r.Register(e);case 3:r.$router.push("/account"),r.showError=!1,s.next=10;break;case 7:s.prev=7,s.t0=s["catch"](0),r.showError=!0;case 10:case"end":return s.stop()}}),s,null,[[0,7]])})))()},handleSubmit:function(e){if(e.preventDefault(),this.submitted=!0,this.$v.$touch(),!this.$v.$invalid){var r={email:this.form.email,username:this.form.username,password:this.form.password};this.submit(r)}},initForm:function(){this.form.email="",this.form.username="",this.form.password="",this.form.confirmPassword=""},onResetSignup:function(e){e.preventDefault(),this.initForm()}})},d=u,l=s("2877"),f=Object(l["a"])(d,a,i,!1,null,"f8505ee8",null);r["default"]=f.exports}}]);
  //# sourceMappingURL=Register.60a913df.js.map