summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kellner <tobias.kellner@iaik.tugraz.at>2014-12-03 18:14:48 +0100
committerTobias Kellner <tobias.kellner@iaik.tugraz.at>2014-12-03 18:14:48 +0100
commitc072c4e780b4582b18b3b36ee75c5fd58db00dad (patch)
treeb92de4570bcd83e761633ac4863cbfb299425820
parentd74a1c548cdc9c1617810779deb5aab6aa3c59a2 (diff)
downloadmocca-c072c4e780b4582b18b3b36ee75c5fd58db00dad.tar.gz
mocca-c072c4e780b4582b18b3b36ee75c5fd58db00dad.tar.bz2
mocca-c072c4e780b4582b18b3b36ee75c5fd58db00dad.zip
Show appropriate error when submitting empty TAN
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java6
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties1
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties3
3 files changed, 9 insertions, 1 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
index 66063a62..7bda7fc4 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
@@ -72,6 +72,12 @@ public class MobileBKUEnterTANComposite extends StateComposite {
tan = tan.trim();
+ if (tan.isEmpty()) {
+ MobileBKUEnterTANComposite.this.setMessage(Messages
+ .getString("error.NoTan")); //$NON-NLS-1$
+ return;
+ }
+
if (MobileBKUEnterTANComposite.this.refVal.startsWith(tan)) {
MobileBKUEnterTANComposite.this.setMessage(Messages
.getString("error.EnteredReferenceValue")); //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index 1fb2c2de..4db02e9a 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -99,6 +99,7 @@ error.InvalidSettings=Invalid settings are still present. Please check your inpu
error.IOError=Input/Output Error
error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at
error.MayNotBeAPDF=This may not be a PDF file
+error.NoTan=No TAN entered
error.PDFProtected=This PDF file is encrypted and can therefore not be signed
error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed
error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning.
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
index 18ead540..86696107 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
@@ -99,6 +99,7 @@ error.InvalidSettings=Ungültige Einstellungen vorhanden. Bitte überprüfen.
error.IOError=Ein-/Ausgabe-Fehler
error.LocalBKU=Bitte prüfen sie, ob Ihre lokale BKU (Bürgerkartenumgebung) läuft\n\nSie benötigen eine BKU, um auf Ihre Bürgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at
error.MayNotBeAPDF=Dies ist möglicherweise keine PDF-Datei
+error.NoTan=Keine TAN eingeben
error.PDFProtected=Diese PDF-Datei ist verschlüsselt und kann daher nicht signiert werden
error.PDFPwdProtected=Diese PDF-Datei ist Passwortgeschützt und kann daher nicht signiert werden
error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verfügbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
@@ -109,7 +110,7 @@ error.Signatur=Signatur-Fehler
error.SignaturePanel.NoPage=Keine Seite gewählt
error.SignaturePanel.NoRender=Konnte Seite nicht darstellen
error.SWTLib=Fehler beim Laden der SWT-Bibliothek
-error.TanTooLong=Eingegebener TAN zu lange
+error.TanTooLong=Eingegebene TAN zu lange
error.Title=Fehler
error.TitleFatal=Fataler Fehler
error.Unexpected=Unerwarteter Fehler