Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update form confirmation email and show requested tour info #480

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions apps/tup-cms/src/apps/portal/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,26 @@ def submit_ticket(form_data):


def send_confirmation_email(form_name, form_data):

tour_receipt = ""
if form_name == "Tour Request Form":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Musing. I thought, "Should we use a different, less volatile, identifier". But form ID is less intuitive, and name is unlikely to change. It might even be more likely that the form is accidentally deleted and recreated… Coupling this logic to form name means such a problem case could be fixed by admin.

tour_receipt = "<p>A copy of your tour request is provided below for your records:</p>\n"
for key in form_data:
tour_receipt += f"<p>{key}: {form_data[key]}</p>\n"

email_body = f"""
<p>Greetings,</p>
<p>
Thank you for reaching out to TACC and completing the {form_name}.
</p>
<p>
<ul>
<li>For training registration requests, you will be contacted within one week to confirm registration. For additional help please contact Lauren Bruce (lbruce@tacc.utexas.edu).</li>
<li>For information about training opportunities, please visit the <a href="https://tacc.utexas.edu/use-tacc/training/">Training page</a>, or contact Tabish Khan (tkhan@tacc.utexas.edu).</li>
<li>For tour requests, a tour coordinator will contact you within two business days to complete your reservation. For additional assistance please reach out to [email protected].</li>
<li>For all other issues, a TACC support person will be in contact shortly. For additional assistance please reach out to [email protected].</li>
<li>For additional assistance please reach out to [email protected].</li>
</ul>
</p>
{tour_receipt}
<p>
Thank you for your time,<br>
TACC Support
Expand Down
Loading