Commit Graph

9 Commits

Author SHA1 Message Date
Daniil Fadeev 45c3f8aa96 send_later: Extract send later options to separate template.
This is a preparatory commit that will help to render the options
for the send-later modal separately. This is necessary to have
actual sending options if the user keeps the modal open.
2023-05-10 16:14:10 -07:00
Karl Stolley 5113f4e2e9 scheduled_messages: Render localized, streamlined modal opts.
This commit ensures that user-locale and 24-hour preferences are
respected in the message-scheduling modal. It also simplifies the
translation of text strings in the scheduling modal.

Available scheduling options and their time values, including whether
the options are allowed, are now calculated every time a user opens
the scheduling modal.

In order to achieve those things, additional interrelated fixes here
accomplish the following:

1. Modal-scheduling opts now have data- attributes containing
timestamps for the time a message will be scheduled to send.

2. With those timestamps in place, the logic for setting the
scheduled send-time is simplified.

3. There are no more `send_later_xxx` global variables in the
`schedule_send` module.

Fixes #25403.
2023-05-05 14:00:46 -07:00
Karl Stolley ac0bd7bb7d scheduled_messages: Show Monday option on Fridays and Saturdays.
On Fridays and Saturdays, users will be presented with the option
to schedule a message to send on Monday at 9:00 am.

Fixes: #25402.
2023-05-04 13:52:22 -07:00
Aman Agrawal 12a2e3122f popover_menus: Show last selected time in send later popover. 2023-05-01 22:45:03 -07:00
Aman Agrawal 1b60019c60 schedule: Remove 'Schedule' state of compose box.
Fixes #25340

This means that we now schedule the message simply after selecting
time if the message is valid.

Also, editing scheduled messages will now delete the scheduled
message and open compose with scheduled message.
2023-05-01 22:45:03 -07:00
Karl Stolley e4ae4c5b75 send_later: Remove send_later_input_group.
This removes the HTML structure and CSS styles previously associated
with the element in the scheduling modal.

Preserving this all in its own commit in case it needs to be
restored.
2023-04-28 17:50:54 -07:00
Karl Stolley 8180cc786f send_later: Pick time from 'Custom time' link.
This introduces a 'Custom time' link to the bottom of the scheduling
modal's options. Clicking on it pulls up the date picker.

Additionally, clicking on the 'Custom time' link, then clicking
elsewhere to close the time-picker, then subsequently clicking
'Custom time' again reveals the time-picker.

However, repeatedly clicking the 'Custom time' link while the
date-picker is already open will cause the date-picker to redraw
each time.
2023-04-28 17:50:54 -07:00
Karl Stolley 865cba834b send_later: Cancel scheduling from popover. 2023-04-28 17:50:54 -07:00
Aman Agrawal e89cbf0ac1 send_later: Move some options to a modal. 2023-04-28 17:50:54 -07:00