Skip to content

Commit 98de0ac

Browse files
committed
fix bugs and change UI
1 parent e7e39a3 commit 98de0ac

File tree

2 files changed

+48
-31
lines changed

2 files changed

+48
-31
lines changed

src/Components/forms/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@
190190
color: #575757;
191191
background-color: #dadada;
192192
}
193+
.success-message-box {
194+
margin: 5% 10%;
195+
background-color: #e4e4e4;
196+
}
193197
.success {
194198
color: green;
195199
text-align: center;

src/Components/forms/index.js

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class Forms extends Component {
4444
err: 'Email cannot be empty.'
4545
})
4646
}
47-
console.log(err.response.data)
4847
if (err.response && err.response.data === 'NO_ACCOUNT') {
4948
return this.setState({
5049
loading: false,
@@ -245,7 +244,7 @@ class Forms extends Component {
245244
}
246245
if (msg) {
247246
return (
248-
<div style={{ padding: '5%' }}>
247+
<div className="success-message-box">
249248
<p className="success" style={{ fontSize: '24px' }}>
250249
{msg}
251250
</p>
@@ -276,6 +275,49 @@ class Forms extends Component {
276275
</div>
277276
)
278277
}
278+
if (userId && showEmailBox) {
279+
return (
280+
<div className="form-container container">
281+
{this.state.err && <p className="errors">{this.state.err}</p>}
282+
<div className="forms-important-box">
283+
<div>
284+
<p>
285+
<strong>Important: </strong>This form will send you an email
286+
with a link to update your existing profile to alow us to see
287+
your request to access admin dashboard.
288+
</p>
289+
<p>
290+
<strong>
291+
Please entre the email you used for volunteer application form
292+
and click submit.
293+
</strong>
294+
</p>
295+
<form
296+
className="forms-important-box-form"
297+
onSubmit={this.handleMagicLinkRequest}
298+
>
299+
<input
300+
onChange={this.onChange}
301+
value={this.state.email}
302+
name="email"
303+
placeholder="[email protected]"
304+
type="email"
305+
/>
306+
<button disabled={!this.state.email} type="submit">
307+
Submit
308+
</button>
309+
</form>
310+
<span
311+
style={{ cursor: 'pointer', color: '#0053ff' }}
312+
onMouseDown={() => this.setState({ showEmailBox: false })}
313+
>
314+
Back
315+
</span>
316+
</div>
317+
</div>
318+
</div>
319+
)
320+
}
279321
return (
280322
<div className="form-container container">
281323
<Header
@@ -296,35 +338,6 @@ class Forms extends Component {
296338
</span>
297339
.
298340
</span>
299-
{showEmailBox && (
300-
<div>
301-
<span>
302-
Please entre the email you used for volunteer application form
303-
and click submit.
304-
</span>
305-
<form
306-
className="forms-important-box-form"
307-
onSubmit={this.handleMagicLinkRequest}
308-
>
309-
<input
310-
onChange={this.onChange}
311-
value={this.state.email}
312-
name="email"
313-
placeholder="[email protected]"
314-
type="email"
315-
/>
316-
<button disabled={!this.state.email} type="submit">
317-
Submit
318-
</button>
319-
</form>
320-
<span
321-
style={{ cursor: 'pointer', color: '#0053ff' }}
322-
onMouseDown={() => this.setState({ showEmailBox: false })}
323-
>
324-
Cancel
325-
</span>
326-
</div>
327-
)}
328341
</div>
329342
)}
330343
{!showEmailBox && (

0 commit comments

Comments
 (0)