summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/details.js14
-rw-r--r--install/ui/dialog.js16
2 files changed, 19 insertions, 11 deletions
diff --git a/install/ui/details.js b/install/ui/details.js
index 23f217a..f783111 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -213,17 +213,21 @@ IPA.details_table_section = function(spec) {
field.create(field_container);
- if (field.optional){
+ 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));
}
}
};
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index 2d6d941..86aefef 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));
}
}