summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Kempin <edwin.kempin@sap.com>2011-05-19 00:30:03 +0200
committerEdwin Kempin <edwin.kempin@sap.com>2011-05-19 01:02:14 +0200
commit3fa44a2f6fd19120680a08037e06d27c53e1229f (patch)
tree4ed5a9c9770f2084341fd48a3fb09c0420cae2d6
parent058b3ec65d035fdd428bc81811b777ed8a5d629a (diff)
Re-enable form if 'Publish and Submit' fails to submit
If submit fails when a user presses 'Publish and Submit' in the PublishCommentsScreen the form stays disabled so that now it's not possible to publish the voting and the comments without submitting (because the 'Publish' button is disabled). Now it's also not possible to copy a typed in summary comment to the clipboard. This change ensures that the form gets re-enabled if the submit fails. Change-Id: I75a0c55e98d064c4b64eaa78dac30ac202bf411f Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
-rw-r--r--gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PublishCommentScreen.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PublishCommentScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PublishCommentScreen.java
index f9e55be5ae..d94433acff 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PublishCommentScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PublishCommentScreen.java
@@ -367,6 +367,12 @@ public class PublishCommentScreen extends AccountScreen implements
saveStateOnUnload = false;
goChange();
}
+
+ @Override
+ public void onFailure(Throwable caught) {
+ super.onFailure(caught);
+ enableForm(true);
+ }
});
}