Add temporary template thumbnails
This commit is contained in:
committed by
Veljko V
parent
a6f865414c
commit
1664a0fb30
BIN
assets/img/form_template/belowpage@1130.png
Executable file
BIN
assets/img/form_template/belowpage@1130.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
assets/img/form_template/fixedbar@1130.png
Executable file
BIN
assets/img/form_template/fixedbar@1130.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
assets/img/form_template/popup@1130.png
Executable file
BIN
assets/img/form_template/popup@1130.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
assets/img/form_template/slidein@1130.png
Executable file
BIN
assets/img/form_template/slidein@1130.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
assets/img/form_template/widget@1130.png
Executable file
BIN
assets/img/form_template/widget@1130.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
@ -202,6 +202,7 @@ class FormEditor {
|
||||
$templatesData[$formType][] = [
|
||||
'id' => $templateId,
|
||||
'name' => $form->getName(),
|
||||
'thumbnail' => $form->getThumbnailUrl(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace MailPoet\Form\Templates;
|
||||
|
||||
use MailPoet\Config\Env;
|
||||
use MailPoet\Entities\FormEntity;
|
||||
use MailPoet\Util\CdnAssetUrl;
|
||||
use MailPoet\Util\Helpers;
|
||||
@ -109,6 +110,22 @@ EOL;
|
||||
];
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
if (strpos(get_class($this), 'BelowPages')) {
|
||||
return Env::$assetsUrl . '/img/form_template/belowpage@1130.png';
|
||||
}
|
||||
if (strpos(get_class($this), 'Popup')) {
|
||||
return Env::$assetsUrl . '/img/form_template/popup@1130.png';
|
||||
}
|
||||
if (strpos(get_class($this), 'SlideIn')) {
|
||||
return Env::$assetsUrl . '/img/form_template/slidein@1130.png';
|
||||
}
|
||||
if (strpos(get_class($this), 'FixedBar')) {
|
||||
return Env::$assetsUrl . '/img/form_template/fixedbar@1130.png';
|
||||
}
|
||||
return Env::$assetsUrl . '/img/form_template/widget@1130.png';
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return self::DEFAULT_STYLES;
|
||||
}
|
||||
|
Reference in New Issue
Block a user