From f132b170bcea50b8c27394be8fda8ff76b86513a Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Tue, 28 Feb 2023 11:10:40 +0400 Subject: [PATCH] Update wording for space advanced settings (#6131) --- .../modules/space/models/AdvancedSettings.php | 12 +++++++++++- .../manage/controllers/DefaultController.php | 3 +-- .../modules/manage/views/default/advanced.php | 14 ++++++-------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/protected/humhub/modules/space/models/AdvancedSettings.php b/protected/humhub/modules/space/models/AdvancedSettings.php index 513713bcd6..8235172b7f 100644 --- a/protected/humhub/modules/space/models/AdvancedSettings.php +++ b/protected/humhub/modules/space/models/AdvancedSettings.php @@ -82,7 +82,7 @@ class AdvancedSettings extends Model return [ 'url' => 'URL', 'indexUrl' => Yii::t('SpaceModule.base', 'Homepage'), - 'indexGuestUrl' => Yii::t('SpaceModule.base', 'Homepage (Guests)'), + 'indexGuestUrl' => Yii::t('SpaceModule.base', 'Homepage (Non-members)'), 'hideMembers' => Yii::t('SpaceModule.base', 'Hide Members'), 'hideActivities' => Yii::t('SpaceModule.base', 'Hide Activity Sidebar Widget'), 'hideAbout' => Yii::t('SpaceModule.base', 'Hide About Page'), @@ -90,6 +90,16 @@ class AdvancedSettings extends Model ]; } + /** + * @inheritdoc + */ + public function attributeHints() + { + return [ + 'indexUrl' => Yii::t('SpaceModule.base', 'The default homepage for members of this Space'), + 'indexGuestUrl' => Yii::t('SpaceModule.base', 'The default homepage for non-members and guests visiting this Space'), + ]; + } public function loadBySettings() { diff --git a/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php b/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php index 86bacfe5ab..4cb165901c 100644 --- a/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php +++ b/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php @@ -11,15 +11,14 @@ namespace humhub\modules\space\modules\manage\controllers; use humhub\modules\content\components\ContentContainerControllerAccess; use humhub\modules\content\widgets\richtext\RichText; use humhub\modules\space\components\UrlRule; -use Yii; use humhub\modules\space\models\Space; -use humhub\modules\space\models\AdvancedSettings; use humhub\modules\space\widgets\Menu; use humhub\modules\space\widgets\Chooser; use humhub\modules\space\modules\manage\components\Controller; use humhub\modules\space\modules\manage\models\DeleteForm; use humhub\modules\space\activities\SpaceArchived; use humhub\modules\space\activities\SpaceUnArchived; +use Yii; use yii\helpers\Url; /** diff --git a/protected/humhub/modules/space/modules/manage/views/default/advanced.php b/protected/humhub/modules/space/modules/manage/views/default/advanced.php index 50b55cb848..7766e475e4 100644 --- a/protected/humhub/modules/space/modules/manage/views/default/advanced.php +++ b/protected/humhub/modules/space/modules/manage/views/default/advanced.php @@ -1,17 +1,15 @@
@@ -33,8 +31,8 @@ use yii\helpers\Url; field($model, 'hideAbout')->checkbox(); ?> field($model, 'hideActivities')->checkbox(); ?> field($model, 'hideFollowers')->checkbox(); ?> - field($model, 'indexUrl')->dropDownList($indexModuleSelection)->hint(Yii::t('SpaceModule.manage', 'the default start page of this space for members')) ?> - field($model, 'indexGuestUrl')->dropDownList($indexModuleSelection)->hint(Yii::t('SpaceModule.manage', 'the default start page of this space for visitors')) ?> + field($model, 'indexUrl')->dropDownList($indexModuleSelection) ?> + field($model, 'indexGuestUrl')->dropDownList($indexModuleSelection) ?> submit() ?> right()->link($space->createUrl('delete'))->visible($space->canDelete()) ?>