NIHVIVO-1024 Fixed error in clearFields() method of customFormUtils from last commit: field val was not being cleared. When type selection changes, prevent emptying of acSelector field if a new type value has been entered manually.

This commit is contained in:
rjy7 2010-09-03 20:18:36 +00:00
parent 6cd5433b72
commit fe6cde2220

View file

@ -30,7 +30,7 @@ vitro.customFormUtils = {
// Clear data from form elements in element el
clearFields: function(el) {
el.find(':input[type!="hidden"][type!="submit"][type!="button"]').each(function() {
$(this).val();
$(this).val('');
// Remove a validation error associated with this element.
// For now we can remove the error elements. Later we may include them in
// the markup, for customized positioning, in which case we will empty them