fix multiple request (I hope)

This commit is contained in:
Ezequiel Bergamaschi 2014-02-02 23:34:20 -03:00 committed by Ezequiel Bergamaschi
parent 460d8270c6
commit 3cf726f928

View File

@ -76,14 +76,14 @@ jQuery.fn.dialogForm = function (options) {
// Clear form values ... // Clear form values ...
if (options.clearForm == undefined || options.clearForm) { if (options.clearForm == undefined || options.clearForm) {
$("#" + containerId).find('input').attr('value', ''); $("#" + containerId).find('input[name!="color"]').val('');
} }
// Clear button "Saving..." state ... // Clear button "Saving..." state ...
var acceptBtn = $('#' + containerId + ' .btn-accept'); var acceptBtn = $('#' + containerId + ' .btn-accept');
acceptBtn.button('reset'); acceptBtn.button('reset');
acceptBtn.click( function (event) { acceptBtn.unbind('click').click( function (event) {
var formData = {}; var formData = {};
$('#' + containerId + ' input').each(function (index, elem) { $('#' + containerId + ' input').each(function (index, elem) {
formData[elem.name] = elem.value; formData[elem.name] = elem.value;