summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-09-12 18:27:20 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-09-12 18:32:14 +0200
commita7b19720f53a429e3fa73565f5256b8468d19ca9 (patch)
tree9dec409ffb190bdc8fbfa8637d2807e950a23a5c
parentc08c56c58fc1770d6d80f557c0728ae6679e1879 (diff)
downloadfreeipa-a7b19720f53a429e3fa73565f5256b8468d19ca9.tar.gz
freeipa-a7b19720f53a429e3fa73565f5256b8468d19ca9.tar.xz
freeipa-a7b19720f53a429e3fa73565f5256b8468d19ca9.zip
webui: allow to skip link widget link validation
-rw-r--r--install/ui/src/freeipa/widget.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 764feea7d..99b66619b 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4026,8 +4026,21 @@ IPA.link_widget = function(spec) {
*/
that.other_pkeys = spec.other_pkeys || other_pkeys;
+ /**
+ * Indicates if it's a valid link
+ * @property {boolean}
+ */
that.is_link = spec.is_link || false;
+ /**
+ * Whether to skip entity validation step
+ *
+ * Value of `is_link` won't be changed.
+ *
+ * @property {boolean}
+ */
+ that.no_check = spec.no_check;
+
that.value = '';
that.values = [];
@@ -4061,7 +4074,7 @@ IPA.link_widget = function(spec) {
that.value = that.values.slice(-1)[0] || '';
that.link.html(that.value);
that.nonlink.html(that.value);
-
+ that.update_link();
that.check_entity_link();
that.on_value_changed();
};
@@ -4107,6 +4120,8 @@ IPA.link_widget = function(spec) {
return;
}
+ if (that.no_check) return;
+
rpc.command({
entity: that.other_entity.name,
method: 'show',
@@ -4122,8 +4137,6 @@ IPA.link_widget = function(spec) {
that.update_link();
}
}).execute();
-
- that.update_link();
};
/** @inheritDoc */