Fix delete operation.

This commit is contained in:
Paulo Gustavo Veiga
2012-05-19 21:36:34 -03:00
parent 07056b95fe
commit b534fce00f
5 changed files with 51 additions and 97 deletions

View File

@@ -72,8 +72,11 @@ jQuery.fn.dialogForm = function(options) {
var containerId = this[0].id;
var url = options.url;
// Clean previous dialog content ...
$("#" + containerId + " div[id='errorMessage']").text("").removeClass("ui-state-highlight");
// Clear previous state ...
$("#" + containerId + " .errorMessage").text("").removeClass("alert alert-error");
$("#" + containerId + " .control-group").removeClass('error');
$("#" + containerId + " input").attr('value','');
var acceptBtn = $('#' + containerId + ' .btn-accept');
acceptBtn.click(function() {
@@ -117,7 +120,9 @@ jQuery.fn.dialogForm = function(options) {
// Mark the field ...
var message = fieldErrors[fieldName];
var inputField = $("#" + containerId + " input[name='" + fieldName + "']");
$("#" + containerId + " div[id='errorMessage']").text(message).addClass("alert alert-error");
$("#" + containerId + " .errorMessage").text(message).addClass("alert alert-error");
inputField.parent().addClass('error');
}
}