diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b8c13d8a5..e63f765336 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,13 @@
HumHub Changelog
================
+
+1.11.5 (Unreleased)
+---------------------
+
+- Fix #5806: Alignments for People filters with Select2 mode
+
+
1.11.4 (July 6, 2022)
---------------------
diff --git a/protected/humhub/config/assets-prod.php b/protected/humhub/config/assets-prod.php
index 4673999a44..5bc686c00f 100644
--- a/protected/humhub/config/assets-prod.php
+++ b/protected/humhub/config/assets-prod.php
@@ -2,7 +2,7 @@
/**
* This file is generated by the "yii asset" command.
* DO NOT MODIFY THIS FILE DIRECTLY.
- * @version 2022-07-05 18:53:28
+ * @version 2022-07-15 11:57:44
*/
return [
'app' => [
diff --git a/protected/humhub/modules/user/widgets/PeopleFilterPicker.php b/protected/humhub/modules/user/widgets/PeopleFilterPicker.php
index 9a2d21a4de..34f9c95821 100644
--- a/protected/humhub/modules/user/widgets/PeopleFilterPicker.php
+++ b/protected/humhub/modules/user/widgets/PeopleFilterPicker.php
@@ -84,6 +84,7 @@ class PeopleFilterPicker extends BasePicker
return [
'data-multiple' => 'false',
'data-tags' => 'false',
+ 'data-clearable' => 'false',
'size' => '1',
'class' => 'form-control',
'style' => 'width:100%',
diff --git a/static/css/select2Theme/select2-humhub.less b/static/css/select2Theme/select2-humhub.less
index 972a46747a..82f3bc1446 100644
--- a/static/css/select2Theme/select2-humhub.less
+++ b/static/css/select2Theme/select2-humhub.less
@@ -87,10 +87,6 @@
.select2-container--humhub {
display: block;
-
-
-
-
/*------------------------------------*\
#COMMON STYLES
\*------------------------------------*/
@@ -98,6 +94,7 @@
.select2-selection {
.humhub-input-defaults;
outline: 0;
+ min-height: 35px;
}
/**
diff --git a/static/js/humhub/humhub.ui.picker.js b/static/js/humhub/humhub.ui.picker.js
index 0f086c8f53..322dd30426 100644
--- a/static/js/humhub/humhub.ui.picker.js
+++ b/static/js/humhub/humhub.ui.picker.js
@@ -201,14 +201,15 @@ humhub.module('ui.picker', function (module, require, $) {
}
var placeholder = input.attr('placeholder');
- if (placeholder.length) {
+ if (typeof placeholder !== 'undefined' && placeholder.length) {
input.attr('size', placeholder.length);
}
};
Picker.template = {
- selectionWithImage: '{imageNode} ',
- selectionNoImage: ' ',
+ selectionWithImage: '{imageNode}',
+ selectionNoImage: '',
+ selectionClear: ' ',
result: '{imageNode} ',
resultDisabled: '{imageNode} ',
imageNode: '',
@@ -302,6 +303,10 @@ humhub.module('ui.picker', function (module, require, $) {
var selectionTmpl = (item.image && !item.new) ? Picker.template.selectionWithImage : Picker.template.selectionNoImage;
+ if (this.$.data('clearable') || this.$.data('clearable') === undefined) {
+ selectionTmpl += Picker.template.selectionClear;
+ }
+
var $result = $(string.template(selectionTmpl, item));
var test = $result.find('.picker-text');