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

Ticket #6329 Update send email screen #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 2 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
17 changes: 11 additions & 6 deletions Admin/EmailSendAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ public function getManager()
return $this->manager;
}

/**
* {@inheritdoc}
*/
public function getNewInstance()
{
$email = parent::getNewInstance();
$email->setSendDate(new \DateTime());
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sure this will work. When you set sendDate to "now", then we will send this info to sendgrid, but when it will be received by sendgrid, "now" will be already in the past and i'm not sure sendgrid will ever send that email.
This field is used when you need to send email in the future. If you don't set it, email will be send immediately.


return $email;
}

/**
* {@inheritdoc}
*/
Expand All @@ -58,9 +69,6 @@ protected function configureFormFields(FormMapper $formMapper)
'expanded' => false,
'required' => false,
))
->add('isHtmlContent', 'checkbox', array(
'required' => false
))
->add('sendDate', 'datetime', array(
'required' => false,
'date_widget' => 'single_text',
Expand Down Expand Up @@ -92,7 +100,6 @@ protected function configureShowField(ShowMapper $showMapper)
->add('title')
->add('sender')
->add('userLists')
->add('isHtmlContent')
->add('sendDate')
->add('created')
->add('attempted')
Expand Down Expand Up @@ -133,7 +140,6 @@ protected function configureDatagridFilters(DatagridMapper $datagridMapper)

$datagridMapper
->add('title')
->add('isHtmlContent')
->add('created', $dateType, array(), null, array(
'label' => 'Created after'
))
Expand All @@ -148,7 +154,6 @@ protected function configureListFields(ListMapper $listMapper)
->add('title')
->add('sender')
->add('userLists')
->add('isHtmlContent')
->add('sendDate')
->add('created')
->add('attempted')
Expand Down