Skip to content

Commit

Permalink
Changed the label of settings button
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-qayyum-khan committed Jun 28, 2016
1 parent c7ac8bf commit 2fb0aea
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions static/js/components/EducationTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class EducationTab extends React.Component {
<Cell col={1} />
<Cell col={10}>
<ProfileProgressControls
nextBtnLabel="Save and Continue"
prevUrl="/profile/personal"
nextUrl="/profile/professional"
saveProfile={saveProfile}
Expand Down
1 change: 1 addition & 0 deletions static/js/components/EmploymentTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class EmploymentTab extends React.Component {
<Cell col={1}></Cell>
<Cell col={10}>
<ProfileProgressControls
nextBtnLabel="Save and Continue"
prevUrl="/profile/education"
nextUrl="/profile/privacy"
saveProfile={saveProfile}
Expand Down
1 change: 1 addition & 0 deletions static/js/components/PersonalTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class PersonalTab extends React.Component {
<Cell col={1} />
<Cell col={10}>
<ProfileProgressControls
nextBtnLabel="Save and Continue"
nextUrl="/profile/education"
profile={profile}
saveProfile={saveProfile}
Expand Down
1 change: 1 addition & 0 deletions static/js/components/PrivacyTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class PrivacyTab extends ProfileFormFields {
</Cell>
<Cell col={12}>
<ProfileProgressControls
nextBtnLabel="I'm Done!"
prevUrl="/profile/professional"
nextUrl="/dashboard"
isLastTab={true}
Expand Down
5 changes: 3 additions & 2 deletions static/js/components/ProfileProgressControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { saveProfileStep } from '../util/profile_edit';

export default class ProfileProgressControls extends React.Component {
static propTypes = {
nextBtnLabel: React.PropTypes.string,
nextUrl: React.PropTypes.string,
prevUrl: React.PropTypes.string,
isLastTab: React.PropTypes.bool,
Expand All @@ -28,7 +29,7 @@ export default class ProfileProgressControls extends React.Component {
};

render() {
const { prevUrl, nextUrl, isLastTab } = this.props;
const { prevUrl, nextUrl, nextBtnLabel } = this.props;

let prevButton, nextButton;
if(prevUrl) {
Expand All @@ -45,7 +46,7 @@ export default class ProfileProgressControls extends React.Component {
colored
className="progress-button next"
onClick={this.saveAndContinue}>
<span>{isLastTab ? "I'm Done!" : "Save and Continue"}</span>
<span>{nextBtnLabel}</span>
</Button>;
}
return <div>
Expand Down
1 change: 1 addition & 0 deletions static/js/containers/SettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class SettingsPage extends ProfileFormContainer {
</Cell>
<Cell col={12}>
<ProfileProgressControls
nextBtnLabel="Save"
nextUrl="/dashboard"
isLastTab={true}
saveProfile={this.saveProfile.bind(this, isEdit)}
Expand Down
2 changes: 1 addition & 1 deletion static/js/containers/SettingsPage_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe("SettingsPage", function() {

helper.store.dispatch(receiveGetUserProfileSuccess(SETTINGS.username, receivedProfile));

assert(button.innerHTML.includes("I'm Done!"));
assert(button.innerHTML.includes("Save"));
let updatedProfile = Object.assign({}, receivedProfile, {
email_optin: true,
filled_out: true
Expand Down

0 comments on commit 2fb0aea

Please sign in to comment.