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-30 10:47:03 +0200
commit8b0e2ed991e9a1a49ef92e314d3d4855beb93b46 (patch)
treee8393ee02c62c5f0d18909d1f54258525e27f9bb
parent27196b92c60917d8488dad8721d2087e9fee716c (diff)
downloadfreeipa-8b0e2ed991e9a1a49ef92e314d3d4855beb93b46.tar.gz
freeipa-8b0e2ed991e9a1a49ef92e314d3d4855beb93b46.tar.xz
freeipa-8b0e2ed991e9a1a49ef92e314d3d4855beb93b46.zip
webui: allow to skip link widget link validation
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
-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 10715aa49..f44710384 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4096,8 +4096,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 = [];
@@ -4131,7 +4144,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(values);
};
@@ -4177,6 +4190,8 @@ IPA.link_widget = function(spec) {
return;
}
+ if (that.no_check) return;
+
rpc.command({
entity: that.other_entity.name,
method: 'show',
@@ -4192,8 +4207,6 @@ IPA.link_widget = function(spec) {
that.update_link();
}
}).execute();
-
- that.update_link();
};
/** @inheritDoc */