summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2019-07-31 17:31:31 +0200
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2019-07-31 17:31:31 +0200
commit562b38f66da0dbe67f8cff9c02165ca89434d171 (patch)
tree691ab5b0dafbd1e90fc75a839f6a1e1a52929519
parent2f20884b7899d2c044646273f226cb9071408e54 (diff)
downloadpdf-over-562b38f66da0dbe67f8cff9c02165ca89434d171.tar.gz
pdf-over-562b38f66da0dbe67f8cff9c02165ca89434d171.tar.bz2
pdf-over-562b38f66da0dbe67f8cff9c02165ca89434d171.zip
button implemented where the user can request tan sms during loading spinner wait
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java47
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties30
2 files changed, 63 insertions, 14 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
index 039ddc41..80bfe46c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
@@ -15,14 +15,18 @@
*/
package at.asit.pdfover.gui.composites;
+
// Imports
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Button;
import at.asit.pdfover.gui.utils.Messages;
import at.asit.pdfover.gui.workflow.states.State;
@@ -32,6 +36,37 @@ import at.asit.pdfover.gui.workflow.states.State;
*/
public class WaitingForAppComposite extends StateComposite {
private Label lbl_description;
+ private Button btnRequestSms;
+ private boolean userSms;
+
+ /**
+ *
+ */
+ private final class SMSSelectionListener extends SelectionAdapter {
+ /**
+ * Empty constructor
+ */
+ public SMSSelectionListener() {
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if(!WaitingForAppComposite.this.btnRequestSms.getEnabled()) {
+ return;
+ }
+
+ WaitingForAppComposite.this.setUserSMS(true);
+ WaitingForAppComposite.this.btnRequestSms.setEnabled(false);
+ }
+ }
+
+ public void setUserSMS(boolean bool ) {
+ this.userSms = bool;
+ }
+
+ public boolean getUserSMS() {
+ return this.userSms;
+ }
/**
* Create the composite.
@@ -59,6 +94,17 @@ public class WaitingForAppComposite extends StateComposite {
fd_progressBar.left = new FormAttachment(50, -100);
fd_progressBar.right = new FormAttachment(50, +100);
progressBar.setLayoutData(fd_progressBar);
+
+
+ this.btnRequestSms = new Button(this, SWT.NONE);
+ FormData fd_btnRequestSms = new FormData();
+ fd_btnRequestSms.top = new FormAttachment(progressBar, 23);
+ fd_btnRequestSms.right = new FormAttachment(100, -123);
+ this.btnRequestSms.setLayoutData(fd_btnRequestSms);
+ this.btnRequestSms.setText(Messages.getString("WaitingForAppComposite.btnRequestSms.text")); //$NON-NLS-1$
+ this.btnRequestSms.addSelectionListener(new SMSSelectionListener());
+ reloadResources();
+
}
@Override
@@ -80,5 +126,6 @@ public class WaitingForAppComposite extends StateComposite {
@Override
public void reloadResources() {
this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //$NON-NLS-1$
+ this.btnRequestSms.setText(Messages.getString("tanEnter.SMS")); //$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 81e85c8a..bbab39e6 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
@@ -1,11 +1,13 @@
#Eclipse messages class
-#Fri Jun 26 16:29:30 CEST 2015
+#Wed Jul 31 17:09:42 CEST 2019
BKU.KS=Keystore
BKU.LOCAL=Local CCE
BKU.MOBILE=Mobile CCE
BKU.NONE=no default
BKUSelectionComposite.btnMobile.text=MOBILE
TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection
+WaitingForAppComposite.btnRequestSms.text=Request SMS
+WaitingForAppComposite.lblNewLabel.text=New Label
advanced_config.AutoPosition=Automatic positioning
advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature
advanced_config.BKUSelection_Title=CC&E Selection
@@ -91,8 +93,8 @@ common.Cancel=C&ancel
common.GIFExtension_Description=GIF files
common.ImageExtension_Description=All supported image files
common.JPGExtension_Description=JPG files
-common.KeystoreExtension_Description=Keystore files
common.KSExtension_Description=Java keystore files
+common.KeystoreExtension_Description=Keystore files
common.Ok=O&K
common.PDFExtension_Description=PDF documents
common.PKCS12Extension_Description=PKCS12 keystore files
@@ -103,15 +105,16 @@ common.info=Information
common.open=Open
common.warning=Warning
config.About=A&bout %s
-config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at <a>http://demo.a-sit.at/lizenzbedingungen/</a>.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software.
+config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at <a>http\://demo.a-sit.at/lizenzbedingungen/</a>.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software.
config.Advanced=Ad&vanced
config.Keystore=&Keystore
config.Simple=Basi&c
dataSourceSelection.DropLabel=Drag document here
dataSourceSelection.DropLabel2=or...
dataSourceSelection.browse=&Browse for PDF on your computer
-dataSourceSelection.usePlaceholderTitle=Info
dataSourceSelection.usePlaceholderText=A marker has been found where the creator of the document wants you to put your signature. Do you want to use it?
+dataSourceSelection.usePlaceholderTitle=Info
+error.ATrustConnection=Connection to A-Trust could not be established
error.CmdLineArgs=Error parsing the command-line arguments\:
error.Details=Details
error.EnteredReferenceValue=You entered the reference value\!
@@ -149,28 +152,27 @@ error.TanTooLong=Entered TAN too long
error.Title=Error
error.TitleFatal=Fatal Error
error.Unexpected=Unexpected Error
-error.ATrustConnection=Connection to A-Trust could not be established
exception.InvalidEmblemFile=%s is an invalid signature logo file\!
exception.InvalidPort=%s is invalid\: has to be a number between %d and %d
exception.PasswordTooLong=Given password is too long\!
exception.PasswordTooShort=Given password is too short\!
exception.PathNotDirectory=Path %s does not denote a directory\!
exception.PathNotExist=Path %s does not exist\!
-keystore.KeystoreStorePassEntry=Please enter keystore password:
-keystore.KeystoreKeyPassEntry=Please enter key password:
-keystore_config.Keystore_Title=Keystore
+keystore.KeystoreKeyPassEntry=Please enter key password\:
+keystore.KeystoreStorePassEntry=Please enter keystore password\:
keystore_config.KeystoreAlias=Key alias
keystore_config.KeystoreFile=Keystore file
-keystore_config.KeystoreFile_ToolTip=Path to the keystore file
keystore_config.KeystoreFile.Dialog=Choose the keystore
keystore_config.KeystoreFile.Dialog_Title=Keystore selection
+keystore_config.KeystoreFile_ToolTip=Path to the keystore file
keystore_config.KeystoreKeyPass=Key password
-keystore_config.KeystoreKeyPass_ToolTip=Warning: The password is stored in plain text. Leave empty to get prompted for password during signing.
+keystore_config.KeystoreKeyPass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing.
keystore_config.KeystoreStorePass=Keystore password
-keystore_config.KeystoreStorePass_ToolTip=Warning: The password is stored in plain text. Leave empty to get prompted for password during signing.
+keystore_config.KeystoreStorePass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing.
keystore_config.KeystoreType=Keystore type
keystore_config.KeystoreType_JKS=Java keystore
keystore_config.KeystoreType_PKCS12=PKCS12
+keystore_config.Keystore_Title=Keystore
keystore_config.Load=Load keystore
keystore_config.Load_ToolTip=Load keystore to show available key aliases
main.about=About %s
@@ -206,7 +208,7 @@ simple_config.ExampleNumber=+43676123456789
simple_config.ExampleNumber_ToolTip=To use a default mobile phone number enter it here
simple_config.MobileBKU_Title=&Mobile signature
simple_config.Note=Text\:
-simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art. 25 para. 2 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature.
+simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art.\u00A025 para.\u00A02 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature.
simple_config.Note_Default_Old=This document is signed with a qualified electronic signature. According to \u00A7\u00A04 art.\u00A01 of the Signature Act it in principle is legally equivalent to a handwritten signature.
simple_config.Note_SetDefault=Restore default
simple_config.Note_Title=Signature &Note
@@ -214,8 +216,8 @@ simple_config.Note_Tooltip=Add an optional note to display on your Signature
simple_config.PhoneNumber=Mobile number\:
simple_config.SigBlockLang_Title=Signature block lan&guage\:
simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document
-tanEnter.QR=QR code\:
tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature.
+tanEnter.QR=QR code\:
tanEnter.ReferenceValue=Reference value\:
tanEnter.SMS=Request &SMS
tanEnter.TAN=TAN\:
@@ -224,4 +226,4 @@ tanEnter.try=Only 1 try left\!
version_check.UpdateText=Version %s is available.\nOpen download page now?
version_check.UpdateTitle=New version available\!
waiting.message=Signature creation in progress...
-waiting_for_app.message=Please open Signature-App!
+waiting_for_app.message=Please open Signature-App\!