bug fix
This commit is contained in:
parent
30cfcc7816
commit
4f81b17edc
1 changed files with 2 additions and 7 deletions
|
|
@ -24,9 +24,7 @@
|
|||
var button = $(event.relatedTarget);
|
||||
var modal = $(this);
|
||||
|
||||
// Reset all inputs
|
||||
if (formTemplateId != null)
|
||||
modal.find("#" + formTemplateId).empty(); // clear form div
|
||||
modal.find(" input, select").val('').change(); // Reset all inputs
|
||||
|
||||
// Set dynamic form data
|
||||
$.each(button.attr(), function(fieldName, value) {
|
||||
|
|
@ -53,10 +51,7 @@
|
|||
input.parent().prepend("<input type='hidden' name='" + input.prop("name") + "' value='false' />");
|
||||
}
|
||||
} else {
|
||||
input.val(value);
|
||||
|
||||
if (input.prop("tagName") == "SELECT")
|
||||
input.change(); // required for select elements to update properly
|
||||
input.val(value).change();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue