-
Notifications
You must be signed in to change notification settings - Fork 3
Add required field indicators to forms #653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ const StartDate = ({ existingDate }: StartDateProps) => { | |
|
|
||
| return ( | ||
| <div className={cn(styles.col1, styles.workingHours)}> | ||
| <Label htmlFor="startDate">Start Date:</Label> | ||
| <Label htmlFor="startDate" required>Start Date:</Label> | ||
| <Input | ||
| id="startDate" | ||
| type="date" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I saw someone make a comment about this but I can't remember where or when (so please ignore if this has already been dealt with) but should we also make selecting a role mandatory in this modal? |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,13 +136,13 @@ const RequestRideInfo: React.FC<RequestRideInfoProps> = ({ | |
| {((modalType === 'CREATE' && watchRepeating) || | ||
| modalType === 'EDIT_REGULAR' || | ||
| modalType === 'EDIT_SINGLE_RECURRING') && ( | ||
| <Label htmlFor={'startDate'} className={styles.largeLabel}> | ||
| Date | ||
| </Label> | ||
| )} | ||
| <Label htmlFor={'startDate'} className={styles.largeLabel} required> | ||
| Date | ||
| </Label> | ||
| )} | ||
| <div className={styles.box}> | ||
| {modalType === 'EDIT_ALL_RECURRING' && ( | ||
| <Label className={styles.boldLabel} htmlFor="startDate"> | ||
| <Label className={styles.boldLabel} htmlFor="startDate" required> | ||
| Starts | ||
| </Label> | ||
| )} | ||
|
|
@@ -194,7 +194,7 @@ const RequestRideInfo: React.FC<RequestRideInfoProps> = ({ | |
| {showRepeatingInfo && watchRepeating ? ( | ||
| <div> | ||
| <div className={styles.box}> | ||
| <Label className={styles.boldLabel} id="repeats"> | ||
| <Label className={styles.boldLabel} id="repeats" required> | ||
| Repeats | ||
| </Label> | ||
| <div className={styles.radioBox}> | ||
|
|
@@ -278,7 +278,7 @@ const RequestRideInfo: React.FC<RequestRideInfoProps> = ({ | |
| </Label> | ||
| <div className={styles.box}> | ||
| <div className={styles.errorBox}> | ||
| <Label className={styles.label} id="pickupLocation"> | ||
| <Label className={styles.label} id="pickupLocation" required> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note for the future: Once my PR editing the way custom locations (regular text field instead of an address picker) are dealt with is merged, this component is going to look slightly different. We should make sure the required indicators still work correctly once this happens. |
||
| Location | ||
| </Label> | ||
| <select | ||
|
|
@@ -307,7 +307,7 @@ const RequestRideInfo: React.FC<RequestRideInfoProps> = ({ | |
| )} | ||
| </div> | ||
| <div className={styles.errorBox}> | ||
| <Label className={styles.label} id="pickupTime"> | ||
| <Label className={styles.label} id="pickupTime" required> | ||
| Time | ||
| </Label> | ||
| <Input | ||
|
|
@@ -383,7 +383,7 @@ const RequestRideInfo: React.FC<RequestRideInfoProps> = ({ | |
| </Label> | ||
| <div className={styles.box}> | ||
| <div className={styles.errorBox}> | ||
| <Label className={styles.label} id="dropoffLocation"> | ||
| <Label className={styles.label} id="dropoffLocation" required> | ||
| Location | ||
| </Label> | ||
| <select | ||
|
|
@@ -413,7 +413,7 @@ const RequestRideInfo: React.FC<RequestRideInfoProps> = ({ | |
| )} | ||
| </div> | ||
| <div className={styles.errorBox}> | ||
| <Label className={styles.label} id="dropoffTime"> | ||
| <Label className={styles.label} id="dropoffTime" required> | ||
| Time | ||
| </Label> | ||
| <Input | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a huge deal but this message repeats itself when there is an error
