mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Fix space name in membership confirmation (#5791)
* Fix space name in membership confirmation * Fix user name in unfollow confirmation
This commit is contained in:
parent
3f4e8afeef
commit
67fa5b0d3f
@ -118,7 +118,7 @@ class FollowButton extends Widget
|
||||
|
||||
// Confirm action "Unfollow"
|
||||
$this->unfollowOptions['data-action-confirm'] = Yii::t('SpaceModule.base', 'Would you like to unfollow Space {spaceName}?', [
|
||||
'{spaceName}' => '<strong>' . $this->space->getDisplayName() . '</strong>'
|
||||
'{spaceName}' => '<strong>' . Html::encode($this->space->getDisplayName()) . '</strong>'
|
||||
]);
|
||||
|
||||
$module = Yii::$app->getModule('space');
|
||||
|
@ -12,6 +12,7 @@ use humhub\components\Widget;
|
||||
use humhub\modules\space\models\Space;
|
||||
use Yii;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Json;
|
||||
|
||||
/**
|
||||
@ -84,7 +85,7 @@ class MembershipButton extends Widget
|
||||
'attrs' => [
|
||||
'data-action-click' => 'content.container.relationship',
|
||||
'data-action-url' => $this->space->createUrl('/space/membership/revoke-membership'),
|
||||
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to withdraw your request to join Space {spaceName}?', ['{spaceName}' => '<strong>' . $this->space->getDisplayName() . '</strong>']),
|
||||
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to withdraw your request to join Space {spaceName}?', ['{spaceName}' => '<strong>' . Html::encode($this->space->getDisplayName()) . '</strong>']),
|
||||
'data-button-options' => Json::encode($this->options),
|
||||
'data-ui-loader' => '',
|
||||
'class' => 'btn btn-info active',
|
||||
@ -96,7 +97,7 @@ class MembershipButton extends Widget
|
||||
'attrs' => [
|
||||
'data-action-click' => 'content.container.relationship',
|
||||
'data-action-url' => $this->space->createUrl('/space/membership/revoke-membership'),
|
||||
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to end your membership in Space {spaceName}?', ['{spaceName}' => '<strong>' . $this->space->getDisplayName() . '</strong>']),
|
||||
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to end your membership in Space {spaceName}?', ['{spaceName}' => '<strong>' . Html::encode($this->space->getDisplayName()) . '</strong>']),
|
||||
'data-button-options' => Json::encode($this->options),
|
||||
'data-ui-loader' => '',
|
||||
'class' => 'btn btn-info active',
|
||||
|
@ -10,7 +10,6 @@ namespace humhub\modules\user\widgets;
|
||||
|
||||
use Yii;
|
||||
use yii\bootstrap\Html;
|
||||
use humhub\modules\friendship\models\Friendship;
|
||||
|
||||
/**
|
||||
* UserFollowButton
|
||||
@ -113,7 +112,7 @@ class UserFollowButton extends \yii\base\Widget
|
||||
|
||||
// Confirm action "Unfollow"
|
||||
$this->unfollowOptions['data-action-confirm'] = Yii::t('SpaceModule.base', 'Would you like to unfollow {userName}?', [
|
||||
'{userName}' => '<strong>' . $this->user->getDisplayName() . '</strong>'
|
||||
'{userName}' => '<strong>' . Html::encode($this->user->getDisplayName()) . '</strong>'
|
||||
]);
|
||||
|
||||
$module = Yii::$app->getModule('user');
|
||||
|
Loading…
x
Reference in New Issue
Block a user