From 6f60445ca8574b0a51b1820006020a2e1724af5c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 14:05:33 +0200 Subject: [PATCH] set data-allow-clear on select2 --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 5917f5b81..6f58067dd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1408,7 +1408,7 @@ $(document).ready(function() { if($attrdef->getMultipleValues()) { $content .= "[]\" multiple"; } else { - $content .= "\""; + $content .= "\" data-allow-clear=\"true\""; } $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; if(!$attrdef->getMultipleValues()) {