Skip to content

Commit 279a5b6

Browse files
author
Martin Spielmann
committed
Revert "Add feedback to SSH Key Form. #1226"
This reverts commit c3e317a. Was added by mistake here. Should go into own branch to be able to merge with upstream using separate PR
1 parent c3e317a commit 279a5b6

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

src/main/java/com/gitblit/wicket/GitBlitWebApp.properties

-2
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,6 @@ gb.emailAddressDescription = The primary email address for receiving notificatio
739739
gb.sshKeys = SSH Keys
740740
gb.sshKeysDescription = SSH public key authentication is a secure alternative to password authentication
741741
gb.addSshKey = Add SSH Key
742-
gb.addSshKeyErrorEmpty = SSH public key empty. Please provide a valid SSH public key
743-
gb.addSshKeyErrorFormat = Not a valid SSH public key format. Please provide a valid SSH public key
744742
gb.key = Key
745743
gb.comment = Comment
746744
gb.sshKeyCommentDescription = Enter an optional comment. If blank, the comment will be extracted from the key data.

src/main/java/com/gitblit/wicket/GitBlitWebApp_de.properties

-2
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,6 @@ gb.emailAddressDescription = Die prim\u00e4re Emailadresse f\u00fcr den Empfang
736736
gb.sshKeys = SSH Keys
737737
gb.sshKeysDescription = SSH Public Key Authentifizierung ist eine sichere Alternative zur Authentifizierung mit Passwort
738738
gb.addSshKey = SSH Key hinzuf\u00fcgen
739-
gb.addSshKeyErrorEmpty = SSH Public Key leer. Bitte geben Sie einen g\u00fltigen SSH Public Key an
740-
gb.addSshKeyErrorFormat = SSH Public Key Format ungültig. Bitte geben Sie einen g\u00fltigen SSH Public Key an
741739
gb.key = Key
742740
gb.comment = Kommentar
743741
gb.sshKeyCommentDescription = Geben Sie optional einen Kommentar ein. Falls Sie dies nicht tun, wird der Kommentar aus dem Key extrahiert.

src/main/java/com/gitblit/wicket/pages/BasePage.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ protected void setupPage(String repositoryName, String pageName) {
251251
add(rootLink);
252252

253253
// Feedback panel for info, warning, and non-fatal error messages
254-
add(new FeedbackPanel("feedback").setOutputMarkupId(true));
254+
add(new FeedbackPanel("feedback"));
255255

256256
add(new Label("gbVersion", "v" + Constants.getVersion()));
257257
if (app().settings().getBoolean(Keys.web.aggressiveHeapManagement, false)) {

src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java

-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
2525
import org.apache.wicket.markup.html.basic.Label;
2626
import org.apache.wicket.markup.html.form.Form;
27-
import org.apache.wicket.markup.html.panel.FeedbackPanel;
2827
import org.apache.wicket.markup.repeater.Item;
2928
import org.apache.wicket.markup.repeater.data.DataView;
3029
import org.apache.wicket.markup.repeater.data.ListDataProvider;
@@ -124,9 +123,6 @@ public void onClick(AjaxRequestTarget target) {
124123
"span5",
125124
keyComment));
126125

127-
// final FeedbackPanel feedback = new FeedbackPanel("feedback");
128-
// feedback.setOutputMarkupId(true);
129-
// addKeyForm.add(feedback);
130126
addKeyForm.add(new AjaxButton("addKeyButton") {
131127

132128
private static final long serialVersionUID = 1L;
@@ -138,8 +134,6 @@ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
138134
String data = keyData.getObject();
139135
if (StringUtils.isEmpty(data)) {
140136
// do not submit empty key
141-
error(getString("gb.addSshKeyErrorEmpty"));
142-
target.addComponent(getPage().get("feedback"));
143137
return;
144138
}
145139

@@ -148,8 +142,6 @@ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
148142
key.getPublicKey();
149143
} catch (Exception e) {
150144
// failed to parse the key
151-
error(getString("gb.addSshKeyErrorFormat"));
152-
target.addComponent(getPage().get("feedback"));
153145
return;
154146
}
155147

0 commit comments

Comments
 (0)