Skip to content

Commit

Permalink
Sometimes in dialogs, the form is wrapped in a view to provide additi…
Browse files Browse the repository at this point in the history
…onal information. We need to replace the contents of the entire dialog, not just the form, otherwise, there could be text floating around that doesn't make sense.
  • Loading branch information
Tim Almdal committed Jul 29, 2010
1 parent 6cd31e3 commit 8cd9c09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/gallery.dialog.js
Expand Up @@ -132,7 +132,7 @@
success: function(data) {
if (data.form) {
var formData = unescape(data.form);
$("#g-dialog form").replaceWith(formData);
$("#g-dialog").html(formData);
$("#g-dialog").dialog("option", "position", "center");
$("#g-dialog form :submit").removeClass("ui-state-disabled")
.attr("disabled", null);
Expand Down
2 changes: 1 addition & 1 deletion lib/gallery.panel.js
Expand Up @@ -80,7 +80,7 @@
},
success: function(data) {
if (data.form) {
$("#g-panel td form").replaceWith(data.form);
$("#g-panel td").html(data.form);
self._ajaxify_panel();
}
if (data.result == "success") {
Expand Down

0 comments on commit 8cd9c09

Please sign in to comment.