diff --git a/app/screens/edit_profile/__snapshots__/edit_profile.test.js.snap b/app/screens/edit_profile/__snapshots__/edit_profile.test.js.snap index bd83dd9f0..aeb21f8a3 100644 --- a/app/screens/edit_profile/__snapshots__/edit_profile.test.js.snap +++ b/app/screens/edit_profile/__snapshots__/edit_profile.test.js.snap @@ -34,6 +34,12 @@ exports[`edit_profile should match snapshot 1`] = ` "calls": Array [ Array [ Object { + "leftButtons": Array [ + Object { + "id": "close-settings", + "title": undefined, + }, + ], "rightButtons": Array [ Object { "disabled": true, diff --git a/app/screens/edit_profile/edit_profile.js b/app/screens/edit_profile/edit_profile.js index fa9e40bb3..c3334fb66 100644 --- a/app/screens/edit_profile/edit_profile.js +++ b/app/screens/edit_profile/edit_profile.js @@ -72,6 +72,10 @@ export default class EditProfile extends PureComponent { intl: intlShape, }; + leftButton = { + id: 'close-settings', + }; + rightButton = { id: 'update-profile', disabled: true, @@ -83,10 +87,13 @@ export default class EditProfile extends PureComponent { const {email, first_name: firstName, last_name: lastName, nickname, position, username} = props.currentUser; const buttons = { + leftButtons: [this.leftButton], rightButtons: [this.rightButton], }; + this.leftButton.title = context.intl.formatMessage({id: 'mobile.account.settings.cancel', defaultMessage: 'Cancel'}); this.rightButton.title = context.intl.formatMessage({id: 'mobile.account.settings.save', defaultMessage: 'Save'}); + props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); props.navigator.setButtons(buttons); diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index 9ea2f8512..68eba1b19 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -125,6 +125,7 @@ "mobile.account_notifications.threads_start": "Threads that I start", "mobile.account_notifications.threads_start_participate": "Threads that I start or participate in", "mobile.account.settings.save": "Save", + "mobile.account.settings.cancel": "Cancel", "mobile.action_menu.select": "Select an option", "mobile.action_menu.submitted": "Submitted", "mobile.advanced_settings.clockDisplay": "Clock display",