From 58326d07f6f95c815f884bece8fad18291ca72a6 Mon Sep 17 00:00:00 2001 From: A Sigalas Date: Thu, 5 Oct 2017 10:20:01 +0000 Subject: [PATCH] Allow single deselect for listboxes --- api/js/etemplate/et2_widget_selectbox.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index bde0d8a1dc..a3093dc021 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -78,6 +78,12 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( "default": false, "description": "For multi-selects, displays selected as a list of tags instead of a big list" }, + "allow_single_deselect": { + "name": "Allow Single Deselect", + "type": "boolean", + "default": true, + "description": "Allow user to unset current selected value" + }, // Value can be string or integer "value": { @@ -709,6 +715,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( inherit_select_classes: true, search_contains: true, width: _width || size.w + "px", + allow_single_deselect: this.options.allow_single_deselect, no_results_text: this.egw().lang('No results match') });