=== DJCockpit – Anfrageformular mit Terminprüfung ===
Contributors: djcockpit
Tags: dj, booking, inquiry form, availability, wedding
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

DJ inquiry form with a live availability check, opened as a window on your WordPress site. Needs a DJCockpit account (free plan available).

== Description ==

**Deutsch:** Dieses Plugin verbindet deine Website mit [DJCockpit](https://djcockpit.de/), der Software für DJs. Trag in den Einstellungen deine DJCockpit-Subdomain ein — ab dann öffnet jeder Link auf deine DJCockpit-Anfrageseite das Anfrageformular als Fenster über deiner Website. Deine Besucher bleiben auf deiner Seite, prüfen ihren Wunschtermin mit einer Ampel (frei, angefragt, vergeben) und fragen an. Die Anfrage landet als Vorgang in DJCockpit.

Mit dem Shortcode `[djcockpit]` steht das Formular direkt auf einer Seite: Dort erscheint ein Knopf „Termin prüfen“, ein Klick zeigt das Formular an genau dieser Stelle.

Anleitung Schritt für Schritt, mit Bildern: [djcockpit.de/wordpress-plugin](https://djcockpit.de/wordpress-plugin)

**English:** This plugin connects your WordPress site with DJCockpit, a booking and business software for DJs. Enter your DJCockpit subdomain in the settings, and every link to your DJCockpit inquiry page opens the inquiry form in a window on top of your site, including a live availability check. Use `[djcockpit]` to show the form inline on a page.

= What you need =

* A DJCockpit account. The free plan costs nothing, permanently: [create one](https://djcockpit.de/register?from=wordpress-plugin).
* Without a subdomain entered, the plugin outputs nothing on your site.

= Appearance =

Colors, light or dark background and the form's tone (ihr, du or Sie) are set in DJCockpit (Settings → Profile → “Deine Anfrageseite”). Changes show up on your site within a minute. The form is shielded from your theme's styles, so page builders and optimization plugins don't change it.

== External services ==

This plugin connects to DJCockpit (https://djcockpit.de), the service that receives and manages your booking inquiries.

* **When a visitor clicks** a link to your DJCockpit inquiry page or the `[djcockpit]` button, the visitor's browser loads the form script from `https://djcockpit.de/einbinden.js` and your form settings from `https://djcockpit.de/api/einbinden/<your-subdomain>`. This transmits the visitor's IP address to DJCockpit. **Nothing is loaded from DJCockpit before that click.**
* **When the visitor checks a date**, the date and your subdomain are sent to `https://djcockpit.de/api/verfuegbarkeit` to show availability.
* **When the visitor submits the form**, the entered data (date, occasion, location, salutation, name, email, phone, message, optional consent to forward the inquiry to a colleague) and the page address are sent to `https://djcockpit.de/api/anfrage` and stored in your DJCockpit account.
* **When you save the plugin settings**, your WordPress site asks `https://djcockpit.de/api/einbinden/<your-subdomain>` whether the subdomain exists.

DJCockpit processes this data on your behalf (data processing agreement included in DJCockpit). Terms of use: https://djcockpit.de/agb · Privacy policy: https://djcockpit.de/datenschutz · Data processing agreement: https://djcockpit.de/avv

Please add a sentence about this to your own privacy policy — DJCockpit offers a ready-made text in its settings.

== Installation ==

1. Install and activate the plugin.
2. Go to Settings → DJCockpit and enter your subdomain (for `dj-max.djcockpit.de` enter `dj-max`). Click “Speichern und prüfen”.
3. Done. Every link to your inquiry page now opens the form as a window. Optional: place `[djcockpit]` on a page.
4. If you use a caching plugin (e.g. WP Rocket), clear the cache once.

Step-by-step guide with screenshots (German): https://djcockpit.de/wordpress-plugin

== Frequently Asked Questions ==

= Does this work with WP Rocket, LiteSpeed Cache or Cloudflare? =

Yes. The small loader is excluded from “delay JavaScript” features of WP Rocket, LiteSpeed and Cloudflare Rocket Loader, so the first click on your site already opens the form.

= What happens without JavaScript, or if DJCockpit cannot be reached? =

The links stay normal links to your DJCockpit inquiry page. Nobody gets stuck.

= Can I use it without DJCockpit? =

No. The plugin only connects your site with your DJCockpit account. Without a subdomain it does nothing.

= Does the plugin set cookies or track visitors? =

No. The plugin sets no cookies and loads nothing before a visitor clicks.

== Screenshots ==

1. The inquiry form as a window on top of the DJ's website, with the live availability check (green: the date is still free).
2. Settings → DJCockpit: enter your subdomain and click “Speichern und prüfen”. Green means connected.
3. The form placed directly on a page with the shortcode `[djcockpit]`.

== Changelog ==

= 1.0.1 =
* Link to the step-by-step guide on the settings page.

= 1.0.0 =
* First release: settings page with subdomain check, inquiry form as a window for every link to the inquiry page, shortcode `[djcockpit]`.
