Author: dbs
Date: Sun Oct 4 14:41:19 2009
New Revision: 4564
Log:
When creating a new registrant via the public interface, make sure there's a
history record logged. This is a fix for Trac bug #54
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
Modified: congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
==============================================================================
--- congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
[iso-8859-1] Sun Oct 4 14:41:19 2009
@@ -326,6 +326,11 @@
sessionData.put("webuser", r);
+ // Make a CREATE record for this entry
+ History loginRecord = historyDAO.create(r.rid,cid,"CREATE",0);
+ loginRecord.comment = "Created via public page";
+ historyDAO.save(loginRecord);
+
logger.debug("Create completed - returning Success");
return SUCCESS;
}
Author: dbs
Date: Sun Nov 22 12:25:21 2009
New Revision: 4599
Log:
Fix for bug #82 - "send to all doesn't". When processng an invoice with
multiple entries, selecting 'send email notification to all' wasn't actually
sending. Fixed.
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
Modified: congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
==============================================================================
--- congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
[iso-8859-1] Sun Nov 22 12:25:21 2009
@@ -16,6 +16,7 @@
import com.stonekeep.congo.data.Convention;
import com.stonekeep.congo.data.Email;
import com.stonekeep.congo.data.Invoice;
+import com.stonekeep.congo.data.InvoiceDetail;
import com.stonekeep.congo.data.Registrant;
import com.stonekeep.congo.payments.InvoiceUtilities;
import com.stonekeep.congo.util.SMTP;
@@ -139,6 +140,29 @@
sm.sendMail();
// smtp.sendAnyMail(e.address, "You've been registered!");
}
+
+ if (sendto.equals("everyone")) {
+ // Need to iterate over the invoice detail line items, get the email
address, and
+ // fire off the mail
+ Email e = null;
+ Registrant r=null;
+ SendMail sm = new SendMail(smtp,registrantDAO,historyDAO,emailDAO);
+ Convention c = (Convention)sessionData.get("conference");
+ for (InvoiceDetail id : i.detailList) {
+ e = emailDAO.getEmail(id.rid);
+ // If there's no email for a user, 'e' can come back null. Allow for
that.
+ if (e != null) {
+ r = registrantDAO.getByID(id.rid);
+ logger.info("Sending mail to " + e.address);
+ sm.c = c;
+ sm.r=r;
+ sm.target=e.address;
+ sm.sendMail();
+ } else {
+ logger.warn("No email address for registrant " + id.rid + ".
Skipping.");
+ }
+ }
+ }
}
// Assuming processing is done, remove the current invoice from the session
sessionData.remove("workinginvoice");
Author: dbs
Date: Sat Nov 21 22:04:13 2009
New Revision: 4598
Log:
Fixed a problem where the checkbox for send mail to registrants on invoice
processing would not save whatever you checked.
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
congo/v2/trunk/src/main/webapp/WEB-INF/jsp/coconut/InvoiceReviewForm.jsp
Modified: congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
==============================================================================
--- congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/java/com/stonekeep/congo/coconut/Invoices.java
[iso-8859-1] Sat Nov 21 22:04:13 2009
@@ -119,6 +119,9 @@
// First, store away whatever they specified into the session.
logger.debug("Storing away 'sendto' value as " + sendto);
sessionData.put("sendto",sendto);
+ if (sendto.equals("none")) {
+ logger.info("Mail set to 'none'. Not sending any notifications.");
+ }
// Now send off the mail...
// This is a bit hacky - it's using the SendMail class I created for
// mailing in the public interface - but it does process the templates
Modified:
congo/v2/trunk/src/main/webapp/WEB-INF/jsp/coconut/InvoiceReviewForm.jsp
==============================================================================
--- congo/v2/trunk/src/main/webapp/WEB-INF/jsp/coconut/InvoiceReviewForm.jsp
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/webapp/WEB-INF/jsp/coconut/InvoiceReviewForm.jsp
[iso-8859-1] Sat Nov 21 22:04:13 2009
@@ -27,9 +27,9 @@
<div style="float: right; width: 150px;">
<b>Notifications</b><hr>
Send email to:<br>
- <input type="radio" name="sendto" value="none" ${session.sendto ==
'none' ? 'checked="checked"' : ''}>None<br>
- <input type="radio" name="sendto" value="registrant" ${session.sendto ==
'registrant' ? 'selected' : ''}>This registrant<br>
- <input type="radio" name="sendto" value="everyone" ${session.sendto ==
'everyone' ? 'selected' : ''}>Everyone on this invoice<br>
+ <input type="radio" name="sendto" value="none" ${session.sendto ==
'none' ? 'checked' : ''}>None<br>
+ <input type="radio" name="sendto" value="registrant" ${session.sendto ==
'registrant' ? 'checked' : ''}>This registrant<br>
+ <input type="radio" name="sendto" value="everyone" ${session.sendto ==
'everyone' ? 'checked' : ''}>Everyone on this invoice<br>
</div>
<table cellspacing=3>
Author: dbs
Date: Wed Nov 11 17:30:25 2009
New Revision: 4588
Log:
Fixed a minor problem in the public interface that wouldn't let you see the
processed invoice screen.
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
Modified: congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
==============================================================================
--- congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
[iso-8859-1] Wed Nov 11 17:30:25 2009
@@ -366,6 +366,7 @@
i.creator= r.rid;
i.comment = "Online registration";
i.status = "READY";
+ i.operator = r.rid;
logger.debug("Created new invoice " + i.id);
invoiceDAO.saveInvoice(i);
}
Author: dbs
Date: Wed Nov 11 17:13:39 2009
New Revision: 4587
Log:
Removed some unused code.
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
Modified: congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
==============================================================================
--- congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/java/com/stonekeep/congo/web/WebActions.java
[iso-8859-1] Wed Nov 11 17:13:39 2009
@@ -113,50 +113,6 @@
public void setPaypalenabled(boolean newvalue) { this.paypalenabled =
newvalue; }
public void setAuthorizenetenabled(boolean newvalue) {
this.authorizenetenabled = newvalue; }
- public class MyComparator implements Comparator<String> {
- public MyComparator(Map<String,RegistrationType> types) {
- this.types.putAll(types);
- }
-
- private final Map<String,RegistrationType> types = new
HashMap<String,RegistrationType>();
- public int compare(String o1, String o2) {
- RegistrationType r1 = types.get(o1);
- RegistrationType r2 = types.get(o2);
-
- int v1 = r1.getregSequence();
- int v2 = r2.getregSequence();
-
- //sort on key as well if the value is different - and yeah, i know this is
- // probably an idiotic way to do this. but whatevuh.
-
- if(v1 == v2) {
- return 0;
- } else if (v1 < v2) {
- return -1;
- } else {
- return 1;
- }
- }
- };
-
- public class MyComparator2 implements Comparator<RegistrationType> {
- public int compare(RegistrationType t1, RegistrationType t2) {
- int v1 = t1.getregSequence();
- int v2 = t2.getregSequence();
-
- //sort on key as well if the value is different - and yeah, i know this is
- // probably an idiotic way to do this. but whatevuh.
-
- if(v1 == v2) {
- return 0;
- } else if (v1 < v2) {
- return -1;
- } else {
- return 1;
- }
- }
- }
-
public WebActions(ConventionDAO conventionDAO,
RegistrantDAO registrantDAO,
RegistrationTypeDAO registrationTypeDAO,
@@ -363,21 +319,6 @@
return "exit";
}
if (homeregisterbutton != null) {
- logger.debug("Loading registration types...");
-// Map<String,RegistrationType> tmpTypes = new
TreeMap(registrationTypeDAO.list(cid));
-// logger.debug("Loaded " + tmpTypes.size() + " before sorting.");
-//
-// // Sort the regtypes by their sequence number...
-// MyComparator comparator = new MyComparator(tmpTypes) ;
-// regTypes = new TreeMap<String, RegistrationType>(comparator);
-// //regTypes.putAll(tmpTypes);
-//
-// MyComparator2 comparator = new MyComparator2() ;
-// regTypes = new TreeMap<String,RegistrationType>(comparator);
-// regTypes.putAll(tmpTypes);
-//
-// logger.debug("After sorting, the final array is " + regTypes.size());
-
regTypes = new TreeMap(registrationTypeDAO.list(cid));
logger.debug("Loading available properties for this event...");
Author: dbs
Date: Tue Nov 10 17:24:50 2009
New Revision: 4584
Log:
Removed the authorized user list from the server properties
Modified:
congo/v2/trunk/src/main/resources/com/stonekeep/congo/config/schema/xml/schema.x\
ml
Modified:
congo/v2/trunk/src/main/resources/com/stonekeep/congo/config/schema/xml/schema.x\
ml
==============================================================================
---
congo/v2/trunk/src/main/resources/com/stonekeep/congo/config/schema/xml/schema.x\
ml [iso-8859-1] (original)
+++
congo/v2/trunk/src/main/resources/com/stonekeep/congo/config/schema/xml/schema.x\
ml [iso-8859-1] Tue Nov 10 17:24:50 2009
@@ -65,9 +65,6 @@
<category name="Login Options">
<entry key="preferredcid" name="Default Conference" type="text"
default="1000">
<description>Conference used in the public pages</description>
- </entry>
- <entry key="operators" name="Operator list" type="text" default="1000">
- <description>A list of users that may log into Coconut, separated by
spaces</description>
</entry>
</category>
Author: dbs
Date: Tue Nov 10 15:50:24 2009
New Revision: 4582
Log:
Fix for ticket # 56 - sort by last name when searching - this is a regression
triggered by the last refactoring. Fixed.
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/dao/RegistrantDAO.java
Modified:
congo/v2/trunk/src/main/java/com/stonekeep/congo/dao/RegistrantDAO.java
==============================================================================
--- congo/v2/trunk/src/main/java/com/stonekeep/congo/dao/RegistrantDAO.java
[iso-8859-1] (original)
+++ congo/v2/trunk/src/main/java/com/stonekeep/congo/dao/RegistrantDAO.java
[iso-8859-1] Tue Nov 10 15:50:24 2009
@@ -299,7 +299,7 @@
+ "((master_firstname LIKE ?) OR "
+ "(master_lastname LIKE ?) OR "
+ "(master_badgename LIKE ?) OR "
- + "(master_company LIKE ?)) LIMIT 200";
+ + "(master_company LIKE ?)) ORDER BY master_lastname LIMIT 200";
Registrant r = null;
PreparedStatement p;