Fix tags field on welcome modal window (#5175)

* Fix tags field on welcome modal window

* Update CHANGELOG_DEV.md

* Update CHANGELOG_DEV.md

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Yuriy Bakhtin 2021-07-19 11:45:16 +03:00 committed by GitHub
parent a15ea86ccd
commit c8e80fb76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
1.9.0 (Unreleased)
------------------
- Fix #5174: Tour module crashes with enabled tags field
1.9.0-beta.2 (July 14, 2021)
----------------------------

View File

@ -33,6 +33,11 @@ class ContainerTagPicker extends BasePicker
*/
public $itemClass = ContentContainerTag::class;
/**
* @inheritdoc
*/
public $placeholderMore;
/**
* @inheritdoc
*/
@ -53,7 +58,7 @@ class ContainerTagPicker extends BasePicker
protected function getData()
{
return array_merge(parent::getData(), [
'placeholder-more' => Yii::t('ContentModule.base', 'Add tag...'),
'placeholder-more' => $this->placeholderMore ?? Yii::t('ContentModule.base', 'Add tag...'),
'no-result' => Yii::t('ContentModule.base', 'No tags found for the given query'),
]);
}

View File

@ -2,6 +2,7 @@
use humhub\modules\content\assets\ContainerHeaderAsset;
use humhub\modules\content\controllers\ContainerImageController;
use humhub\modules\content\widgets\ContainerTagPicker;
use humhub\modules\file\widgets\Upload;
use humhub\modules\ui\icon\widgets\Icon;
use humhub\widgets\ModalButton;
@ -87,7 +88,7 @@ $profileImageUpload = Upload::withName('images', ['url' => $imageUploadUrl]);
<div class="row">
<div class="col-md-12">
<?php echo $form->field($user, 'tags')->textInput(['placeholder' => Yii::t('TourModule.base', 'Your skills, knowledge and experience (comma seperated)')]); ?>
<?php echo $form->field($user, 'tags')->widget(ContainerTagPicker::class, ['placeholderMore' => Yii::t('TourModule.base', 'Your skills, knowledge and experience (comma seperated)')]); ?>
</div>
</div>