From 279a5b606dc18ce9bb21a93e2e108090028369ca Mon Sep 17 00:00:00 2001 From: Martin Spielmann Date: Mon, 22 May 2017 00:32:23 +0200 Subject: [PATCH] Revert "Add feedback to SSH Key Form. #1226" This reverts commit c3e317a28899915036517c3a05a2b883796f633d. Was added by mistake here. Should go into own branch to be able to merge with upstream using separate PR --- src/main/java/com/gitblit/wicket/GitBlitWebApp.properties | 2 -- .../java/com/gitblit/wicket/GitBlitWebApp_de.properties | 2 -- src/main/java/com/gitblit/wicket/pages/BasePage.java | 2 +- src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java | 8 -------- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties index d8a58943..c46bd63d 100644 --- a/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties @@ -739,8 +739,6 @@ gb.emailAddressDescription = The primary email address for receiving notificatio gb.sshKeys = SSH Keys gb.sshKeysDescription = SSH public key authentication is a secure alternative to password authentication gb.addSshKey = Add SSH Key -gb.addSshKeyErrorEmpty = SSH public key empty. Please provide a valid SSH public key -gb.addSshKeyErrorFormat = Not a valid SSH public key format. Please provide a valid SSH public key gb.key = Key gb.comment = Comment gb.sshKeyCommentDescription = Enter an optional comment. If blank, the comment will be extracted from the key data. diff --git a/src/main/java/com/gitblit/wicket/GitBlitWebApp_de.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_de.properties index 3f873cc1..9599f7eb 100644 --- a/src/main/java/com/gitblit/wicket/GitBlitWebApp_de.properties +++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_de.properties @@ -736,8 +736,6 @@ gb.emailAddressDescription = Die prim\u00e4re Emailadresse f\u00fcr den Empfang gb.sshKeys = SSH Keys gb.sshKeysDescription = SSH Public Key Authentifizierung ist eine sichere Alternative zur Authentifizierung mit Passwort gb.addSshKey = SSH Key hinzuf\u00fcgen -gb.addSshKeyErrorEmpty = SSH Public Key leer. Bitte geben Sie einen g\u00fltigen SSH Public Key an -gb.addSshKeyErrorFormat = SSH Public Key Format ungültig. Bitte geben Sie einen g\u00fltigen SSH Public Key an gb.key = Key gb.comment = Kommentar gb.sshKeyCommentDescription = Geben Sie optional einen Kommentar ein. Falls Sie dies nicht tun, wird der Kommentar aus dem Key extrahiert. diff --git a/src/main/java/com/gitblit/wicket/pages/BasePage.java b/src/main/java/com/gitblit/wicket/pages/BasePage.java index bb97ee8c..0d99f5e5 100644 --- a/src/main/java/com/gitblit/wicket/pages/BasePage.java +++ b/src/main/java/com/gitblit/wicket/pages/BasePage.java @@ -251,7 +251,7 @@ public abstract class BasePage extends SessionPage { add(rootLink); // Feedback panel for info, warning, and non-fatal error messages - add(new FeedbackPanel("feedback").setOutputMarkupId(true)); + add(new FeedbackPanel("feedback")); add(new Label("gbVersion", "v" + Constants.getVersion())); if (app().settings().getBoolean(Keys.web.aggressiveHeapManagement, false)) { diff --git a/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java b/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java index 629c58eb..4b878763 100644 --- a/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java @@ -24,7 +24,6 @@ import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; -import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.markup.repeater.Item; import org.apache.wicket.markup.repeater.data.DataView; import org.apache.wicket.markup.repeater.data.ListDataProvider; @@ -124,9 +123,6 @@ public class SshKeysPanel extends BasePanel { "span5", keyComment)); -// final FeedbackPanel feedback = new FeedbackPanel("feedback"); -// feedback.setOutputMarkupId(true); -// addKeyForm.add(feedback); addKeyForm.add(new AjaxButton("addKeyButton") { private static final long serialVersionUID = 1L; @@ -138,8 +134,6 @@ public class SshKeysPanel extends BasePanel { String data = keyData.getObject(); if (StringUtils.isEmpty(data)) { // do not submit empty key - error(getString("gb.addSshKeyErrorEmpty")); - target.addComponent(getPage().get("feedback")); return; } @@ -148,8 +142,6 @@ public class SshKeysPanel extends BasePanel { key.getPublicKey(); } catch (Exception e) { // failed to parse the key - error(getString("gb.addSshKeyErrorFormat")); - target.addComponent(getPage().get("feedback")); return; } -- 2.39.5