From 0dfe1d8afafc59c4a5559c498342668d5a58d6ef Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 23 Jul 2026 22:41:41 +0000
Subject: [PATCH] =Still working away at the Integrations overhaul

---
 inc/registrar/helpers/AddIntegrationFields.php |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/inc/registrar/helpers/AddIntegrationFields.php b/inc/registrar/helpers/AddIntegrationFields.php
index 6aad5fa..fd656ec 100644
--- a/inc/registrar/helpers/AddIntegrationFields.php
+++ b/inc/registrar/helpers/AddIntegrationFields.php
@@ -65,9 +65,6 @@
 
 	public function getIntegrationFields():array
 	{
-		if ($this->registrar && $this->registrar->getType() === 'user' && $this->config->isCustomer()) {
-			return JVB()->connect($this->service_name)->getAdditionalFields('customer');
-		}
 		$fields = [
 			'share_to_'.$this->service_name => [
 				'type'	=> 'true_false',
@@ -123,7 +120,7 @@
 		}
 
 		if ($this->config->getCanSchedule()) {
-			$fields['schedule_'.$this->service_name] = [
+			$fields['_'.$this->service_name.'_scheduled_at'] = [
 				'type'	=> 'datetime',
 				'label'	=> 'Schedule for later?',
 				'condition' => [
@@ -136,6 +133,10 @@
 		}
 		$additional = JVB()->connect($this->service_name)->getAdditionalFields($this->config->getContentType());
 		if (!empty($additional)) {
+			$additional = array_combine(
+				array_map(fn($k) => str_starts_with($k, '_'.$this->service_name) ? $k : "_{$this->service_name}_{$k}", array_keys($additional)),
+				$additional
+			);
 			$fields = array_merge($fields, $additional);
 		}
 		return $fields;

--
Gitblit v1.10.0