text: (window.webpackJsonp=window.webpackJsonp||[]).push([[28],{386:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("form",{staticClass:"reset-pwd-container login-pwd-reset",attrs:{id:"reset-pwd-form-"+t._uid,method:"post"}},[a("div",{ref:"pwdModal",staticClass:"modal fade",attrs:{id:"resetPwd",tabindex:"-1",role:"dialog"}},[a("div",{staticClass:"modal-dialog"},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("div",{staticClass:"modal-title h3"},[t._v(t._s(t.$translate("Ceres::Template.loginForgotPassword")))]),t._v(" "),a("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true","aria-label":t.$translate("Ceres::Template.closeIcon")}},[t._v("×")])]),t._v(" "),a("div",{staticClass:"modal-body"},[a("div",{staticClass:"alert alert-info w-100 pwd-forgot-info"},[a("span",{staticClass:"info-badge"},[t._v(t._s(t.$translate("Ceres::Template.loginForgotPasswordInfo")))])]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.honeypot,expression:"honeypot"}],staticClass:"honey",attrs:{type:"text",name:"username",autocomplete:"new-password",tabindex:"-1"},domProps:{value:t.honeypot},on:{input:function(e){e.target.composing||(t.honeypot=e.target.value)}}}),t._v(" "),a("div",{staticClass:"input-unit no-bottom",attrs:{"data-validate":"mail"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],attrs:{type:"email",name:"email",autocomplete:"email",id:"mail"+t._uid,"data-autofocus":""},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}}),t._v(" "),a("label",{attrs:{for:"mail"+t._uid}},[t._v(t._s(t.$translate("Ceres::Template.loginEmail"))+"*")])]),t._v(" "),a("span",{staticClass:"error-msg"},[t._v(t._s(t.$translate("Ceres::Template.loginEnterConfirmEmail")))])])])]),t._v(" "),a("div",{staticClass:"modal-footer"},[a("div",[t._t("extend-overlay-buttons"),t._v(" "),t.currentTemplate&&"tpl.login"!=t.currentTemplate?a("button",{staticClass:"btn btn-danger btn-medium mr-2",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.cancelResetPwd(e)}}},[a("i",{staticClass:"fa fa-arrow-left",attrs:{"aria-hidden":"true"}}),t._v("\n                                "+t._s(t.$translate("Ceres::Template.loginBackToLogin"))+"\n                            ")]):t._e(),t._v(" "),a("button",{staticClass:"btn btn-primary btn-medium",attrs:{disabled:t.isDisabled},on:{click:function(e){return e.preventDefault(),t.validateResetPwd(e)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.$translate("Ceres::Template.loginSend"))+"\n\t\t\t\t\t\t\t\t"),a("icon",{attrs:{icon:"paper-plane-o",loading:t.isDisabled}})],1)],2)])])])])])};s._withStripped=!0;a(119),a(21);var o=a(6),n=a(12),i=a(66),r=a(37),l=a(24),d=a(1),u={name:"forgot-password-modal",props:{currentTemplate:String},data:function(){return{username:"",isDisabled:!1,honeypot:""}},mounted:function(){var t=this;this.$nextTick((function(){$(t.$refs.pwdModal).on("hidden.bs.modal",(function(){t.username=""}));var e=l.a.getUrlParams(document.location.search);Object(d.e)(e.show)||"forgotPassword"!==e.show||(i.default.findModal(t.$refs.pwdModal).show(),t.username=Object(d.e)(e.email)?"":e.email)}))},watch:{username:function(t,e){this.resetError()}},methods:{validateResetPwd:function(){var t=this;r.default.validate(this.$refs.pwdModal).done((function(){t.sendResetPwd()})).fail((function(t){r.default.markInvalidFields(t,"error")}))},sendResetPwd:function(){var t=this;this.isDisabled=!0,o.default.post("/rest/io/customer/password_reset",{email:this.username,honeypot:this.honeypot}).done((function(){i.default.findModal(t.$refs.pwdModal).hide(),t.isDisabled=!1,n.default.success(t.$translate("Ceres::Template.loginSendEmailOk")).closeAfter(5e3)})).fail((function(){t.isDisabled=!1,n.default.error(t.$translate("Ceres::Template.loginResetPwDErrorOnSendEmail")).closeAfter(5e3)}))},cancelResetPwd:function(){this.resetError(),i.default.findModal(this.$refs.pwdModal).hide().then((function(){i.default.findModal(document.getElementById("login")).show()}))},resetError:function(){r.default.unmarkAllFields(this.$refs.pwdModal)}}},c=a(5),m=Object(c.a)(u,s,[],!1,null,null,null);m.options.__file="resources/js/src/app/components/customer/login/ForgotPassword.vue";e.default=m.exports}}]);
  //# sourceMappingURL=ceres-28.min.js.map