summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r--install/ui/src/freeipa/group.js10
-rw-r--r--install/ui/src/freeipa/widget.js25
2 files changed, 24 insertions, 11 deletions
diff --git a/install/ui/src/freeipa/group.js b/install/ui/src/freeipa/group.js
index 3961384dc..6f6f13e74 100644
--- a/install/ui/src/freeipa/group.js
+++ b/install/ui/src/freeipa/group.js
@@ -68,7 +68,15 @@ return {
posixgroup: '@i18n:objects.group.posix'
}
},
- 'gidnumber'
+ 'gidnumber',
+ {
+ $type: 'link',
+ name: 'pwpolicy',
+ param: 'cn',
+ label: '@mo:pwpolicy.label_singular',
+ other_entity: 'pwpolicy',
+ require_link: true
+ }
]
}
],
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 29d320c07..125d499b6 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4143,6 +4143,12 @@ IPA.link_widget = function(spec) {
*/
that.no_check = spec.no_check;
+ /**
+ * Whether value can be displayed even if link is not valid.
+ * @property {boolean}
+ */
+ that.require_link = spec.require_link !== undefined ? spec.require_link : false;
+
that.value = '';
that.values = [];
@@ -4182,18 +4188,17 @@ IPA.link_widget = function(spec) {
};
that.update_link = function() {
+
+ var link = false;
+ var nonlink = false;
+
if (that.value) {
- if(that.is_link) {
- that.link.css('display','');
- that.nonlink.css('display','none');
- } else {
- that.link.css('display','none');
- that.nonlink.css('display','');
- }
- } else {
- that.link.css('display','none');
- that.nonlink.css('display','none');
+ link = !!that.is_link;
+ nonlink = !that.is_link && !that.require_link;
}
+
+ that.link.css('display', link ? '' : 'none');
+ that.nonlink.css('display', nonlink ? '' : 'none');
};
/**