- Fix adding contact form fields in situation when the fieldset is empty.

Fixes issue with lost manager/assistant fields in LDAP addressbook
pull/1/head
alecpl 12 years ago
parent 2c4d0bc88e
commit c71e95b775

@ -4563,8 +4563,15 @@ function rcube_webmail()
var lastelem = $('.ff_'+col),
appendcontainer = $('#contactsection'+section+' .contactcontroller'+col);
if (!appendcontainer.length)
appendcontainer = $('<fieldset>').addClass('contactfieldgroup contactcontroller'+col).insertAfter($('#contactsection'+section+' .contactfieldgroup').last());
if (!appendcontainer.length) {
var sect = $('#contactsection'+section),
lastgroup = $('.contactfieldgroup', sect).last();
appendcontainer = $('<fieldset>').addClass('contactfieldgroup contactcontroller'+col);
if (lastgroup.length)
appendcontainer.insertAfter(lastgroup);
else
sect.prepend(appendcontainer);
}
if (appendcontainer.length && appendcontainer.get(0).nodeName == 'FIELDSET') {
var input, colprop = this.env.coltypes[col],

@ -669,7 +669,7 @@ function rcmail_contact_form($form, $record, $attrib = null)
}
}
if (!$content)
if (!$content && !$edit_mode)
continue;
// also render add-field selector

Loading…
Cancel
Save