summaryrefslogtreecommitdiffstats
path: root/install/ui/field.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2011-12-14 15:19:16 +0100
committerEndi S. Dewata <edewata@redhat.com>2012-02-14 08:35:41 -0600
commit7e02cb8aecc517c484faa3baa18dedef059a219f (patch)
tree39f1196da14ca52d288f3b8a1e261c9a3b5cf3fa /install/ui/field.js
parent8aa63d01714fe6e06363994cb1f419d9eab56732 (diff)
downloadfreeipa-7e02cb8aecc517c484faa3baa18dedef059a219f.tar.gz
freeipa-7e02cb8aecc517c484faa3baa18dedef059a219f.tar.xz
freeipa-7e02cb8aecc517c484faa3baa18dedef059a219f.zip
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
Diffstat (limited to 'install/ui/field.js')
-rw-r--r--install/ui/field.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/install/ui/field.js b/install/ui/field.js
index 38d71b476..c79c59bb4 100644
--- a/install/ui/field.js
+++ b/install/ui/field.js
@@ -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();