From a8ff85042ffbfe94b678fd818c02deb613bfd116 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 07 Aug 2026 20:42:54 +0000
Subject: [PATCH] =Continuing on with Integrations setup. Working on PostMark now
---
inc/integrations/Admin.php | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/inc/integrations/Admin.php b/inc/integrations/Admin.php
index 122a459..11273b8 100644
--- a/inc/integrations/Admin.php
+++ b/inc/integrations/Admin.php
@@ -26,7 +26,7 @@
[
'name' => 'Clear Credentials',
'icon' => 'broom',
- 'action' => [$this, 'clearCredentials']
+ 'action' => [$this, 'deleteCredentials']
],
];
foreach ($actions as $a) {
@@ -78,15 +78,8 @@
return $result;
}
- public function response(bool $success, string $message):array
- {
- return [
- 'success' => $success,
- 'message' => $message
- ];
- }
- public function renderConnection():string
+ public function renderConnection(bool $return = false):string
{
if ($this->userID && !JVB()->userCanConnect($this->service_name, $this->userID)) {
return '';
@@ -155,7 +148,7 @@
$form .= $this->renderOAuthConnectionForm();
}
- if (!empty($this->optionalFields) || $this->hasExtraOptions) {
+ if (!empty($this->optionalFields) || $this->hasExtraOptions()) {
$form .= '<div class="integration-content">';
if (!empty($this->optionalFields)) {
$form .= sprintf(
@@ -164,7 +157,7 @@
$this->outputFields($this->optionalFields)
);
}
- if ($this->hasExtraOptions) {
+ if ($this->hasExtraOptions()) {
$form .= sprintf(
'<a href="%s" class="btn">More Settings</a>',
$this->determineOptionPage()
@@ -176,6 +169,10 @@
$form .= $this->outputActionButtons();
$form .= '</form>';
+ if (!$return) {
+ echo $form;
+ }
+
return $form;
}
protected function outputActionButtons():string
@@ -230,4 +227,6 @@
return true;
}
+
+
}
--
Gitblit v1.10.0