mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -06:00
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>
This commit is contained in:
parent
bf96b80200
commit
51af7a1598
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user