Adjustments for contact registration
This commit is contained in:
parent
90e2512f0c
commit
2f634d41bf
|
|
@ -46,14 +46,21 @@ class ContactRegisterController extends Controller
|
|||
|
||||
$domain_name = request()->getHost();
|
||||
|
||||
|
||||
$show_turnstile = false;
|
||||
|
||||
if (config('ninja.cloudflare.turnstile.site_key') && strpos($domain_name, config('ninja.app_domain')) !== false) {
|
||||
$show_turnstile = true;
|
||||
}
|
||||
|
||||
return render('auth.register', ['register_company' => $company, 'account' => $company->account, 'submitsForm' => false, 'show_turnstile' => $show_turnstile]);
|
||||
$data = [
|
||||
'formed_disabled' => $company->account->isFreeHostedClient(),
|
||||
'register_company' => $company,
|
||||
'account' => $company->account,
|
||||
'submitsForm' => false,
|
||||
'show_turnstile' => $show_turnstile
|
||||
];
|
||||
|
||||
return render('auth.register', $data);
|
||||
}
|
||||
|
||||
public function register(RegisterRequest $request)
|
||||
|
|
@ -61,7 +68,7 @@ class ContactRegisterController extends Controller
|
|||
|
||||
$company = $request->company();
|
||||
|
||||
if (! $company->client_can_register) {
|
||||
if (! $company->client_can_register || $company->account->isFreeHostedClient()) {
|
||||
abort(403, 'This page is restricted');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->mediumText('referral_earnings')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
<input type="hidden" name="company_key" value="{{ $register_company->company_key }}">
|
||||
@endif
|
||||
|
||||
<fieldset :disabled="{{ $formed_disabled ?? 'false' }}">
|
||||
@csrf
|
||||
|
||||
<div class="grid grid-cols-12 gap-4 mt-10">
|
||||
|
|
@ -166,6 +167,7 @@
|
|||
</button>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue