mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 18:04:31 -04:00
Support inline attachments for purchase orders in custom designs
This commit is contained in:
parent
7535931493
commit
563c444dc7
@ -52,6 +52,32 @@ class VendorTemplateEmail extends Mailable
|
||||
$this->invitation = $invitation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supports inline attachments for large
|
||||
* attachments in custom designs
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function buildLinksForCustomDesign(): string
|
||||
{
|
||||
$links = $this->build_email->getAttachmentLinks();
|
||||
|
||||
if(count($links) == 0)
|
||||
return '';
|
||||
|
||||
$link_string = '<ul>';
|
||||
|
||||
foreach($this->build_email->getAttachmentLinks() as $link)
|
||||
{
|
||||
$link_string .= "<li>{$link}</li>";
|
||||
}
|
||||
|
||||
$link_string .= '</ul>';
|
||||
|
||||
return $link_string;
|
||||
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
$template_name = 'email.template.'.$this->build_email->getTemplate();
|
||||
@ -61,7 +87,7 @@ class VendorTemplateEmail extends Mailable
|
||||
}
|
||||
|
||||
if ($this->build_email->getTemplate() == 'custom') {
|
||||
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody(), $this->company->getSetting('email_style_custom')));
|
||||
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody().$this->buildLinksForCustomDesign(), $this->company->getSetting('email_style_custom')));
|
||||
}
|
||||
|
||||
$settings = $this->company->settings;
|
||||
|
Loading…
x
Reference in New Issue
Block a user