HEX
Server: Apache
System: Linux webm004.cluster121.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: grainesdfo (155059)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/grainesdfo/www/wp-content/plugins/backwpup/parts/sidebar/sugar-sync-parts/api-connexion.php
<?php
use BackWPup\Utils\BackWPupHelpers;
if (null === $job_id) {
	$token = false;
} else {
	$token = BackWPup_Option::get($job_id, 'sugarrefreshtoken', false);
}
?>
<?php
BackWPupHelpers::component("heading", [
	"level" => 2,
	"title" => __("Login", 'backwpup'),
	"font" => "small",
	"class" => "mb-4",
]);
?>

<div class="flex flex-col gap-2">
	<?php if (!$token) : ?>
		<?php
		BackWPupHelpers::component("form/text", [
			"name" => "sugaremail",
			"identifier" => "sugaremail",
			"label" => __("Email Address", 'backwpup'),
			"value" => "",
			"required" => true,
		]);
		?>

		<?php
		BackWPupHelpers::component("form/text", [
			"name" => "sugarpass",
			"identifier" => "sugarpass",
			"type" => "password",
			"label" => __("Password", 'backwpup'),
			"value" => "",
			"required" => true,
		]);
		?>

		<?php
		BackWPupHelpers::component("form/button", [
			"type" => "secondary",
			"label" => __("Authenticate with SugarSync", 'backwpup'),
			"trigger" => "authenticate-sugar-sync",
			"full_width" => true,
			"data" => ['job-id' => $job_id],
		]);
		?>
	<?php else : ?>
		<?php
		BackWPupHelpers::component("form/button", [
			"type" => "secondary",
			"label" => __("Delete Sugar Sync Authentication", 'backwpup'),
			"full_width" => true,
			"trigger" => "delete-sugar-sync-auth",
			"data" => ['job-id' => $job_id],
		]);
		?>
		<?php
		BackWPupHelpers::component("alerts/info", [
			"type" => "info",
			"font" => "xs",
			"content" => __("Authenticated", 'backwpup'),
		]);
		?>
	<?php endif; ?>
</div>