Aug 6 - Update enrollment page, correct confirmation email

This commit is contained in:
2026-08-06 12:24:08 -04:00
parent 548e262b2a
commit 264eeabd70
4 changed files with 16 additions and 6 deletions
+2 -1
View File
@@ -17,7 +17,8 @@
"Bash(python -c \"import ast,io; ast.parse\\(io.open\\('app/routes/dashboard.py',encoding='utf-8'\\).read\\(\\)\\); print\\('dashboard route OK'\\)\")", "Bash(python -c \"import ast,io; ast.parse\\(io.open\\('app/routes/dashboard.py',encoding='utf-8'\\).read\\(\\)\\); print\\('dashboard route OK'\\)\")",
"Bash(python -c ' *)", "Bash(python -c ' *)",
"Bash(git diff *)", "Bash(git diff *)",
"Bash(python -c \"import ast;ast.parse\\(open\\('app/enrollment/routes.py',encoding='utf-8'\\).read\\(\\)\\);print\\('parses OK'\\)\")" "Bash(python -c \"import ast;ast.parse\\(open\\('app/enrollment/routes.py',encoding='utf-8'\\).read\\(\\)\\);print\\('parses OK'\\)\")",
"Bash(python -c \"import ast;[ast.parse\\(open\\(f,encoding='utf-8'\\).read\\(\\)\\) for f in ['app/enrollment/mailer.py','app/enrollment/schema.py']];print\\('parses OK'\\)\")"
] ]
} }
} }
+4 -4
View File
@@ -24,7 +24,7 @@ from flask import current_app, render_template
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
def _text_body(record, people): def _text_body(record, people, corrections_email):
"""Plain-text alternative — some recipients see only this.""" """Plain-text alternative — some recipients see only this."""
lines = [ lines = [
f'Hi {record.get("request_by") or "there"},', f'Hi {record.get("request_by") or "there"},',
@@ -45,8 +45,8 @@ def _text_body(record, people):
'Our team will create these accounts. Each person will receive their own ' 'Our team will create these accounts. Each person will receive their own '
'email invitation with sign-in instructions.', 'email invitation with sign-in instructions.',
'', '',
'If anything above is wrong, simply reply to this email and we will ' f'If anything above is wrong, simply send an email to '
'correct it.', f'{corrections_email}, and we will correct it.',
'', '',
'JQC by L.T Services, Inc', 'JQC by L.T Services, Inc',
] ]
@@ -78,7 +78,7 @@ def send_confirmation(record, base_url=None):
subject = f'[JQC] Enrollment received — {record.get("project_name")}', subject = f'[JQC] Enrollment received — {record.get("project_name")}',
sender = branded_sender(effective_base), sender = branded_sender(effective_base),
recipients = [email], recipients = [email],
body = _text_body(record, people), body = _text_body(record, people, schema.CORRECTIONS_EMAIL),
html = render_template('enrollment/email_confirmation.html', html = render_template('enrollment/email_confirmation.html',
record=record, people=people, record=record, people=people,
schema=schema), schema=schema),
+7
View File
@@ -120,6 +120,13 @@ def recommendation_map():
return {role: recommendation_for(role) for role in ROLE_KEYS} return {role: recommendation_for(role) for role in ROLE_KEYS}
#: Where a customer should write if their submission needs correcting. The
#: confirmation email is sent FROM the unmonitored no-reply identity
#: (branded_sender), so "reply to this email" would go nowhere — point them
#: here instead. Used by both the text and HTML bodies of the confirmation.
CORRECTIONS_EMAIL = 'da.nguyen8744@gmail.com'
NOTES = [ NOTES = [
'Each user will receive instructions on how to sign up and install the app ' 'Each user will receive instructions on how to sign up and install the app '
'on their smart device.', 'on their smart device.',
@@ -64,7 +64,9 @@
Each person will receive their own email invitation with sign-in Each person will receive their own email invitation with sign-in
instructions, along with a quick guide to the web portal and the mobile app. instructions, along with a quick guide to the web portal and the mobile app.
</p> </p>
<p>If anything above is wrong, simply reply to this email and we will correct it.</p> <p>If anything above is wrong, simply send an email to
<a href="mailto:{{ schema.CORRECTIONS_EMAIL }}">{{ schema.CORRECTIONS_EMAIL }}</a>,
and we will correct it.</p>
<hr style="border:none;border-top:1px solid #e5e7eb;margin:26px 0 12px;"> <hr style="border:none;border-top:1px solid #e5e7eb;margin:26px 0 12px;">
<p style="color:#9ca3af;font-size:.8rem;margin:0;"> <p style="color:#9ca3af;font-size:.8rem;margin:0;">