=== kosubmit portal lite ===
Contributors: kreativekabbage
Tags: client portal, portal, submission portal
Requires at least: 6.8
Tested up to: 7.0.3
Stable tag: 13.0.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn Forminator forms into a powerful, role-aware client portal with workflow tracking, document management, and professional dashboards.

== Description ==

kosubmit portal lite is the missing link between Forminator forms and client management. It transforms form entries into a dynamic dashboard where Admins, Staff, and Clients can interact with submissions.

**Why use kosubmit portal lite?**
If you use Forminator for applications, orders, or intake forms, you likely struggle to manage them after submission. kosubmit portal lite solves this by giving every entry a "Status," an "Owner," and a secure dashboard "Home."

**Core Features:**

* **Role-Based Access:** Dedicated dashboards for Admins (overview), Staff (assigned tasks), and Clients (submission history).
* **Workflow Tracking:** Move submissions through professional statuses like "New," "In Process," "Awaiting Docs," and "Complete".
* **Staff Assignment:** Assign specific entries to staff members for better team management.
* **Document Center:** Clients can upload requested supporting documents directly to their specific submission.
* **Internal Communication:** Add private staff notes to entries to keep your team on the same page.
* **Secure & Private:** Clients only see their own data; Staff only see their assigned work.
* **Automated Notifications:** Basic, professional email alerts for status changes, document uploads, and staff account creation.

**Pro Features (Available at kreativekabbage.com):**

* **Multi-Form Workflows:** Track unlimited intake forms simultaneously with isolated data mappings and document pipelines.
* **QuickBooks Online Integration:** Automatically generate Customers and Invoices from form submissions.
* **Custom Email HTML & Branding:** Edit notification templates, inject your logo, and use dynamic variables in subject lines.
* **Client Data Export:** One-click CSV exporting for your entire client list.
* **Printable Records:** Generate clean, professional, printer-friendly views of submissions.
* **Advanced White Labeling:** Full control over colors, fonts, and branding to perfectly match your agency.

== Installation ==

1. Ensure **Forminator** is installed and active.
2. Upload the `kosubmit-portal-lite` folder to the `/wp-content/plugins/` directory.
3. Activate the plugin through the 'Plugins' menu in WordPress.
4. Create a new page (e.g., "Portal") and add the shortcode: `[kopor_portal]`.
5. Go to **kreativekabbage kosubmit portal lite > Settings** to configure your Forminator field mappings.

== Frequently Asked Questions ==

= Does this work without Forminator? =
No. This plugin is specifically built to extend Forminator.

= How do clients view their dashboard? =
Clients must be logged-in users with the `kopor_client` role. Place the `[kopor_portal]` shortcode on any page to render their submission history.

= Can I customize the colors? =
The Lite version uses a theme-independent CSS strategy that inherits your site's primary colors. Full manual branding control is available in the Pro version.

= My dashboard isn't updating or deleted items reappear! =
kreativekabbage kosubmit portal lite displays live, real-time data. You **must** exclude your Portal page URL from all caching plugins (like LiteSpeed, WP Rocket, or W3 Total Cache) and host-level caching. If the page is cached, your clients and staff will see outdated information.

== Screenshots ==

1. Admin Dashboard Overview
2. Entry Detail View with Workflow Status
3. Client Portal Submission History

== Changelog ==

= 13.0.2 =
* Added smart document request cards to detail view. 

= 13.0.1 =
* Minor improvements.

= 13.0.0 =
* Major Update: Rebuilt the core query engine to support Multi-Form Workflows (Pro feature).
* Compliance: Complete code audit to meet strict WordPress.org repository standards.
* Security: Improved nonce verification, input sanitization, and output escaping across all files.
* UX/UI: Refined Javascript and CSS enqueuing to prevent conflicts and improve load times.
* Fix: Resolved pagination issues and undefined variable warnings on dashboard views.

= 12.2.3 =
* Feature: Added "Auto-Claim" logic to seamlessly link previous guest submissions to client dashboards upon account registration.
* Feature: Enhanced email notifications to automatically fall back to manual email inputs for guest submissions.
* UX/UI: Added a smart configuration warning for document requests when portal authentication URLs are not set.

= 12.2.2 =
* Critical bug fix

= 12.2.1 =
* Minor improvements.

= 12.2.0 =
* Added help text for field mapping. 
* Minor improvements.

= 12.1.9 =
* Improved default UI and styling.
* Minor improvements.

= 12.1.7 =
* Compliance: Completely rebranded the plugin to "kosubmit portal lite" to strictly adhere to WordPress.org trademark and naming guidelines.
* Compliance: Standardized the translation text domain to `kosubmit-portal-lite` across the entire codebase.
* Codebase: Implemented DRY principles for external URLs by dynamically referencing the upsell class constant.

= 12.1.6 =
*UX/UI Update: Implemented a modernized 6-column responsive grid for Client and Staff dashboards, including compact status badges that automatically extract progress percentages.
*Feature: Redesigned the "Settings" button logic to display a professional, vertically centered "Profile Unavailable" modal for clients, preventing unauthorized access to the WordPress backend.
*Feature: Enhanced the "Logout" system to automatically redirect users back to the portal page, triggering the custom "Access Required" UI.
*Documentation: Updated the "Quick Guide" with dedicated setup instructions for primary action buttons, security configurations, and secondary form mapping (uploads).
*Bug Fix: Resolved a CSS specificity conflict that interfered with modal button styling and removed hidden containers that caused vertical alignment issues.

= 12.1.5 =
* Structural Update: Successfully separated Free and Pro features to strictly comply with WordPress.org repository guidelines.
* Compliance: Removed all arbitrary trialware limits (Entries/Staff). Full standard pagination added to free dashboards.
* Feature: Added a basic automated email notification engine for status updates, document requests, and staff creation.
* UX/UI: Modernized toast notifications, implemented tab memory, and added persistent caching warnings.
* Cleanup: Completely removed dormant code, QuickBooks stubs, and unused notification assets from the free tier.

= 12.1.4 =
* Security: Added explicit `wp_verify_nonce()` and `current_user_can()` checks to all AJAX endpoints.
* Security: Sanitized all `$_SERVER` variables using `sanitize_text_field(wp_unslash())`.
* Compliance: Replaced all inline `<script>` and `<style>` tags with secure WordPress API calls.
* Compliance: Removed direct `require_once` inclusion of core WordPress files.

= 12.1.3 =
* Prefixing: Standardized on unique 'kopor_' prefix across all files for repository compliance.
* Sanitization: Added `sanitize_callback` to all settings and improved input unslashing.