Skip to content
Snippets Groups Projects
Commit f656517f authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Add blazerid field to the form

parent caf1d22d
No related branches found
No related tags found
1 merge request!16WIP: Feat React frontend
......@@ -29,6 +29,7 @@ function Main(props) {
const firstName = useRef(null);
const lastName = useRef(null);
const reason = useRef(null);
const blazerid = useRef(username);
// Define functions
const hideModal = () => setIsLoading(false);
......@@ -47,7 +48,7 @@ function Main(props) {
showModal();
if (DEBUG) console.log('Modal showed')
socketRef.current.emit('request', {
'username': username,
'username': blazerid.current.value,
'firstName': firstName.current.value,
'lastName': lastName.current.value,
'reason': reason.current.value,
......@@ -111,6 +112,13 @@ function Main(props) {
<Container className="col-4">
<Form noValidate validated={validated} onSubmit={handleSubmit}>
<Form.Group controlId="formBlazerID">
<Form.Label>BlazerID</Form.Label>
<Form.Control required defaultValue={username} ref={blazerid} type="text" placeholder="BlazerID" />
<Form.Control.Feedback type="invalid">
Required
</Form.Control.Feedback>
</Form.Group>
<Form.Group controlId="formFirstName">
<Form.Label>First Name</Form.Label>
<Form.Control required ref={firstName} type="text" placeholder="First Name" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment