luci-base: ui.js: use placeholder as select placeholder in DynLists
authorJo-Philipp Wich <jo@mein.io>
Sun, 19 Jan 2020 14:52:13 +0000 (15:52 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 19 Jan 2020 19:15:52 +0000 (20:15 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9733a182e8dc1713e27e784fa7aded553caad695)

modules/luci-base/htdocs/luci-static/resources/ui.js

index 17d9555078119939318bcc6261d4a99ff741a387..c9dfea03ccd6dcb142ece673da609e9aed1d7ae7 100644 (file)
@@ -1326,7 +1326,11 @@ var UIDynamicList = UIElement.extend({
                }, E('div', { 'class': 'add-item' }));
 
                if (this.choices) {
+                       if (this.options.placeholder != null)
+                               this.options.select_placeholder = this.options.placeholder;
+
                        var cbox = new UICombobox(null, this.choices, this.options);
+
                        dl.lastElementChild.appendChild(cbox.render());
                }
                else {