forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zachary Rogers
committed
Dec 7, 2023
1 parent
8952802
commit 13de580
Showing
6 changed files
with
97 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
web-client/src/presenter/sequences/Login/submitLoginSequence.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { state } from '@web-client/presenter/app-public.cerebral'; | ||
|
||
export const submitLoginSequence = [ | ||
({ get }) => { | ||
console.log('in submitLoginSequence'); | ||
console.log(get(state.form)); | ||
}, | ||
] as unknown as (props) => void; |
2 changes: 1 addition & 1 deletion
2
web-client/src/presenter/sequences/changePasswordLocalSequence.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,90 @@ | ||
import { Button } from '@web-client/ustc-ui/Button/Button'; | ||
import { connect } from '@cerebral/react'; | ||
import { connect } from '@web-client/presenter/shared.cerebral'; | ||
import { sequences, state } from '@web-client/presenter/app-public.cerebral'; | ||
import React from 'react'; | ||
|
||
export const Login = connect({}, () => { | ||
return ( | ||
<> | ||
<div className="grid-container"> | ||
<div className="grid-row bg-white padding-x-5 padding-y-3"> | ||
<div className="grid-col"> | ||
<h1 className="margin-bottom-1">Log in to DAWSON</h1> | ||
<span>Email address and password are case sensitive.</span> | ||
<form className="margin-top-4"> | ||
<label className="usa-label" htmlFor="email"> | ||
Email address | ||
</label> | ||
<input | ||
required | ||
autoCapitalize="off" | ||
autoCorrect="off" | ||
className="usa-input" | ||
id="email" | ||
name="email" | ||
type="text" | ||
/> | ||
<label className="usa-label" htmlFor="password"> | ||
Password | ||
</label> | ||
<input | ||
required | ||
className="usa-input" | ||
id="password" | ||
name="password" | ||
/> | ||
<button | ||
className="usa-show-password" | ||
data-hide-text="Hide password" | ||
data-show-text="Show password" | ||
type="button" | ||
> | ||
Show password | ||
</button> | ||
<Button className="usa-button margin-top-3">Log in</Button> | ||
</form> | ||
<div> | ||
<Button className="margin-top-1" link={true} type="button"> | ||
Forgot password? | ||
</Button> | ||
</div> | ||
<div> | ||
<span>Don't have an account?</span>{' '} | ||
<Button className="padding-top-0" link={true} type="button"> | ||
Create your account now. | ||
</Button> | ||
export const Login = connect( | ||
{ | ||
form: state.form, | ||
submitLoginSequence: sequences.submitLoginSequence, | ||
updateFormValueSequence: sequences.updateFormValueSequence, | ||
}, | ||
({ form, submitLoginSequence, updateFormValueSequence }) => { | ||
return ( | ||
<> | ||
<div className="grid-container"> | ||
<div className="grid-row bg-white padding-x-5 padding-y-3"> | ||
<div className="grid-col"> | ||
<h1 className="margin-bottom-1">Log in to DAWSON</h1> | ||
<span>Email address and password are case sensitive.</span> | ||
<form className="margin-top-4"> | ||
<label className="usa-label" htmlFor="email"> | ||
Email address | ||
</label> | ||
<input | ||
required | ||
autoCapitalize="off" | ||
autoCorrect="off" | ||
className="usa-input" | ||
id="email" | ||
name="email" | ||
type="text" | ||
value={form.email} | ||
onChange={e => { | ||
updateFormValueSequence({ | ||
key: e.target.name, | ||
value: e.target.value, | ||
}); | ||
}} | ||
/> | ||
<label className="usa-label" htmlFor="password"> | ||
Password | ||
</label> | ||
<input | ||
required | ||
className="usa-input" | ||
id="password" | ||
name="password" | ||
value={form.password} | ||
onChange={e => { | ||
updateFormValueSequence({ | ||
key: e.target.name, | ||
value: e.target.value, | ||
}); | ||
}} | ||
/> | ||
<button | ||
className="usa-show-password" | ||
data-hide-text="Hide password" | ||
data-show-text="Show password" | ||
type="button" | ||
> | ||
Show password | ||
</button> | ||
<Button | ||
className="usa-button margin-top-3" | ||
onClick={() => submitLoginSequence()} | ||
> | ||
Log in | ||
</Button> | ||
</form> | ||
<div> | ||
<Button className="margin-top-1" link={true} type="button"> | ||
Forgot password? | ||
</Button> | ||
</div> | ||
<div> | ||
<span>Don't have an account?</span>{' '} | ||
<Button className="padding-top-0" link={true} type="button"> | ||
Create your account now. | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}); | ||
</> | ||
); | ||
}, | ||
); | ||
|
||
Login.displayName = 'Login'; |