diff options
author | Pavel Vomacka <pvomacka@redhat.com> | 2017-03-07 21:28:32 +0100 |
---|---|---|
committer | David Kupka <dkupka@redhat.com> | 2017-03-08 16:22:01 +0100 |
commit | 6be32edde0ae16473d4d109747adae78f9d725e4 (patch) | |
tree | 76d7a24181ec34daa5c016cc007e232bfcbaea0e | |
parent | 0c7ca279c78bc23d45582e92bb1638865ec3059e (diff) | |
download | freeipa-6be32edde0ae16473d4d109747adae78f9d725e4.tar.gz freeipa-6be32edde0ae16473d4d109747adae78f9d725e4.tar.xz freeipa-6be32edde0ae16473d4d109747adae78f9d725e4.zip |
WebUI: Add possibility to turn of autoload when details.load is called
When field on details facet has set 'autoload_value' to false, then it won't
be loaded using that.load method of details facet. That means that field
might stay unchanged even that loading of data was performed.
Part of: https://pagure.io/freeipa/issue/6601
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
-rw-r--r-- | install/ui/src/freeipa/details.js | 3 | ||||
-rw-r--r-- | install/ui/src/freeipa/field.js | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js index 9f0e6321e..87b355a63 100644 --- a/install/ui/src/freeipa/details.js +++ b/install/ui/src/freeipa/details.js @@ -743,7 +743,8 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) { var fields = that.fields.get_fields(); for (var i=0; i<fields.length; i++) { var field = fields[i]; - field.load(data); + + if (field.autoload_value) field.load(data); } that.policies.post_load(data); that.post_load.notify([data], that); diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js index f410557ba..3c027bc43 100644 --- a/install/ui/src/freeipa/field.js +++ b/install/ui/src/freeipa/field.js @@ -196,6 +196,14 @@ field.field = IPA.field = function(spec) { that.required = spec.required; /** + * Turns off loading value from command output on details pages. + * Used in certmap_match. + * @property {boolean} + */ + that.autoload_value = spec.autoload_value === undefined ? true : + spec.autoload_value; + + /** * read_only is set when widget is created * @readonly * @property {boolean} |