diff --git a/app/controllers/client_api/users/users_controller.rb b/app/controllers/client_api/users/users_controller.rb index f53eee454..f0d244c77 100644 --- a/app/controllers/client_api/users/users_controller.rb +++ b/app/controllers/client_api/users/users_controller.rb @@ -67,9 +67,10 @@ module ClientApi params.require(:user) .permit(:password, :initials, :email, :full_name, :password_confirmation, :current_password, :avatar, - :assignments, :time_zone, :assignmentsNotification, - :assignmentsEmailNotification, :recentNotification, - :recentEmailNotification, :systemMessageEmailNotification) + :time_zone, :assignments_notification, + :assignments_email_notification, :recent_notification, + :recent_email_notification, + :system_message_email_notification) end def success_response(template = nil, locals = nil) diff --git a/app/javascript/src/components/ModalsContainer/modals/LeaveTeamModal.jsx b/app/javascript/src/components/ModalsContainer/modals/LeaveTeamModal.jsx index 9ad8ae887..3cc3ef54c 100644 --- a/app/javascript/src/components/ModalsContainer/modals/LeaveTeamModal.jsx +++ b/app/javascript/src/components/ModalsContainer/modals/LeaveTeamModal.jsx @@ -6,7 +6,11 @@ import { connect } from "react-redux"; import axios from "../../../config/axios"; import { LEAVE_TEAM_PATH } from "../../../config/api_endpoints"; -import { addTeamsData, setCurrentTeam, leaveTeamModalShow } from "../../actions/TeamsActions"; +import { + addTeamsData, + setCurrentTeam, + leaveTeamModalShow +} from "../../actions/TeamsActions"; class LeaveTeamModal extends Component { constructor(props) { @@ -51,7 +55,10 @@ class LeaveTeamModal extends Component {

- +

  diff --git a/app/javascript/src/components/reducers/UsersReducer.js b/app/javascript/src/components/reducers/UsersReducer.js index 0de21684f..e12f1bc6c 100644 --- a/app/javascript/src/components/reducers/UsersReducer.js +++ b/app/javascript/src/components/reducers/UsersReducer.js @@ -5,8 +5,7 @@ const initialState = { fullName: "", initials: "", email: "", - avatarPath: "", - avatarThumbPath: "" + avatarThumb: "" }; export function currentUser(state = initialState, action) { diff --git a/app/javascript/src/config/locales/messages.js b/app/javascript/src/config/locales/messages.js index 284266769..091ba72eb 100644 --- a/app/javascript/src/config/locales/messages.js +++ b/app/javascript/src/config/locales/messages.js @@ -11,7 +11,7 @@ export default { text_too_short: "is too short (minimum is {min_length} characters)", text_too_long: "is too long (maximum is {max_length} characters)", cant_be_blank: "can't be blank", - invalid_email: "Invalid email.", + invalid_email: "invalid email", passwords_dont_match: "Passwords don't match" }, navbar: { @@ -91,7 +91,6 @@ export default { time_zone: "Time zone", time_zone_warning: "Time zone setting affects all time & date fields throughout application.", - repeat_tutorial: "Repeat tutorial", notifications: "Notifications", profile: "Profile", preferences: "Preferences", @@ -111,7 +110,7 @@ export default { leave_team_modal: { title: "Leave team {teamName}", subtitle: - "Are you sure you wish to leave team My projects? This action is irreversible.", + "Are you sure you wish to leave team {teamName}? This action is irreversible.", warnings: "Leaving team has following consequences:", warning_message_one: "you will lose access to all content belonging to the team (including projects, tasks, protocols and activities);", diff --git a/app/javascript/src/scenes/SettingsPage/scenes/preferences/components/NotificationsGroup.jsx b/app/javascript/src/scenes/SettingsPage/scenes/preferences/components/NotificationsGroup.jsx index 8a7791269..b7d92d4a0 100644 --- a/app/javascript/src/scenes/SettingsPage/scenes/preferences/components/NotificationsGroup.jsx +++ b/app/javascript/src/scenes/SettingsPage/scenes/preferences/components/NotificationsGroup.jsx @@ -73,15 +73,15 @@ class NotificationsGroup extends Component { let params = {}; switch (this.props.type) { case ASSIGNMENT_NOTIFICATION: - params.assignmentsNotification = value; + params.assignments_notification = value; if(!value) { - params.assignmentsEmailNotification = false; + params.assignments_email_notification = false; } break; case RECENT_NOTIFICATION: - params.recentNotification = value; + params.recent_notification = value; if(!value) { - params.recentEmailNotification = false; + params.recent_email_notification = false; } break; default: @@ -93,11 +93,11 @@ class NotificationsGroup extends Component { emailNotificationField() { switch (this.props.type) { case ASSIGNMENT_NOTIFICATION: - return "assignmentsEmailNotification"; + return "assignments_email_notification"; case RECENT_NOTIFICATION: - return "recentEmailNotification"; + return "recent_email_notification"; case SYSTEM_NOTIFICATION: - return "systemMessageEmailNotification" + return "system_message_email_notification" default: return ""; } diff --git a/app/javascript/src/scenes/SettingsPage/scenes/preferences/index.jsx b/app/javascript/src/scenes/SettingsPage/scenes/preferences/index.jsx index 1f6f4b366..6681fe915 100644 --- a/app/javascript/src/scenes/SettingsPage/scenes/preferences/index.jsx +++ b/app/javascript/src/scenes/SettingsPage/scenes/preferences/index.jsx @@ -23,11 +23,11 @@ class SettingsPreferences extends Component { this.state = { timeZone: "", - assignmentsNotification: false, - assignmentsEmailNotification: false, - recentNotification: false, - recentEmailNotification: false, - systemMessageEmailNotification: false + assignments_notification: false, + assignments_email_notification: false, + recent_notification: false, + recent_email_motification: false, + system_message_email_notification: false }; this.getPreferencesInfo = this.getPreferencesInfo.bind(this); @@ -59,9 +59,9 @@ class SettingsPreferences extends Component { title="settings_page.assignement" subtitle="settings_page.assignement_msg" iconClasses="fa fa-newspaper-o" - inAppNotification={this.state.assignmentsNotification} + inAppNotification={this.state.assignments_notification} emailNotification={ - this.state.assignmentsEmailNotification + this.state.assignments_email_notification } iconBackground={MAIN_COLOR_BLUE} reloadInfo={this.getPreferencesInfo} @@ -70,8 +70,8 @@ class SettingsPreferences extends Component { type={RECENT_NOTIFICATION} title="settings_page.recent_changes" subtitle="settings_page.recent_changes_msg" - inAppNotification={this.state.recentNotification} - emailNotification={this.state.recentEmailNotification} + inAppNotification={this.state.recent_notification} + emailNotification={this.state.recent_email_notification} reloadInfo={this.getPreferencesInfo} />