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 15:15:22 +0000 (16:15 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index 75563c11cb0293db0031078f767dad75caf25055..08196117b0483d42c6c6cb9d0c1c12a18f0ac5ac 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 {