From 374cfffb8963b04c5705b43623ff01d685d608c2 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 21 Mar 2016 15:09:57 +0000 Subject: [PATCH] Fix missing optgroup labels --- api/js/etemplate/et2_widget_selectbox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index c188d166d2..1126a82a68 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -691,7 +691,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( if(typeof _options[key]["label"] == 'undefined' && typeof _options[key]["title"] == "undefined") { var group = $j(document.createElement("optgroup")) - .attr("label", this.options.no_lang ? key : this.egw().lang(key)) + .attr("label", this.options.no_lang ? _options[key].value : this.egw().lang(_options[key].value)) .appendTo(this.input); if(this.input == null) { @@ -702,6 +702,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( for(var sub in _options[key]) { + if(sub == 'value') continue; if (typeof _options[key][sub] === 'object' && _options[key][sub] !== null) { this._appendOptionElement(sub,