luci-base: make tooltip icon string configurable
[project/luci.git] / modules / luci-base / htdocs / luci-static / resources / form.js
index 4a4536bb9415d1008560e17a212d24dd29f46fe8..58a31dddb2ebce6af8be0965aa2df04b2d687e0f 100644 (file)
@@ -3616,6 +3616,17 @@ var CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ {
         * @default null
         */
 
+       /**
+        * Set a tooltip icon.
+        *
+        * If set, this icon will be shown for the default one.
+        * This could also be a png icon from the resources directory.
+        *
+        * @name LuCI.form.TypedSection.prototype#tooltipicon
+        * @type string
+        * @default 'ℹ️';
+        */
+
        /** @private */
        renderWidget: function(section_id, option_index, cfgvalue) {
                var tooltip = null;
@@ -3631,6 +3642,7 @@ var CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ {
                        value_disabled: this.disabled,
                        validate: L.bind(this.validate, this, section_id),
                        tooltip: tooltip,
+                       tooltipicon: this.tooltipicon,
                        disabled: (this.readonly != null) ? this.readonly : this.map.readonly
                });