From 715e26a9eb219808d5c899d418e1d596f9318f61 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 22 Jun 2026 16:59:19 +0000
Subject: [PATCH] =Debugging and implementing the Checkout.js logic. Will be uploading to test integration with square next.
---
inc/helpers/ui.php | 38 ++++++++++++++++++++++----------------
1 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/inc/helpers/ui.php b/inc/helpers/ui.php
index aed22d6..9ea9e3b 100644
--- a/inc/helpers/ui.php
+++ b/inc/helpers/ui.php
@@ -55,7 +55,7 @@
?>
</nav>
</div>
- <div class="qitems item-grid col left nowrap">
+ <div class="qitems item-grid col top left nowrap">
</div>
<div class="queue-actions row x-btw nowrap">
<button class="dismiss-all">Clear Completed</button>
@@ -219,22 +219,32 @@
-function jvbModalActions()
+function jvbModalActions():string
{
- return '<div class="m-actions row">
- <button type="button" class="cancel">'.jvbIcon('x').'<span class="screen-reader-text">Cancel</span></button>
- <button type="submit" class="save">'.jvbIcon('floppy-disk').'<span class="screen-reader-text">Save</span></button>
- </div>';
+ return sprintf(
+ '<div class="m-actions row">
+ <button type="button" class="cancel">%s<span class="screen-reader-text">Cancel</span></button>
+ <button type="submit" class="save">%s<span class="screen-reader-text">Save</span></button>
+ </div>',
+ jvbIcon('x'),
+ jvbIcon('floppy-disk')
+ );
}
-function jvbNewModal(string $class, string $title, string $form)
+function jvbNewModal(string $class, string $id, string $title, string $form):string
{
- return '<dialog class="'.$class.'">
+ return sprintf(
+ '<dialog class="%s" id="%s">
<div class="wrap">
- <h2>'.$title.'</h2>
- '.str_replace('</form>', jvbModalActions().'</form>', $form).'
+ <h2>%s</h2>
+ %s
</div>
- </dialog>';
+ </dialog>',
+ $class,
+ sanitize_title($id),
+ $title,
+ str_replace('</form>', jvbModalActions().'</form>', $form)
+ );
}
/**
@@ -302,11 +312,7 @@
<span>Jump To:</span><?= jvbIcon('plus-square') ?>
</button>
<ul>
- <li id="back-to-top">
- <a href="#top" title="Back to Top">
- <?= jvbIcon('caret-circle-up') ?><span>Back to Top</span>
- </a>
- </li>
+
<?php
foreach ($ids as $slug) {
?>
--
Gitblit v1.10.0