Skip to content
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

ManageStudentsTable: Update style of required text #21072

Merged
merged 3 commits into from Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/i18n/common/en_us.json
Expand Up @@ -636,6 +636,7 @@
"myCourses": "My Courses",
"myProjects": "My Projects",
"name": "Name",
"nameRequired": "Student name (required)",
"nestedForSameVariable": "You're using the same variable inside two or more nested loops. Use unique variable names to avoid infinite loops.",
"newPassword": "new password",
"newSection": "New section",
Expand Down Expand Up @@ -818,7 +819,6 @@
"repeat": "repeat",
"replayButton": "Replay",
"reportAbuse": "Report Abuse",
"required": "required",
"reset": "Reset",
"resetProgram": "Reset",
"resetPassword": "Reset password",
Expand Down
16 changes: 11 additions & 5 deletions apps/src/templates/manageStudents/ManageStudentsNameCell.jsx
Expand Up @@ -5,6 +5,9 @@ import i18n from "@cdo/locale";
import {editStudent} from './manageStudentsRedux';

const styles = {
inputBox: {
width: 225
},
details: {
fontSize: 12
},
Expand Down Expand Up @@ -49,11 +52,14 @@ class ManageStudentNameCell extends Component {
</div>
}
{this.props.isEditing &&
<div style={{paddingTop: 10}}>
<input value={editedValue} onChange={this.onChangeName}/>
<div style={{color: 'red', fontSize: 9, height: 10}}>
{this.props.editedValue.length === 0 ? i18n.required() : ''}
</div>
<div>
<input
required
style={styles.inputBox}
value={editedValue}
onChange={this.onChangeName}
placeholder={i18n.nameRequired()}
/>
</div>
}
</div>
Expand Down