From 4089ba01e0881c89a72332e13bc3a80b6bddec2a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 29 Jun 2026 22:15:55 +0000
Subject: [PATCH] =DashboardManager overhaul. A bit easier to modify the output of pages. Still have to get the account pages to work as expected, as well as verify the integrations and others are working - but registrar/content pages work as expected. Also fixed up the table generation in CRUD.js and CRUDSkeleton.php
---
inc/blocks/FormBlock.php | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/inc/blocks/FormBlock.php b/inc/blocks/FormBlock.php
index bfe7840..c34fee8 100644
--- a/inc/blocks/FormBlock.php
+++ b/inc/blocks/FormBlock.php
@@ -3,7 +3,7 @@
use JVBase\managers\Cache;
use JVBase\meta\Form;
-use JVBase\utility\Features;
+use JVBase\base\Site;
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
@@ -34,6 +34,10 @@
public function __construct()
{
$this->cache = Cache::for('forms', WEEK_IN_SECONDS);
+
+ if (JVB_TESTING) {
+ $this->cache->flush();
+ }
// Initialize forms from filter
$this->forms = $this->registerForms();
$this->form_contact = apply_filters('jvb_form_contact', '');
@@ -58,7 +62,7 @@
}
// Enqueue Turnstile if needed
- if (Features::forSite()->hasIntegration('cloudflare')) {
+ if (Site::hasIntegration('cloudflare')) {
$cloudflare = JVB()->connect('cloudflare');
if ($cloudflare->isSetUp()) {
$cloudflare->enqueueTurnstileScripts();
@@ -275,7 +279,7 @@
}
}
- echo '<form id="' . esc_attr($form_id) . '" data-form-id="'.esc_attr($type).'" data-save="form">';
+ echo '<form id="' . esc_attr($form_id) . '" data-form-id="'.esc_attr($type).'" data-save="form" data-handled data-step>';
// wp_nonce_field('jvb_form_' . $type);
}
@@ -317,13 +321,13 @@
echo '<div class="container">';
if ($total > 1) {
echo '<div class="form-progress">';
- jvbRenderProgressBar('<span class="step-text">Step <span class="current">1</span> of ' . $total . '</span>');
+ jvbRenderProgressBar('<span class="step-text">Step <span class="current">1</span> of ' . $total . '</span>', false, false);
echo '</div>';
}
// Render navigation if multiple sections
if (count($sections) > 1) {
- echo '<nav class="tabs row start" role="tablist">';
+ echo '<nav class="tabs row left" role="tablist">';
$i = 1;
foreach ($sections as $slug => $section) {
$active_class = $i === 1 ? ' active' : '';
@@ -331,7 +335,7 @@
echo '<button type="button" class="tab' . $active_class . '" data-tab="' . esc_attr($slug) . '" data-step="'.$i.'" role="tab" aria-selected="' . $aria_selected . '">';
echo '<span class="step-number">' . $i . '</span>';
- echo '<h2>' . esc_html($section['label'] ?? $section) . '</h2>';
+ echo '<span>' . esc_html($section['label'] ?? $section) . '</span>';
echo '</button>';
$i++;
}
@@ -366,7 +370,7 @@
}
// Add step navigation buttons
- echo '<div class="step-navigation row btw">';
+ echo '<div class="step-navigation row x-btw">';
if ($i > 0) {
echo '<button type="button" class="button secondary prev-step" data-action="prev-step">';
@@ -401,7 +405,7 @@
*/
protected function renderTurnstile(): void
{
- if (!Features::hasIntegration('cloudflare')) {
+ if (!Site::hasIntegration('cloudflare')) {
return;
}
--
Gitblit v1.10.0