Commit Graph

171 Commits

Author SHA1 Message Date
Tim Abbott dfbe1e4914 notifications: Improve "why you were away" content lines.
We now include whether the message was a private or group private
message; this is particularly important with the new setting to
disable including any message content in these emails (since in that
case, one doesn't know anything about the message types).
2018-03-09 21:16:02 -08:00
YJDave c94b21e9ac settings: Add setting to disable message content in missed message emails.
Fixes #6938.
2018-03-09 21:16:02 -08:00
Vishnu Ks cbadecb466 emails: Replace signing in with logging in.
Fixes #7884
2018-03-09 13:31:36 -08:00
Aditya Bansal 6fce1d7834 template_parser: Add parsing support for self closing tags as per HTML5.
In this commit we add support for some tags which are also called
void-elements according to
http://w3c.github.io/html/syntax.html#void-elements to be parsed by
our template parser and get tagged as singleton_html_tags.

Fixes: #8387.
2018-02-15 17:47:43 -05:00
Rishi Gupta e62d9742aa emails: Fix notify_new_login emails have unserializable context.
Regression introduced in e0f30d0 (PR #7569).
2017-12-22 16:34:18 -05:00
Shreyansh Dwivedi 47fcb27e39 invitations: Remove custom_body.
Fixes #7672
2017-12-11 19:23:54 -08:00
Vishnu Ks 610eb557b8 backend: Make password reset form support multi realm membership. 2017-11-26 15:35:25 -08:00
Vishnu Ks 9c50819dd6 email: Add reset button to password reset email. 2017-11-20 10:35:03 -08:00
Umair Khan 95ba3e7cbb password_reset: Send email unconditionally.
This was basically rewritten by tabbott, because the code is a lot
cleaner after just rewriting the ZulipPasswordResetForm code to no
longer copy the model of the original Django version.

Fixes #4733.
2017-11-20 10:32:40 -08:00
Steve Howell ba51078418 Simplify CSS linter and clean up CSS.
The CSS linter was pretty hard to reason about.  It was
pretty flexible about certain things, but then it would
prevent seemingly innocuous code from getting checked in.

This commit overhauls the pretty-printer to be more composable,
where every object in the AST knows how to render itself.  It
also cleans up a little bit of the pre_fluff/post_fluff logic
in the parser itself, so comments are more likely to be "attached"
to the AST node that make sense.

The linter is actually a bit more finicky about newlines, but
this is mostly a good thing, as most of the variations before
this commit were pretty arbitrary.
2017-11-13 12:43:43 -08:00
Rishi Gupta e7ba4c5168 emails: Send first welcome email right away.
I think an hour after signup is not the right time to try to get someone to
re-engage with a product.

This also makes the day1 email clearly a transactional email both in
experiencing the product and in the eyes of various anti-spam laws, and
allows us to remove the unsubscribe link.
2017-10-19 00:04:07 -07:00
Rishi Gupta a08543f1ce server settings: Add setting for MAILING_ADDRESS.
The rules here are fuzzy, and it's quite possible none of Zulip's emails
need an address at all. Every country has its own rules though, which makes
it hard to tell. In general, transactional emails do not need an address,
and marketing emails do.
2017-10-19 00:04:07 -07:00
Brock Whittaker cd3518377a emails: Change "Server" and "Account" to render links.
This changes the "Server" and "Account" attributes in the info log
to render links so that they are guaranteed to have our styling
and behavior across all email clients.
2017-10-04 15:07:13 -07:00
Brock Whittaker e8b127916a emails: Override default button styling.
Some email services will provide default styling for things like
buttons, and in this case the site created a style that had a
`background` attribute that overrode our `background-color` attribute
because of CSS importance heirarchy. This swiches us to use
`background` as well.

This also forces no `text-shadow` on buttons.

Fixes: #6775.
2017-10-02 17:58:30 -07:00
Tim Abbott 28eaf5620e emails: Use common_context for email change notifications.
This also lets us remove `realm_uri`.
2017-09-27 16:48:18 -07:00
Vishnu Ks dfaa939af2 emails: Store the compiled emails in separate directory. 2017-09-27 16:48:18 -07:00
Vishnu Ks caaa90f22d emails: Extract CSS from email_base_default. 2017-09-27 16:48:18 -07:00
Vaida Plankyte 207e06d558 frontend: Add header & body illustrations to emails. 2017-09-27 16:32:43 -07:00
Vaida Plankyte 6222a487ec frontend: Add buttons to emails. 2017-09-27 16:16:43 -07:00
Vaida Plankyte 0993617214 frontend: Add new style to emails. 2017-09-27 16:16:43 -07:00
Vaida Plankyte cb7353a3b5 frontend: Remove inline color assignments in emails. 2017-09-27 16:16:43 -07:00
Harshit Bansal 4e8e7348da notifications: Fix the ugly inactive scrollbar in missed message emails.
Not sure why we have `overflow-y: scroll` in `messages` container in
missed messages email template when it is not a fixed width container
but anyway changing it to `overflow-y: auto` seems to be a safe change
as it will remove the ugly looking inactive scrollbar that was being
displayed there besides the `messages` container without changing the
functionality(if any).
2017-09-20 10:30:35 -07:00
Rishi Gupta c1997e759c password_reset: Change email to be appropriate for obtaining first password.
The situation if, for instance, the user signed up via google auth, and now
needs a password to get their API key.
2017-08-28 20:39:53 -07:00
Rishi Gupta d296f29fa7 emails: Link to organization getting started guide in followup_day1. 2017-08-22 14:26:17 -07:00
Rishi Gupta 4a74399514 emails: Update followup_day2 with better topic advice.
These topics also better match the new followup_day2 email illustrations.
2017-08-22 14:26:17 -07:00
Tim Abbott 3425d83f52 twitter: Update links to point to our new Twitter username. 2017-08-01 17:13:33 -07:00
James Rowan 21b5536353 emails: Update subject lines of emails. 2017-07-14 15:20:04 -07:00
James Rowan 59b5a2f862 emails: Rewrite the day 1 followup email. 2017-07-13 20:51:54 -07:00
Rishi Gupta f0ed556730 emails: Remove comments from tops of email templates.
The comments are not very helpful, in some cases incorrect, and make
skimming the template harder.
2017-07-13 19:17:53 -07:00
Rishi Gupta d8eaae278d emails: Update text of emails.
Partial update; likely more to be done.
2017-07-13 19:17:53 -07:00
James Rowan 71bc40d829 emails: Update subject for invitation emails. 2017-07-13 18:47:21 -07:00
James Rowan 88b8d98d34 emails: Update subject for missed message emails. 2017-07-13 18:47:17 -07:00
James Rowan 9bd1b0ba58 emails: Update subject for digest emails. 2017-07-13 18:47:02 -07:00
James Rowan dc9a41c543 emails: Add preheader content to missed message emails. 2017-07-06 15:46:03 -07:00
Rishi Gupta c827c7840d lint: Re-indent digest.html and missed_message.html. 2017-07-06 15:46:03 -07:00
James Rowan 0d76da27b4 emails: Add base template for missed message and digest emails.
Also removes the files from lint, so that the new indentation doesn't
obscure the change. The files are reindented in the next commit.
2017-07-06 15:46:03 -07:00
Rishi Gupta e04bf3273c emails: Rename email_base.html to email_base_default.html.
About to add another template for digest and missed message emails. Another
natural name would be email_base_transactional, but the followup_day{1,2}
emails aren't really transactional.
2017-07-06 15:46:03 -07:00
Vaida Plankyte 0d8720fe0c missed_message.txt: Use the singular 'they' pronoun. 2017-07-05 09:27:43 -07:00
Vaida Plankyte b68ba0a13e missed_message.html: Use the singular 'they' pronoun. 2017-07-05 11:34:45 +02:00
James Rowan 1ea9a23f95 emails: Fix two grammar nits. 2017-07-04 13:57:54 -07:00
James Rowan 19ffb84ac2 Make notification email for new login give browser and os.
notify_new_login.subject: include browser and os in subject line.
test_new_users: test for subject line to include browser/os.
2017-06-21 14:36:41 -04:00
Aditya Bansal 9cc3e8cf62 followup_day2.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 39a88019f8 followup_day1.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 9a0edad604 find_team.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal d4e827c618 email_base.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 9fc16888ca digest.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal fa28dcd008 invitation_reminder.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 07e7482228 confirm_registration.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 1b82e90331 invitation.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal e12bb65c0b confirm_new_email.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Ramesh a77aa79da9 emails: Add html versions of emails that do not have them.
Fixes #4691.
2017-06-12 23:02:28 -07:00
Rishi Gupta 9a02739008 emails: Remove invitation_mit. 2017-06-12 23:02:28 -07:00
Rishi Gupta 3332ebaf22 emails: Remove confirmation_registration_mit.
Not enough new Zephyr signups to justify the carrying cost :(.
2017-06-12 23:02:28 -07:00
Rishi Gupta 1d702d13a4 emails: Replace context variable zulip_support with support_email. 2017-06-10 01:35:03 -07:00
Rishi Gupta c3aa799192 emails: Remove verbose_support_offers conditional where unneccesary.
For almost all of these, the verbose support offer clause is almost the same
as the non-verbose version. The distinction carries extra carrying cost when
coming up with new copy, testing new email designs, etc.
2017-06-10 01:04:00 -07:00
Vaida Plankyte 114b080d01 emails: Add base template for html emails. 2017-06-09 23:34:24 -07:00
Rishi Gupta 9cba5573e6 emails: Remove Zulip logo and tagline from the top of emails.
We're about to add a new base html template that will provide formatting and
other embellishments, so this touch is no longer needed.
2017-06-09 23:34:24 -07:00
Rishi Gupta 7aa735294f emails: Remove unneeded safe tags from non-HTML email templates.
Reverts 7527ac9, and removes an additional |safe tag in
missed_messages.txt. These files are now rendered by a template engine
with autoescape=False.
2017-06-06 23:22:22 -07:00
Rishi Gupta 7527ac9a8c emails: Mark variables in non-HTML emails as HTML-safe.
Make sure 's, &s, and other characters are not HTML-escaped in subject
lines and plain-text emails.

Hack so that this isn't blocking the release of Zulip 1.6. A more robust way
to do this would be to have two different template Engines, one that renders
HTML, and one that doesn't.

Fixes #5088.
2017-06-03 16:04:06 -07:00
Umair Khan ad5780c03e lint: Mark alt argument for translation. 2017-05-26 15:28:46 -07:00
James Rowan 0facaa0797 Changes sender and subject lines for missed message emails.
Now, in the event of messages between two other members of a huddle,
the missed message emails are threaded in "Group PMs with name1 and
name2" and not in separate threads by sender.

Also, now the order of recipients in get_display_recipient consistent
with the order of names that appears in the list of personal messages
on the left sidebar.

Fixes most of #4553.
2017-05-12 13:29:43 -07:00
Rishi Gupta 0ce04556bf CSS: Change color of PMs from yellow to blue-grey. 2017-05-11 16:18:39 -07:00
Rishi Gupta 8321bd3f92 notifications: Refactor missed message queue to use send_email.
This commit also changes the sender from "Zulip <NOREPLY_EMAIL_ADDRESS>" to
NOREPLY_EMAIL_ADDRESS when it is not set explicitly.
2017-05-05 14:38:25 -07:00
Rishi Gupta 72ee5e5159 email: Make context for invitation_reminder template jsonable.
We are about to change send_future_email in a way that will require all
callers to use jsonable context.
2017-05-05 14:38:25 -07:00
Rishi Gupta 92dd76822f email: Move and rename password reset templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta c10d3114eb email: Move and rename followup_day* templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta 21a6377204 email: Move and rename find_team_email templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta ebfae36494 email: Move and rename digest_email templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta a1f0c1d6ac email: Move and rename new_login_alert templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta 26ac344b19 email: Move and rename invitation_reminder_email templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta 21a2c7b9d9 email: Remove translation tags from email templates.
The only thing being translated in any email was the title of the Zulip
header image in the html file, probably because not doing so breaks a linter
rule.

he name "Zulip" doesn't make sense to translate anyway.
2017-05-03 23:25:33 -07:00
Rishi Gupta 975d5bd8c0 email: Move and rename notify_change_in_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta 4e779c3e6f email: Move and rename mituser_invite_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta 713303deff email: Move and rename invite_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta ed0c310aa3 email: Move and rename preregistrationuser_confirmation_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta aa21012783 email: Move and rename mituser_confirmation_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta 235abe0b72 email: Move and rename emailchangestatus_confirmation_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta cafc60dd1d email: Move and rename missed_message_email templates.
All email templates are being moved to templates/zerver/emails.
2017-05-03 20:54:39 -07:00
Benjamin Gilbert a282cbb493 emails: Fix typo in spelling of "recognize". 2017-04-17 20:29:14 -07:00
Benjamin Gilbert 4775f55ca7 Fix spelling of "occurred" in various places. 2017-04-17 20:29:07 -07:00
hollywoodno 75d9630258 Add notifications on new logins to Zulip.
This adds helpful email notifications for users who just logged into a
Zulip server, as a security protection against accounts being hacked.

Text tweaked by tabbott.

Fixes #2182.
2017-03-25 16:50:52 -07:00
Tim Abbott 3b59e6c3cc subs: Rename /#subscriptions to /#streams.
Fixes #3653.
2017-03-08 16:57:58 -08:00
Tim Abbott 85fbdd6b2d emails: Remove old 'Keyboard Shortcuts' capitalization. 2017-02-10 15:18:41 -08:00
Rishi Gupta c2ca4cb1bb day2 email: Soften advice against using long topics.
In response to feedback that joining (and sending a first message to) a new
chat platform/org is already intimidating enough, and "Not Recommended" gets
the point across in a gentler way.
2017-01-12 15:04:51 -08:00
Rishi Gupta 0039689acb find team flow: Update text in emails and templates. 2017-01-06 10:42:28 -08:00
Rishi Gupta e481fef9e1 Move find_team_email subject to a templates/ file. 2017-01-06 10:42:28 -08:00
Rishi Gupta 7cb5d26999 Rename find_team_email_html.txt to find_team_email.html. 2017-01-06 10:42:28 -08:00
Rishi Gupta f5d5b2525c notifications.py: Change email template file endings from .text to .txt.
We use .txt for all other emails (i.e. ones that don't go through
notifications.py) in the codebase.
2017-01-06 10:42:28 -08:00
Rishi Gupta 8a07545afb Rename digest_email_txt.html to digest_email.html.
The .html file ending is clearer and more in line with our other
email files.
2017-01-06 10:42:28 -08:00
Rishi Gupta 416c8f3052 digest_email_html.txt: Fix html linter errors. 2017-01-06 10:42:28 -08:00
Rishi Gupta 8d038eef2f digest emails: Move the subject line to a templates/ file.
To match how we do the subject line for the emails in followup/ and
invitation/.
2017-01-06 10:42:28 -08:00
Umair Khan f208813ea3 Add Find My Team feature. 2017-01-03 21:33:42 -08:00
Tim Abbott 39f0ffdedd Move static/third/gemoji to static/generated/emoji.
Fixes #1153.
2016-12-27 20:16:23 -08:00
Umair Khan db5d86ab9e i18n: Title attribute should be translatable. 2016-12-15 13:44:13 -08:00
Rishi Gupta bba2465f89 Change links to /api to be relative or with {{ realm_uri }}. 2016-09-08 17:05:34 -07:00
Rishi Gupta 205fb996ec templates: Use realm_uri and server_uri settings for server URL.
The policy here is essentially:
* Pages on the central server (documentation, etc.) are server_uri.
* Pages associated with a user's realm server (anything logged-in, plus
  things like their login page) are realm_uri.
2016-08-13 16:37:45 -07:00
Rishi Gupta dff43fcc5e Change https:// to external_uri_scheme in templates.
Helps in case the development environment is not using https.
We get the value from zerver/context_processors.py (which is
ultimately reading it from settings)
2016-08-13 16:27:36 -07:00
Tim Abbott 7725c62892 Use VERBOSE_SUPPORT_OFFERS in day1 emails. 2016-07-19 15:28:41 -07:00
Tim Abbott 3ea4cbb5c3 settings: Extract settings.VERBOSE_SUPPORT_OFFERS. 2016-07-19 15:28:41 -07:00
Umair Khan 99b73c2728 digest emails: Fix typo in remaining_unread_pms_count.
This error likely caused this feature to never trigger.
2016-05-12 13:09:37 -07:00