2 lines
1.8 KiB
JavaScript
2 lines
1.8 KiB
JavaScript
import{u as d,m as c,j as s,L as p}from"./app-43FwoUKv.js";import{c as u}from"./index-C3aXnQRR.js";import{A as w}from"./AuthenticationCard-CH5UMK9r.js";import{I as r}from"./InputLabel-Cl3yDvOx.js";import{P as f}from"./PrimaryButton-Gixff4KF.js";import{T as o,I as t}from"./TextInput-CdoY_jBz.js";import"./AuthenticationCardLogo-DxGGqaxw.js";function P({token:i,email:m}){const n=d(),a=c({token:i,email:m,password:"",password_confirmation:""});function l(e){e.preventDefault(),a.post(n("password.update"),{onFinish:()=>a.reset("password","password_confirmation")})}return s.jsxs(w,{children:[s.jsx(p,{title:"Reset Password"}),s.jsxs("form",{onSubmit:l,children:[s.jsxs("div",{children:[s.jsx(r,{htmlFor:"email",children:"Email"}),s.jsx(o,{id:"email",type:"email",className:"mt-1 block w-full",value:a.data.email,onChange:e=>a.setData("email",e.currentTarget.value),required:!0,autoFocus:!0}),s.jsx(t,{className:"mt-2",message:a.errors.email})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(r,{htmlFor:"password",children:"Password"}),s.jsx(o,{id:"password",type:"password",className:"mt-1 block w-full",value:a.data.password,onChange:e=>a.setData("password",e.currentTarget.value),required:!0,autoComplete:"new-password"}),s.jsx(t,{className:"mt-2",message:a.errors.password})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(r,{htmlFor:"password_confirmation",children:"Confirm Password"}),s.jsx(o,{id:"password_confirmation",type:"password",className:"mt-1 block w-full",value:a.data.password_confirmation,onChange:e=>a.setData("password_confirmation",e.currentTarget.value),required:!0,autoComplete:"new-password"}),s.jsx(t,{className:"mt-2",message:a.errors.password_confirmation})]}),s.jsx("div",{className:"flex items-center justify-end mt-4",children:s.jsx(f,{className:u({"opacity-25":a.processing}),disabled:a.processing,children:"Reset Password"})})]})]})}export{P as default};
|