summaryrefslogtreecommitdiffstats
path: root/install/ui
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-10-06 13:05:05 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-11 16:48:47 +0200
commit51af7a15981eca753dfbda133cc557d0512f6e95 (patch)
treea67bf0b4434f16d369ac5a2655264c4222d37576 /install/ui
parentbf96b80200c3e8d1795a913db4e0222ea558e609 (diff)
downloadfreeipa-51af7a15981eca753dfbda133cc557d0512f6e95.tar.gz
freeipa-51af7a15981eca753dfbda133cc557d0512f6e95.tar.xz
freeipa-51af7a15981eca753dfbda133cc557d0512f6e95.zip
Add tooltip to all fields in DNS record adder dialog
In case that option is not documented or the doc string is the same as label, then no tooltip is shown. Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r--install/ui/src/freeipa/dns.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js
index 2e8a71e4e..f0ec1e315 100644
--- a/install/ui/src/freeipa/dns.js
+++ b/install/ui/src/freeipa/dns.js
@@ -975,6 +975,16 @@ IPA.dns.record_search_deleter_dialog = function(spec) {
return that;
};
+/**
+ * This definition of records attributes is used for generating adder dialog.
+ *
+ * HOW TO EDIT ADDER DIALOG:
+ * In case you want to edit fields or widgets in adder dialog, you have to
+ * create object from attribute, then the attribute will be the name property
+ * of object. Then most of the widget or fields attributes have to be added in
+ * widget_opt (field_opt). Check the IPA.dns.record_prepare_editor_for_type
+ * method.
+ */
IPA.dns.record_metadata = null;
IPA.dns.get_record_metadata = function() {
@@ -1526,6 +1536,11 @@ IPA.dns.record_prepare_editor_for_type = function(type, fields, widgets, update)
widget.name = attribute;
} else {
widget.name = attribute.name;
+ if (metadata) {
+ var doc = metadata.doc;
+ var label = metadata.label;
+ if (doc !== label) widget.tooltip = doc;
+ }
set_defined(attribute.$type, widget, '$type');
set_defined(attribute.options, widget, 'options');
copy_obj(widget, attribute.widget_opt);