| | |
| | | |
| | | use JVBase\managers\Cache; |
| | | use JVBase\meta\Form; |
| | | use JVBase\utility\Features; |
| | | use JVBase\base\Site; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; // Exit if accessed directly |
| | |
| | | public function __construct() |
| | | { |
| | | $this->cache = Cache::for('forms', WEEK_IN_SECONDS); |
| | | |
| | | // Initialize forms from filter |
| | | $this->forms = $this->registerForms(); |
| | | $this->form_contact = apply_filters('jvb_form_contact', ''); |
| | |
| | | } |
| | | |
| | | // Enqueue Turnstile if needed |
| | | if (Features::forSite()->hasIntegration('cloudflare')) { |
| | | if (Site::hasIntegration('cloudflare')) { |
| | | $cloudflare = JVB()->connect('cloudflare'); |
| | | if ($cloudflare->isSetUp()) { |
| | | $cloudflare->enqueueTurnstileScripts(); |
| | |
| | | |
| | | // 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' : ''; |
| | |
| | | } |
| | | |
| | | // 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">'; |
| | |
| | | */ |
| | | protected function renderTurnstile(): void |
| | | { |
| | | if (!Features::hasIntegration('cloudflare')) { |
| | | if (!Site::hasIntegration('cloudflare')) { |
| | | return; |
| | | } |
| | | |