Last modified by SuperUwe Trueggelmann on 2025-05-26

From version 1.39
edited by SuperUwe Trueggelmann
on 2022-10-13
Change comment: There is no comment for this version
To version 8.4
edited by SuperUwe Trueggelmann
on 2025-05-26
Change comment: There is no comment for this version

Summary

Details

Page properties
Parent
... ... @@ -1,1 +1,1 @@
1 -StartPage.WebHome
1 +Main.WebHome
Content
... ... @@ -3,7 +3,7 @@
3 3  import groovy.sql.Sql
4 4  
5 5   String strDBTable = "\"regUser\".\"newUser\""
6 - def sqlConnection = new Sql(services.cmpConnectRegDB.connectRegDB())
6 + def sqlConnection = new Sql(services.cmpConnectDB.connectRegDB())
7 7  
8 8   String strCurRecCol = "firstname"
9 9   int intRecCount=0
... ... @@ -52,7 +52,7 @@
52 52   strFirstname = services.cleanStr.alphanum(request.firstname)
53 53   strLastname = services.cleanStr.alphanum(request.lastname)
54 54   strPrefname = services.cleanStr.alphanum(request.prefname)
55 - strRole = services.cleanStr.alphanum(request.role)
55 + strRole = services.cleanStr.alphanum(request.role) ?:""
56 56   strLphone = services.cleanStr.numphone(request.lphone)
57 57   strMphone = services.cleanStr.numphone(request.mphone)
58 58   strEmail = services.cleanStr.alphanum(request.email)
... ... @@ -139,22 +139,14 @@
139 139   }
140 140   strEmailBody = "Dear " + strPrefname + ","
141 141   strEmailBody = strEmailBody + "\r\n" + "\r\n" + "A request was made to register you to the CEC website (https://cecocert.com) with the following information:" + "\r\n" + "\r\n"
142 - strEmailBody = strEmailBody + "Registered name:\r\n"
143 - strEmailBody = strEmailBody + "Name: " + strTitle + " " + strFirstname + " " + strLastname + "\r\n"
144 - strEmailBody = strEmailBody + "Registered Business Address:\r\n"
145 - strEmailBody = strEmailBody + "Registered Business Name: " + strCompanyName + "\r\n"
146 - strEmailBody = strEmailBody + "Registered Business Address: " + strCompanyAddress + "\r\n"
147 - strEmailBody = strEmailBody + "Registered Business City: " + strCompanyAddress + "\r\n"
148 - strEmailBody = strEmailBody + "Registered Business Postal Code: " + strCompanyAddress + "\r\n"
149 - strEmailBody = strEmailBody + "Registered Business Province/State: " + strCompanyAddress + "\r\n"
150 - strEmailBody = strEmailBody + "Registered Business Country: " + strCompanyAddress + "\r\n"
151 - strEmailBody = strEmailBody + "Contact info:"
152 - strEmailBody = strEmailBody + "Role: " + strRole + "\r\n"
142 + strEmailBody = strEmailBody + "Registered Business: " + strCompanyName + ", " + strCompanyAddress + ", " + strCompanyCity + ", " + strCompanyPostcode + ", " + strCompanyProvince + ", " + strCompanyCountry + "\r\n" + "\r\n"
143 + strEmailBody = strEmailBody + "Contact info: " + strTitle + " " + strFirstname + " " + strLastname + "\r\n"
144 + strEmailBody = strEmailBody + "Contact role: " + strRole + "\r\n"
153 153   strEmailBody = strEmailBody + "Landline phone: " + strLphone + "\r\n"
154 - strEmailBody = strEmailBody + "Mobile phone:" + strMphone + "\r\n" + "\r\n"
146 + strEmailBody = strEmailBody + "Mobile phone: " + strMphone + "\r\n" + "\r\n"
155 155   strEmailBody = strEmailBody + "The request was made from IP address: " + strCreateIP
156 156   strEmailBody = strEmailBody + "\r\n" + "\r\n" + "Please click the below link to confirm your e-mail address:" + "\r\n"
157 - strEmailBody = strEmailBody + "https://cecocert.com/bin/view/StartPage/X1100%20-%20Process%20e-mail%20confirmation/WebHome"
149 + strEmailBody = strEmailBody + "https://cecocert.com/xwiki/bin/view/StartPage/X1100%20-%20Process%20e-mail%20confirmation/WebHome"
158 158   strEmailBody = strEmailBody + "?em=" + strEmail + "&cc=" + strConfCode
159 159   strEmailBody = strEmailBody + "\r\n" + "\r\n" + "If you do not confirm your e-mail address within 24 hours, the information you entered will be deleted!"
160 160  
... ... @@ -325,9 +325,9 @@
325 325   </td>
326 326   </tr>
327 327   <tr>
328 - <td align="left" class="style1">Preferred name to address you:</td>
320 + <td align="left" class="style1">Preferred name to address you:<br>Examples: Peter, Mr. Parker, Fujikawa-san</td>
329 329   <td class="style1">
330 - <input type="text" id="prefname" name="prefname" placeholder="Enter the name you want to be addressed by" size="50">
322 + <input type="text" id="prefname" name="prefname" placeholder="Enter the name you want to be addressed by, for example in e-mails and letters" size="70">
331 331   </td>
332 332   </tr>
333 333   <tr>
... ... @@ -695,12 +695,15 @@
695 695  
696 696   #end
697 697   #if( $xcontext.strFormStatus == "SendEmail" )
690 + ## Preparing message
698 698   #set($email_to = "${xcontext.strEmail}")
699 699   #set($email_subject = "CEC Registration - confirmation required to proceed")
700 700   #set($email_from = "cec_noreply@cecocert.com")
701 701   #set($email_text = "$xcontext.strEmailBody")
695 + ## Creating mesage
702 702   #set ($message = $services.mail.sender.createMessage($email_from, $email_to, $email_subject))
703 703   #set ($discard = $message.addPart("text/plain", ${xcontext.strEmailBody}))
698 + ## Sending message
704 704   #set ($mailResult = $services.mail.sender.send($message))
705 705   ## Check if the message was created properly and if we have permissions to send emails
706 706   #if ($services.mail.sender.lastError)
... ... @@ -709,15 +709,34 @@
709 709   ## Check if the mail we tried to send has failed to be sent
710 710   #set ($statuses = $mailResult.statusResult.getAllErrors())
711 711   #if ($statuses.hasNext())
707 +
708 + {{warning}}
709 + Something has gone wrong! Please do not try again!
710 + {{/warning}}
711 +
712 712   #set ($status = $statuses.next())
713 + {{warning}}
714 + I am sorry, but there was a problem with sending you your confirmation e-mail!
715 + The data you entered has likely already been stored in our database, and will not need to be entered again.
716 + Hence, please do not try entering the information again but instead send an e-mail to contact@cecocert.com informing us about the problem.
717 + As the subject line, please enter "CEC Registration - e-mail problem".
718 + In the body of the e-mail, please simply provide your name and that of your company.
719 + If possible, please copy and paste the error message shown below in red into the e-mail, below your name and that of your company.
720 + We are sorry for the inconvenience!
721 + {{/warning}}
722 +
713 713   {{error}}
714 714   Error: $status.errorSummary ($status.state)
715 715   $status.errorDescription
716 - {{/error}}
726 + {{/error}}
727 +
728 + #else
729 + {{info}}
730 + An e-mail asking you to confirm your e-mail address was sent to ${xcontext.strEmail}.
731 + Please check your inbox and click on the link to confirm your e-mail address!
732 + The process will only continue after you have confirmed your e-mail address.
733 + {{/info}}
717 717   #end
718 - An e-mail asking you to confirm your e-mail address was sent to ${xcontext.strEmail}.
719 - Please check your inbox and click on the link to confirm your e-mail address!
720 - The process will only continue after you have confirmed your e-mail address.
721 721   #end
722 722  
723 723  {{/velocity}}