Skip to content

Commit 11279c5

Browse files
authored
Merge pull request #6617 from topcoder-platform/reskin-missing-asterisk
fix: missing asterisk
2 parents aca0733 + dd7fda8 commit 11279c5

File tree

11 files changed

+23
-14
lines changed

11 files changed

+23
-14
lines changed

src/shared/components/Settings/ExperienceAndSkills/WorkExperience/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export default class Work extends ConsentComponent {
451451
</div>
452452
<div styleName="form-body">
453453
<form styleName="workplace-form" noValidate autoComplete="off">
454-
<FormField label="Company *" style={{ flex: '0 0 100%' }}>
454+
<FormField label="Company" style={{ flex: '0 0 100%' }} required>
455455
<FormInputText
456456
id="company"
457457
name="company"

src/shared/components/Settings/ExperienceAndSkills/WorkSkills/Languages/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export default class Languages extends ConsentComponent {
376376
</div>
377377
<div styleName="form-body">
378378
<form styleName="language-form" noValidate autoComplete="off">
379-
<FormField label="Language *" style={{ flex: '0 0 100%' }}>
379+
<FormField label="Language" style={{ flex: '0 0 100%' }} required>
380380
<FormInputSelect
381381
name="language"
382382
options={dropdowns.language}

src/shared/components/Settings/FormField/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ import cn from 'classnames';
99
import './styles.scss';
1010

1111
const FormField = ({
12+
children, label = '', disabled, style, required,
1213
children, label = '', disabled, style, isTextarea,
1314
}) => (
1415
<div styleName="form-field-wrapper" style={style}>
1516
<div styleName="form-field">
16-
<div styleName={cn('label', { disabled, isTextarea })} role="presentation">
17+
<div styleName={cn('label', disabled ? 'disabled' : null, isTextarea)} role="presentation">
1718
{label}
19+
{ required && <span styleName="required">*</span> }
1820
</div>
1921
{children}
2022
</div>
@@ -26,6 +28,7 @@ FormField.defaultProps = {
2628
children: null,
2729
disabled: false,
2830
style: {},
31+
required: false,
2932
isTextarea: false,
3033
};
3134

@@ -34,6 +37,7 @@ FormField.propTypes = {
3437
children: PT.node,
3538
disabled: PT.bool,
3639
style: PT.object,
40+
required: PT.bool,
3741
isTextarea: PT.bool,
3842
};
3943

src/shared/components/Settings/FormField/styles.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
color: $color-black-60;
3131
}
3232

33+
.required {
34+
color: $member-red;
35+
margin-left: 5px;
36+
}
37+
3338
&.isTextarea {
3439
top: 10px;
3540
}

src/shared/components/Settings/ProfileSettings/Hobbies/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Hobbies = (props) => {
3232
<div styleName="form-container-default">
3333
<form name="device-form" noValidate autoComplete="off">
3434
{/* Hobby */}
35-
<FormField label="Hobby">
35+
<FormField label="Hobby" required>
3636
<FormInputText
3737
id="hobby"
3838
name="hobby"

src/shared/components/Settings/ProfileSettings/Learning/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const Learning = (props) => {
3838
<div styleName="form-container-default">
3939
<form name="device-form" noValidate autoComplete="off">
4040
{/* Name of College or University */}
41-
<FormField label="Name of College or University">
41+
<FormField label="Name of College or University" required>
4242
<FormInputText
4343
id="schoolCollegeName"
4444
name="schoolCollegeName"

src/shared/components/Settings/ProfileSettings/PersonalDetails/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const PersonalDetails = (props) => {
3434
<form name="basic-info-form" noValidate autoComplete="off">
3535

3636
{/* First Name */}
37-
<FormField label="First Name">
37+
<FormField label="First Name" required>
3838
<FormInputText
3939
disabled={!canModifyTrait}
4040
id="firstName"
@@ -57,7 +57,7 @@ const PersonalDetails = (props) => {
5757
</FormField>
5858

5959
{/* Last Name */}
60-
<FormField label="Last Name">
60+
<FormField label="Last Name" required>
6161
<FormInputText
6262
disabled={!canModifyTrait}
6363
id="lastName"
@@ -192,7 +192,7 @@ const PersonalDetails = (props) => {
192192
</FormField>
193193

194194
{/* Country */}
195-
<FormField label="Country">
195+
<FormField label="Country" required>
196196
<Select
197197
name="country"
198198
options={countries}

src/shared/components/Settings/Tools/Devices/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ export default class Devices extends ConsentComponent {
497497
</div>
498498
<div styleName="form-body">
499499
<form styleName="device-form" noValidate autoComplete="off">
500-
<FormField label="Device Type *" style={{ flex: '0 0 100%' }}>
500+
<FormField label="Device Type" style={{ flex: '0 0 100%' }} required>
501501
<FormInputSelect
502502
name="Device Type"
503503
options={types}

src/shared/components/Settings/Tools/ServiceProviders/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export default class ServiceProviders extends ConsentComponent {
336336
</div>
337337
<div styleName="form-body">
338338
<form styleName="service-provider-form" noValidate autoComplete="off">
339-
<FormField label="Service Provider Type *" style={{ flex: '0 0 100%' }}>
339+
<FormField label="Service Provider Type" style={{ flex: '0 0 100%' }} required>
340340
<FormInputSelect
341341
name="serviceProviderType"
342342
options={dropdowns.serviceProviderType}
@@ -355,7 +355,7 @@ export default class ServiceProviders extends ConsentComponent {
355355
}
356356
</FormField>
357357

358-
<FormField label="Service Provider Name *" style={{ flex: '0 0 100%' }}>
358+
<FormField label="Service Provider Name" style={{ flex: '0 0 100%' }} required>
359359
<FormInputText
360360
disabled={!canModifyTrait}
361361
id="name"

src/shared/components/Settings/Tools/Software/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ export default class Software extends ConsentComponent {
342342
</div>
343343
<div styleName="form-body">
344344
<form styleName="software-form" noValidate autoComplete="off">
345-
<FormField label="Software Type *" style={{ flex: '0 0 100%' }}>
345+
<FormField label="Software Type" style={{ flex: '0 0 100%' }} required>
346346
<FormInputSelect
347347
name="softwareType"
348348
options={dropdowns.type}
@@ -361,7 +361,7 @@ export default class Software extends ConsentComponent {
361361
}
362362
</FormField>
363363

364-
<FormField label="Software Name *" style={{ flex: '0 0 100%' }}>
364+
<FormField label="Software Name" style={{ flex: '0 0 100%' }} required>
365365
<FormInputText
366366
disabled={!canModifyTrait}
367367
id="name"

src/shared/components/Settings/Tools/Subscriptions/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export default class Subscription extends ConsentComponent {
321321
</div>
322322
<div styleName="form-body">
323323
<form styleName="subscription-form" noValidate autoComplete="off">
324-
<FormField label="Subscription Name" style={{ flex: '0 0 100%' }}>
324+
<FormField label="Subscription Name" style={{ flex: '0 0 100%' }} required>
325325
<FormInputText
326326
disabled={!canModifyTrait}
327327
id="name"

0 commit comments

Comments
 (0)