mirror of
https://github.com/ascribe/onion.git
synced 2025-02-02 04:49:41 +01:00
Use string formatting for RequestActionForm's notification message
This commit is contained in:
parent
7746241a59
commit
a0ebc7dc58
@ -63,8 +63,7 @@ let RequestActionForm = React.createClass({
|
|||||||
|
|
||||||
showNotification(option, action, owner) {
|
showNotification(option, action, owner) {
|
||||||
return () => {
|
return () => {
|
||||||
const message = getLangText('You have successfully') + ' ' + option + ' the ' + action + ' request ' + getLangText('from') + ' ' + owner;
|
const message = getLangText('You have successfully %s the %s request from %s', getLangText(option), getLangText(action), owner);
|
||||||
|
|
||||||
const notifications = new GlobalNotificationModel(message, 'success');
|
const notifications = new GlobalNotificationModel(message, 'success');
|
||||||
GlobalNotificationActions.appendGlobalNotification(notifications);
|
GlobalNotificationActions.appendGlobalNotification(notifications);
|
||||||
|
|
||||||
@ -118,7 +117,7 @@ let RequestActionForm = React.createClass({
|
|||||||
url={urls.accept}
|
url={urls.accept}
|
||||||
getFormData={this.getFormData}
|
getFormData={this.getFormData}
|
||||||
handleSuccess={
|
handleSuccess={
|
||||||
this.showNotification(getLangText('accepted'), this.props.notifications.action, this.props.notifications.by)
|
this.showNotification('accepted', this.props.notifications.action, this.props.notifications.by)
|
||||||
}
|
}
|
||||||
isInline={true}
|
isInline={true}
|
||||||
className='inline pull-right'>
|
className='inline pull-right'>
|
||||||
@ -143,7 +142,7 @@ let RequestActionForm = React.createClass({
|
|||||||
isInline={true}
|
isInline={true}
|
||||||
getFormData={this.getFormData}
|
getFormData={this.getFormData}
|
||||||
handleSuccess={
|
handleSuccess={
|
||||||
this.showNotification(getLangText('denied'), this.props.notifications.action, this.props.notifications.by)
|
this.showNotification('denied', this.props.notifications.action, this.props.notifications.by)
|
||||||
}
|
}
|
||||||
className='inline pull-right'>
|
className='inline pull-right'>
|
||||||
<button
|
<button
|
||||||
|
Loading…
Reference in New Issue
Block a user