mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixed missing optional field.
The optional uid field in user's adder dialog did not appear when the link is clicked to show the field. This is a regression introduced in the patch for ticket #1648. The click handler for the link field has been moved into a new closure so that the variables point to the correct elements. Note: the duplicate code in IPA.details_table_section.create() and IPA.dialog.create() will be addressed separately in ticket #1394.
This commit is contained in:
parent
452863dcba
commit
d4a2851873
@ -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));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user