|
@@ 735-747 (lines=13) @@
|
| 732 |
|
* |
| 733 |
|
* @return FormField |
| 734 |
|
*/ |
| 735 |
|
public function InstallHookForm() |
| 736 |
|
{ |
| 737 |
|
$fields = new CompositeField(); |
| 738 |
|
$fields->push(new LiteralField('Info', $this->MessageHelper( |
| 739 |
|
_t('MailgunAdmin.WebhookNotInstalled', 'Webhook is not installed. It should be configured using the following url {url}. This url must be publicly visible to be used as a hook.', ['url' => $this->WebhookUrl()]), |
| 740 |
|
'bad' |
| 741 |
|
))); |
| 742 |
|
$fields->push(new LiteralField('doInstallHook', $this->ButtonHelper( |
| 743 |
|
$this->Link('doInstallHook'), |
| 744 |
|
_t('MailgunAdmin.DOINSTALL_WEBHOOK', 'Install webhook') |
| 745 |
|
))); |
| 746 |
|
return $fields; |
| 747 |
|
} |
| 748 |
|
|
| 749 |
|
public function doInstallHook() |
| 750 |
|
{ |
|
@@ 780-793 (lines=14) @@
|
| 777 |
|
* |
| 778 |
|
* @return FormField |
| 779 |
|
*/ |
| 780 |
|
public function UninstallHookForm() |
| 781 |
|
{ |
| 782 |
|
$fields = new CompositeField(); |
| 783 |
|
$fields->push(new LiteralField('Info', $this->MessageHelper( |
| 784 |
|
_t('MailgunAdmin.WebhookInstalled', 'Webhook is installed and accessible at the following url {url}.', ['url' => $this->WebhookUrl()]), |
| 785 |
|
'good' |
| 786 |
|
))); |
| 787 |
|
$fields->push(new LiteralField('doUninstallHook', $this->ButtonHelper( |
| 788 |
|
$this->Link('doUninstallHook'), |
| 789 |
|
_t('MailgunAdmin.DOUNINSTALL_WEBHOOK', 'Uninstall webhook'), |
| 790 |
|
true |
| 791 |
|
))); |
| 792 |
|
return $fields; |
| 793 |
|
} |
| 794 |
|
|
| 795 |
|
public function doUninstallHook($data, Form $form) |
| 796 |
|
{ |
|
@@ 1052-1064 (lines=13) @@
|
| 1049 |
|
* @param CompositeField $fieldsd |
| 1050 |
|
* @return FormField |
| 1051 |
|
*/ |
| 1052 |
|
public function InstallDomainForm(CompositeField $fields) |
| 1053 |
|
{ |
| 1054 |
|
$host = $this->getDomain(); |
| 1055 |
|
|
| 1056 |
|
$fields->push(new LiteralField('Info', $this->MessageHelper( |
| 1057 |
|
_t('MailgunAdmin.DomainNotInstalled', 'Default sending domain {domain} is not installed.', ['domain' => $host]), |
| 1058 |
|
"bad" |
| 1059 |
|
))); |
| 1060 |
|
$fields->push(new LiteralField('doInstallDomain', $this->ButtonHelper( |
| 1061 |
|
$this->Link('doInstallDomain'), |
| 1062 |
|
_t('MailgunAdmin.DOINSTALLDOMAIN', 'Install domain') |
| 1063 |
|
))); |
| 1064 |
|
} |
| 1065 |
|
|
| 1066 |
|
public function doInstallDomain() |
| 1067 |
|
{ |