|
77 | 77 | </flux:callout> |
78 | 78 | @endif |
79 | 79 |
|
80 | | - {{-- CTA Button --}} |
| 80 | + {{-- Developer Terms Agreement & CTA Button --}} |
81 | 81 | <div class="mt-6"> |
82 | | - <form action="{{ route('customer.developer.onboarding.start') }}" method="POST"> |
| 82 | + <form action="{{ route('customer.developer.onboarding.start') }}" method="POST" x-data="{ termsAccepted: {{ ($this->developerAccount?->hasAcceptedCurrentTerms()) ? 'true' : 'false' }} }"> |
83 | 83 | @csrf |
84 | | - <flux:button type="submit" variant="primary" class="w-full"> |
| 84 | + |
| 85 | + @if ($this->developerAccount?->hasAcceptedCurrentTerms()) |
| 86 | + <input type="hidden" name="accepted_plugin_terms" value="1" /> |
| 87 | + |
| 88 | + <flux:callout variant="success" icon="check-circle" class="mb-6"> |
| 89 | + <flux:callout.text> |
| 90 | + You accepted the <a href="{{ route('developer-terms') }}" class="font-medium underline" target="_blank">Plugin Developer Terms and Conditions</a> on {{ $this->developerAccount->accepted_plugin_terms_at->format('F j, Y') }}. |
| 91 | + </flux:callout.text> |
| 92 | + </flux:callout> |
| 93 | + @else |
| 94 | + <div class="mb-6 rounded-lg border border-gray-200 bg-gray-50 p-6 dark:border-gray-700 dark:bg-gray-700/50"> |
| 95 | + <flux:heading>Plugin Developer Terms and Conditions</flux:heading> |
| 96 | + <flux:text class="mt-2"> |
| 97 | + Before you can sell plugins on the Marketplace, you must agree to the following key terms: |
| 98 | + </flux:text> |
| 99 | + |
| 100 | + <ul class="mt-4 space-y-3 text-sm text-gray-600 dark:text-gray-400"> |
| 101 | + <li class="flex items-start gap-3"> |
| 102 | + <x-heroicon-o-currency-dollar class="mt-0.5 size-5 shrink-0 text-indigo-500" /> |
| 103 | + <span><strong class="text-gray-900 dark:text-white">30% Platform Fee</strong> — NativePHP retains 30% of each sale to cover payment processing, hosting, and platform maintenance</span> |
| 104 | + </li> |
| 105 | + <li class="flex items-start gap-3"> |
| 106 | + <x-heroicon-o-shield-check class="mt-0.5 size-5 shrink-0 text-indigo-500" /> |
| 107 | + <span><strong class="text-gray-900 dark:text-white">Your Responsibility</strong> — You are solely responsible for your plugin's quality, performance, and customer support</span> |
| 108 | + </li> |
| 109 | + <li class="flex items-start gap-3"> |
| 110 | + <x-heroicon-o-adjustments-horizontal class="mt-0.5 size-5 shrink-0 text-indigo-500" /> |
| 111 | + <span><strong class="text-gray-900 dark:text-white">Listing Criteria</strong> — NativePHP sets and may change listing standards at any time, and may remove plugins at its discretion</span> |
| 112 | + </li> |
| 113 | + <li class="flex items-start gap-3"> |
| 114 | + <x-heroicon-o-tag class="mt-0.5 size-5 shrink-0 text-indigo-500" /> |
| 115 | + <span><strong class="text-gray-900 dark:text-white">Pricing & Discounts</strong> — NativePHP sets plugin prices and may offer discounts at its discretion</span> |
| 116 | + </li> |
| 117 | + </ul> |
| 118 | + |
| 119 | + <div class="mt-6 border-t border-gray-200 pt-4 dark:border-gray-600"> |
| 120 | + <label class="flex cursor-pointer items-start gap-3"> |
| 121 | + <input |
| 122 | + type="checkbox" |
| 123 | + name="accepted_plugin_terms" |
| 124 | + value="1" |
| 125 | + x-model="termsAccepted" |
| 126 | + class="mt-0.5 size-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-700" |
| 127 | + /> |
| 128 | + <span class="text-sm text-gray-700 dark:text-gray-300"> |
| 129 | + I have read and agree to the |
| 130 | + <a href="{{ route('developer-terms') }}" class="font-medium text-indigo-600 underline hover:text-indigo-500 dark:text-indigo-400" target="_blank">Plugin Developer Terms and Conditions</a> |
| 131 | + </span> |
| 132 | + </label> |
| 133 | + @error('accepted_plugin_terms') |
| 134 | + <flux:text class="mt-2 text-red-600 dark:text-red-400">{{ $message }}</flux:text> |
| 135 | + @enderror |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + @endif |
| 139 | + |
| 140 | + <flux:button type="submit" variant="primary" class="w-full" x-bind:disabled="!termsAccepted"> |
85 | 141 | @if ($this->hasExistingAccount) |
86 | 142 | Continue Onboarding |
87 | 143 | @else |
|
0 commit comments