From 34a4d3685a63de3bd9198c9426610652dc2a53ce Mon Sep 17 00:00:00 2001 From: Juergen Steinhilber Date: Wed, 7 Oct 2015 12:47:58 +0000 Subject: [PATCH] *** empty log message *** --- Reha/src/dialoge/EmailDialog.java | 24 +++++++++++++++++++--- Reha/src/hauptFenster/Reha.java | 2 +- .../therapi/reha/patient/PatientToolBarLogic.java | 23 +++++++-------------- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/Reha/src/dialoge/EmailDialog.java b/Reha/src/dialoge/EmailDialog.java index cf9c8189..c85cf465 100644 --- a/Reha/src/dialoge/EmailDialog.java +++ b/Reha/src/dialoge/EmailDialog.java @@ -37,6 +37,7 @@ import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JToolBar; +import javax.swing.SwingUtilities; import javax.swing.WindowConstants; import javax.swing.table.DefaultTableModel; @@ -178,7 +179,24 @@ public class EmailDialog extends JXDialog implements WindowListener, KeyListen public void senden(){ Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor); this.setCursor(Reha.thisClass.wartenCursor); - + if(tf[0].getText().trim().equals("")){ + JOptionPane.showMessageDialog(null,"Keine Empfängeradresse angegeben"); + SwingUtilities.invokeLater(new Runnable(){ + public void run(){ + tf[0].requestFocus(); + } + }); + return; + } + if(tf[1].getText().trim().equals("")){ + JOptionPane.showMessageDialog(null,"Keine Betreff angegeben"); + SwingUtilities.invokeLater(new Runnable(){ + public void run(){ + tf[1].requestFocus(); + } + }); + return; + } HashMap hmPostfach = null; if(postfach==0){ hmPostfach = (HashMap) SystemConfig.hmEmailExtern.clone(); @@ -188,13 +206,13 @@ public class EmailDialog extends JXDialog implements WindowListener, KeyListen String emailaddy = ""; String smtphost = hmPostfach.get("SmtpHost"); String authent = hmPostfach.get("SmtpAuth"); - String benutzer = SystemConfig.hmEmailExtern.get("Username") ; + String benutzer = hmPostfach.get("Username") ; String pass1 = hmPostfach.get("Password"); String sender = hmPostfach.get("SenderAdresse"); String secure = hmPostfach.get("SmtpSecure"); String useport = hmPostfach.get("SmtpPort"); //String recipient = "m.schuchmann@rta.de"+","+SystemConfig.hmEmailExtern.get("SenderAdresse"); - String recipient = emailaddy+((Boolean) SystemConfig.hmIcalSettings.get("aufeigeneemail") ? ","+SystemConfig.hmEmailExtern.get("SenderAdresse") : ""); + String recipient = emailaddy+((Boolean) SystemConfig.hmIcalSettings.get("aufeigeneemail") ? ","+hmPostfach.get("SenderAdresse") : ""); //String text = "Ihre Behandlungstermine befinden sich im Dateianhang"; boolean authx = (authent.equals("0") ? false : true); boolean bestaetigen = false; diff --git a/Reha/src/hauptFenster/Reha.java b/Reha/src/hauptFenster/Reha.java index b1bc5501..1c287ba4 100644 --- a/Reha/src/hauptFenster/Reha.java +++ b/Reha/src/hauptFenster/Reha.java @@ -314,7 +314,7 @@ public class Reha implements FocusListener,ComponentListener,ContainerListener,M public static boolean demoversion = false; public static boolean vollbetrieb = true; - public static String aktuelleVersion = "2015-10-01-DB="; + public static String aktuelleVersion = "2015-10-07-DB="; public static Vector> timerVec = new Vector>(); public static Timer fangoTimer = null; diff --git a/Reha/src/org/therapi/reha/patient/PatientToolBarLogic.java b/Reha/src/org/therapi/reha/patient/PatientToolBarLogic.java index 4eb64879..049929bf 100644 --- a/Reha/src/org/therapi/reha/patient/PatientToolBarLogic.java +++ b/Reha/src/org/therapi/reha/patient/PatientToolBarLogic.java @@ -264,27 +264,18 @@ public class PatientToolBarLogic { //nur wenn einen Mobilfunknummer eingetragen ist if(patientHauptPanel.patDaten.size() > 0){ Point pt = patientHauptPanel.jbut[4].getLocationOnScreen(); - String stitel = ("SMS für Patient erstellen"); - + String stitel = (""); + String mailtext = SystemConfig.hmAdrPDaten.get("")+ + ",\n"; final EmailDialog emlDlg = - new EmailDialog(Reha.thisFrame,stitel,"Reha-ICS","Betreff","Emailtext",new ArrayList(),0,false); + new EmailDialog(Reha.thisFrame,stitel,Reha.thisClass.patpanel.patDaten.get(50),"",mailtext,new ArrayList(), + (Integer)SystemConfig.hmIcalSettings.get("postfach"),false); emlDlg.setPreferredSize(new Dimension(575,370)); emlDlg.setLocation(pt.x-350,pt.y+100); emlDlg.pack(); - SwingUtilities.invokeLater(new Runnable(){ - public void run(){ - //emlDlg.setTextCursor(0); - } - }); - emlDlg.setVisible(true); - SwingUtilities.invokeLater(new Runnable(){ - public void run(){ - //emlDlg.setTextCursor(0); - } - }); }else{ - JOptionPane.showMessageDialog(null,"Keine Mobilfunknummer im Patientenstamm hinterlegt"); + JOptionPane.showMessageDialog(null,"Kein Patient ausgewählt"); } @@ -329,6 +320,7 @@ public class PatientToolBarLogic { if(!Rechte.hatRecht(Rechte.Patient_email, true)){ return; } + doEmail(); break; case 2: if(!Rechte.hatRecht(Rechte.Patient_sms, true)){ @@ -344,7 +336,6 @@ public class PatientToolBarLogic { } break; case 4: - //doEmail(); new iCalRehaExporter(); break; -- 2.11.4.GIT