mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
0c7ca279c7
commit
6be32edde0
@ -743,7 +743,8 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
|
|||||||
var fields = that.fields.get_fields();
|
var fields = that.fields.get_fields();
|
||||||
for (var i=0; i<fields.length; i++) {
|
for (var i=0; i<fields.length; i++) {
|
||||||
var field = fields[i];
|
var field = fields[i];
|
||||||
field.load(data);
|
|
||||||
|
if (field.autoload_value) field.load(data);
|
||||||
}
|
}
|
||||||
that.policies.post_load(data);
|
that.policies.post_load(data);
|
||||||
that.post_load.notify([data], that);
|
that.post_load.notify([data], that);
|
||||||
|
@ -195,6 +195,14 @@ field.field = IPA.field = function(spec) {
|
|||||||
*/
|
*/
|
||||||
that.required = spec.required;
|
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
|
* read_only is set when widget is created
|
||||||
* @readonly
|
* @readonly
|
||||||
|
Loading…
Reference in New Issue
Block a user