forgot password
This commit is contained in:
parent
b8f51b41bd
commit
1d5ae904f9
@ -107,6 +107,11 @@ const AddEvent = () => {
|
|||||||
placeholder="Title (maximum 50 characters)" />
|
placeholder="Title (maximum 50 characters)" />
|
||||||
|
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{title ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{50 - title.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
@ -119,6 +124,11 @@ const AddEvent = () => {
|
|||||||
value={description}
|
value={description}
|
||||||
placeholder="Description (maximum 250 characters)" />
|
placeholder="Description (maximum 250 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{250 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
{/* Date* */}
|
{/* Date* */}
|
||||||
|
@ -127,6 +127,11 @@ const EditEvent = () => {
|
|||||||
value={title}
|
value={title}
|
||||||
placeholder="Title (maximum 50 characters)" />
|
placeholder="Title (maximum 50 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{title ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{50 - title.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilAudioDescription} />
|
<CIcon icon={cilAudioDescription} />
|
||||||
@ -138,6 +143,11 @@ const EditEvent = () => {
|
|||||||
value={description}
|
value={description}
|
||||||
placeholder="Description (maximum 250 characters)" />
|
placeholder="Description (maximum 250 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{250 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
{/* Date* */}
|
{/* Date* */}
|
||||||
|
@ -101,9 +101,15 @@ const AddFaqs = () => {
|
|||||||
value={topic}
|
value={topic}
|
||||||
placeholder="Topic ( maximum 50 character )" />
|
placeholder="Topic ( maximum 50 character )" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{topic ? <><span className="charLeft mb-3 fst-italic">
|
||||||
|
{50 - topic.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
|
|
||||||
<label htmlFor="exampleFormControlTextarea1" className="form-label">Description*</label>
|
<label htmlFor="exampleFormControlTextarea1" className="form-label fw-bold">Description*</label>
|
||||||
<textarea
|
<textarea
|
||||||
className="h-50 w-100"
|
className="h-50 w-100"
|
||||||
maxlength='500'
|
maxlength='500'
|
||||||
@ -113,7 +119,11 @@ const AddFaqs = () => {
|
|||||||
rows="5"
|
rows="5"
|
||||||
placeholder="Description ( maximum 500 character )">ewf3g</textarea>
|
placeholder="Description ( maximum 500 character )">ewf3g</textarea>
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft fst-italic mb-3">
|
||||||
|
{500 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
{/* <CInputGroup className="mb-3">
|
{/* <CInputGroup className="mb-3">
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,9 +113,14 @@ const EditFaqs = () => {
|
|||||||
value={topic}
|
value={topic}
|
||||||
placeholder="Topic ( maximum 50 character )" />
|
placeholder="Topic ( maximum 50 character )" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{topic ? <><span className="charLeft mb-3 fst-italic">
|
||||||
|
{50 - topic.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3 d-flex">
|
<CInputGroup className="mb-3 d-flex">
|
||||||
|
|
||||||
<label htmlFor="exampleFormControlTextarea1" className="form-label">Description*</label>
|
<label htmlFor="exampleFormControlTextarea1" className="form-label fw-bold">Description*</label>
|
||||||
<textarea
|
<textarea
|
||||||
className="h-50 w-100"
|
className="h-50 w-100"
|
||||||
maxlength='500'
|
maxlength='500'
|
||||||
@ -125,7 +130,11 @@ const EditFaqs = () => {
|
|||||||
rows="5"
|
rows="5"
|
||||||
placeholder="Description ( maximum 500 character )">ewf3g</textarea>
|
placeholder="Description ( maximum 500 character )">ewf3g</textarea>
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft fst-italic mb-3">
|
||||||
|
{500 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
{/* <CInputGroup className="mb-3">
|
{/* <CInputGroup className="mb-3">
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,7 +134,13 @@ const AddOffer = () => {
|
|||||||
onChange={(e) => setTitle(e.target.value)}
|
onChange={(e) => setTitle(e.target.value)}
|
||||||
value={title}
|
value={title}
|
||||||
placeholder="Title (maximum 50 characters)" />
|
placeholder="Title (maximum 50 characters)" />
|
||||||
|
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{title ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{50 - title.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
@ -147,6 +153,11 @@ const AddOffer = () => {
|
|||||||
value={description}
|
value={description}
|
||||||
placeholder="Description (maximum 250 characters)" />
|
placeholder="Description (maximum 250 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{250 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilBell} />
|
<CIcon icon={cilBell} />
|
||||||
|
@ -144,7 +144,11 @@ const EditOffer = () => {
|
|||||||
value={title}
|
value={title}
|
||||||
placeholder="Title (maximum 50 characters)" />
|
placeholder="Title (maximum 50 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{title ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{50 - title.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilAudioDescription} />
|
<CIcon icon={cilAudioDescription} />
|
||||||
@ -156,6 +160,11 @@ const EditOffer = () => {
|
|||||||
value={description}
|
value={description}
|
||||||
placeholder="Description (maximum 250 characters)" />
|
placeholder="Description (maximum 250 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{250 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilBell} />
|
<CIcon icon={cilBell} />
|
||||||
|
@ -123,6 +123,11 @@ const AddRequirement = () => {
|
|||||||
value={title}
|
value={title}
|
||||||
placeholder="Title (maximum 50 characters)" />
|
placeholder="Title (maximum 50 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{title ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{50 - title.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilObjectGroup} />
|
<CIcon icon={cilObjectGroup} />
|
||||||
@ -145,7 +150,11 @@ const AddRequirement = () => {
|
|||||||
value={description}
|
value={description}
|
||||||
placeholder="Description (maximum 250 characters)" />
|
placeholder="Description (maximum 250 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{250 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
|
|
||||||
|
@ -138,6 +138,11 @@ const EditRequirement = () => {
|
|||||||
value={title}
|
value={title}
|
||||||
placeholder="Title (maximum 50 characters)" />
|
placeholder="Title (maximum 50 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{title ? <><i className="charLeft mt-4 fst-italic">
|
||||||
|
{50 - title.length} characters left
|
||||||
|
</i></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilObjectGroup} />
|
<CIcon icon={cilObjectGroup} />
|
||||||
@ -160,7 +165,11 @@ const EditRequirement = () => {
|
|||||||
value={description}
|
value={description}
|
||||||
placeholder="Description (maximum 250 characters)" />
|
placeholder="Description (maximum 250 characters)" />
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
{description ? <><span className="charLeft mt-4 fst-italic">
|
||||||
|
{250 - description.length} characters left
|
||||||
|
</span></> : <></>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
|
|
||||||
|
@ -104,11 +104,11 @@ const Login = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
{/* <CButton color="link" className="px-0">
|
<CButton color="link" className="px-0">
|
||||||
<Link to="/forgot">
|
<Link to="/forgot">
|
||||||
Forgot password?
|
Forgot password.?
|
||||||
</Link>
|
</Link>
|
||||||
</CButton> */}
|
</CButton>
|
||||||
|
|
||||||
|
|
||||||
</CForm>
|
</CForm>
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import React from 'react';
|
import React, { useState } from 'react'
|
||||||
|
import axios from 'axios';
|
||||||
|
import ClipLoader from "react-spinners/ClipLoader";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
||||||
CButton,
|
CButton,
|
||||||
CCard,
|
CCard,
|
||||||
CCardBody,
|
CCardBody,
|
||||||
@ -13,9 +17,41 @@ import {
|
|||||||
} from '@coreui/react'
|
} from '@coreui/react'
|
||||||
import CIcon from '@coreui/icons-react'
|
import CIcon from '@coreui/icons-react'
|
||||||
import { cilEnvelopeLetter, cilEnvelopeOpen, cilLockLocked, cilUser } from '@coreui/icons'
|
import { cilEnvelopeLetter, cilEnvelopeOpen, cilLockLocked, cilUser } from '@coreui/icons'
|
||||||
import { Link } from 'react-router-dom';
|
import { Link, useHistory } from 'react-router-dom';
|
||||||
|
import swal from 'sweetalert';
|
||||||
|
|
||||||
const ForgotPassword = () => {
|
const ForgotPassword = () => {
|
||||||
|
const history = useHistory()
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [email, setEmail] = useState()
|
||||||
|
// console.log(email)
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
if (email) {
|
||||||
|
try {
|
||||||
|
setLoading(true)
|
||||||
|
|
||||||
|
const res = await axios.post(`/api/v1/user/password/forgot`, { email: email })
|
||||||
|
//console.log(res);
|
||||||
|
if (res.data.success === true) {
|
||||||
|
setLoading(false)
|
||||||
|
// alert("Email Send Successfully! please check your mail for reset password")
|
||||||
|
swal("success!", "Email Send Successfully! please check your Email for new password", "success");
|
||||||
|
history.push("/");
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
alert("You are not a User")
|
||||||
|
setLoading(false)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
alert("please fill Email field..")
|
||||||
|
setLoading(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
return <div className="bg-light min-vh-100 d-flex flex-row align-items-center">
|
return <div className="bg-light min-vh-100 d-flex flex-row align-items-center">
|
||||||
<CContainer>
|
<CContainer>
|
||||||
<CRow className="justify-content-center">
|
<CRow className="justify-content-center">
|
||||||
@ -24,7 +60,7 @@ const ForgotPassword = () => {
|
|||||||
<CCardBody className="p-4">
|
<CCardBody className="p-4">
|
||||||
<CForm>
|
<CForm>
|
||||||
<h1>Forgot Password?</h1>
|
<h1>Forgot Password?</h1>
|
||||||
<p className="text-medium-emphasis"> Enter your email Below we will send you a link to reset your password</p>
|
<p className="text-medium-emphasis"> Enter your email Below, we will send you password in your Email</p>
|
||||||
{/* <CInputGroup className="mb-3">
|
{/* <CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilUser} />
|
<CIcon icon={cilUser} />
|
||||||
@ -37,15 +73,20 @@ const ForgotPassword = () => {
|
|||||||
<CIcon icon={cilEnvelopeOpen} />
|
<CIcon icon={cilEnvelopeOpen} />
|
||||||
</CInputGroupText>
|
</CInputGroupText>
|
||||||
<CFormInput
|
<CFormInput
|
||||||
type="password"
|
type="email"
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
autoComplete="email"
|
autoComplete="email"
|
||||||
|
// value={email}
|
||||||
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</CInputGroup>
|
</CInputGroup>
|
||||||
|
|
||||||
<CButton color="dark">Send</CButton>
|
<CButton color="primary" disabled={!email} onClick={() => handleSubmit()}>
|
||||||
|
<ClipLoader loading={loading} size={18} />
|
||||||
|
{!loading && "Send"}
|
||||||
|
</CButton>
|
||||||
<Link to='/'>
|
<Link to='/'>
|
||||||
<CButton color="dark" className='ms-2'>Back to Login</CButton>
|
<CButton color="secondary" className='ms-2'>Back to Login</CButton>
|
||||||
</Link>
|
</Link>
|
||||||
</CForm>
|
</CForm>
|
||||||
</CCardBody>
|
</CCardBody>
|
||||||
|
Loading…
Reference in New Issue
Block a user