enable us to disable registration
tests / ci (push) Waiting to run

This commit is contained in:
Mark Gregory
2026-11-16 10:12:10 +00:00
parent ff2ef836c6
commit 523d4f087f
11 changed files with 150 additions and 6 deletions
@@ -58,7 +58,7 @@
<button class="btn btn-primary" type="submit" data-test="login-button">{{ __('Log in') }}</button>
</form>
@if (Route::has('register'))
@if (Route::has('register') && \App\Support\PublicRegistration::enabled())
<p class="signup">{{ __('Don\'t have an account?') }} <a class="link" href="{{ route('register') }}">{{ __('Sign up') }}</a></p>
@endif
@@ -15,6 +15,17 @@
<div class="hd-alert hd-alert-success">{{ session('status') }}</div>
@endif
<form method="POST" action="{{ route('user-management.public-registration.update') }}" class="hd-panel hd-toolbar">
@csrf
@method('PUT')
<input type="hidden" name="enabled" value="0">
<label class="flex items-center gap-2">
<input type="checkbox" name="enabled" value="1" @checked($publicRegistrationEnabled)>
Allow public registration
</label>
<button class="hd-action hd-action-blue" type="submit">Save registration setting</button>
</form>
<section class="hd-panel">
<form method="GET" class="hd-toolbar">
<div class="hd-search-field">
@@ -36,7 +36,7 @@
Log in
</a>
@if (Route::has('register'))
@if (Route::has('register') && \App\Support\PublicRegistration::enabled())
<a
href="{{ route('register') }}"
class="inline-block px-5 py-1.5 dark:text-[#EDEDEC] border-[#19140035] hover:border-[#1915014a] border text-[#1b1b18] dark:border-[#3E3E3A] dark:hover:border-[#62605b] rounded-sm text-sm leading-normal">