Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Require login before access to rank up form #776

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Controllers/Front/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function login(
$credentials = LoginCredentials::fromArray($validated);

try {
$account = $loginAccount->execute(
$loginAccount->execute(
credentials: $credentials,
shouldRemember: $request->filled('remember_me'),
ip: $request->ip(),
Expand Down
9 changes: 0 additions & 9 deletions resources/views/front/pages/ban-appeal/_layout-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
@section('heading', 'Appeal Ban')
@section('description', 'Use the below form to submit a ban appeal')

@push('head')
<script src='https://www.google.com/recaptcha/api.js'></script>
<script>
function submitForm() {
document.getElementById('form').submit();
}
</script>
@endpush

@section('col-1')
<p>
If you have been wrongfully banned, please post your request, and we will investigate the matter. Alternatively, if you are simply seeking a second chance, you may plead your case for consideration.
Expand Down
7 changes: 3 additions & 4 deletions resources/views/front/pages/ban-appeal/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ class="textfield"
>{{ old('explanation') }}</textarea>
</div>

<button
<x-button
class="g-recaptcha button button--filled button--block"
data-sitekey="@recaptcha_key"
data-callback="submitForm"
type="submit"
>
<i class="fas fa-check"></i> Submit
</button>
</x-button>
</form>
</div>
@endsection
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
@section('title', 'Apply for Build Rank')
@section('description', 'Use the below form to apply for the next higher builder rank')

@push('head')
<script src='https://www.google.com/recaptcha/api.js'></script>
<script>
function submitForm() {
document.getElementById('form').submit();
}
</script>
@endpush

@section('heading', 'Apply For Build Rank')

@section('col-1')
Expand Down Expand Up @@ -116,13 +107,9 @@ class="textfield {{ $errors->any() ? 'input-text--error' : '' }}"
>{{ old('additional_notes') }}</textarea>
</div>

<button
class="g-recaptcha button button--filled button--block"
data-sitekey="@recaptcha_key"
data-callback="submitForm"
>
<x-button type="submit" variant="filled">
<i class="fas fa-check"></i> Submit
</button>
</x-button>
</form>
@endauth
@endif
Expand Down
9 changes: 6 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@

Route::prefix('rank-up')->group(function () {
Route::get('/', [BuilderRankApplicationController::class, 'index'])
->name('front.rank-up');
->name('front.rank-up')
->middleware(['auth']);

Route::post('/', [BuilderRankApplicationController::class, 'store'])
->name('front.rank-up.submit');
->name('front.rank-up.submit')
->middleware(['auth']);

Route::get('{id}', [BuilderRankApplicationController::class, 'show'])
->name('front.rank-up.status');
->name('front.rank-up.status')
->middleware(['auth']);
});

Route::prefix('appeal')->group(function () {
Expand Down
Loading