summaryrefslogtreecommitdiffstats
path: root/install/ui/dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/dialog.js')
-rw-r--r--install/ui/dialog.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index 2d6d941c6..86aefeffc 100644
--- a/install/ui/dialog.js
+++ b/install/ui/dialog.js
@@ -162,17 +162,21 @@ IPA.dialog = function(spec) {
field.create(field_container);
- if (field.optional){
- field_container.css('display','none');
+ if (field.optional) {
+ field_container.css('display', 'none');
+
var link = $('<a/>', {
text: IPA.messages.widget.optional,
- href: '',
- click: function(){
+ href: ''
+ }).appendTo(td);
+
+ link.click(function(field_container, link) {
+ return function() {
field_container.css('display', 'inline');
link.css('display', 'none');
return false;
- }
- }).appendTo(td);
+ };
+ }(field_container, link));
}
}