Fixed entity link disabling

Problem:
Entity link (eg: to hosts in dns record or to dns record in host) is not changing its state when linked record doesn't exist. The link can remain wrongly enabled from previous state.

Fixed:
The link is disabled when target doesn't exist.

https://fedorahosted.org/freeipa/ticket/2364
This commit is contained in:
Petr Vobornik authored and Endi S. Dewata committed 2012-02-14 08:35:41 -06:00
1 parent 8aa63d0171
commit 7e02cb8aec
1 file changed
+6 -2
+6 -2
View File
@@ -636,8 +636,12 @@ IPA.link_field = function(spec) {
args: that.other_pkeys(),
options: {},
retry: false,
on_success: function (result) {
that.widget.is_link = result.result !== undefined;
on_success: function(data) {
that.widget.is_link = data.result && data.result.result;
that.widget.update(that.values);
},
on_error: function() {
that.widget.is_link = false;
that.widget.update(that.values);
}
}).execute();