Add captcha tokens management.
This commit is contained in:
5
resources/views/private/captcha_tokens/_from.blade.php
Normal file
5
resources/views/private/captcha_tokens/_from.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
@csrf
|
||||
<x-private.forms.input :title="__('validation.attributes.title')" name="title" type="text" :value="$captchaToken->title" required autofocus />
|
||||
@canany(['create', 'update'], $captchaToken)
|
||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||
@endcanany
|
8
resources/views/private/captcha_tokens/_top.blade.php
Normal file
8
resources/views/private/captcha_tokens/_top.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
@can('create', \App\Models\CaptchaToken::class)
|
||||
<div class="mb-4">
|
||||
<a href="{{ route('captcha-tokens.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
|
||||
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
||||
{{ __('Create') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
16
resources/views/private/captcha_tokens/create.blade.php
Normal file
16
resources/views/private/captcha_tokens/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@section('meta_title', __('sections.Captcha tokens'))
|
||||
@section('h1', __('sections.Captcha tokens'))
|
||||
<x-private.layout>
|
||||
@include('private.captcha_tokens._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('captcha-tokens.store') }}">
|
||||
@include('private.captcha_tokens._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-private.layout>
|
19
resources/views/private/captcha_tokens/edit.blade.php
Normal file
19
resources/views/private/captcha_tokens/edit.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
@section('meta_title', __('sections.Captcha tokens'))
|
||||
@section('h1', __('sections.Captcha tokens'))
|
||||
<x-private.layout>
|
||||
@include('private.captcha_tokens._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('captcha-tokens.update', $captchaToken) }}">
|
||||
@method('PUT')
|
||||
<x-private.forms.input :title="__('validation.attributes.public_token')" name="public_token" type="text" :value="$captchaToken->public_token" disabled />
|
||||
<x-private.forms.input :title="__('validation.attributes.private_token')" name="private_token" type="text" :value="$captchaToken->private_token" disabled />
|
||||
@include('private.captcha_tokens._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-private.layout>
|
50
resources/views/private/captcha_tokens/index.blade.php
Normal file
50
resources/views/private/captcha_tokens/index.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@section('meta_title', __('sections.Captcha tokens'))
|
||||
@section('h1', __('sections.Captcha tokens'))
|
||||
<x-private.layout>
|
||||
@include('private.captcha_tokens._top')
|
||||
<div class="card border-0 shadow mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-centered table-nowrap mb-0 rounded">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="border-0">{{ __('validation.attributes.title') }}</th>
|
||||
<th class="border-0 rounded-end" style="width: 150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($captchaTokens as $captchaToken)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('captcha-tokens.edit', $captchaToken) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
{{ $captchaToken->title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@can('delete', $captchaToken)
|
||||
<form method="post" action="{{ route('captcha-tokens.destroy', $captchaToken) }}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger click-confirm">
|
||||
{{ __('Delete') }}
|
||||
</button>
|
||||
</form>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer border-0">
|
||||
{{ $captchaTokens->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@push('scripts')
|
||||
@include('private._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
|
||||
@endpush
|
||||
</x-private.layout>
|
5
resources/views/private/dashboard/index.blade.php
Normal file
5
resources/views/private/dashboard/index.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
@section('meta_title', __('sections.Dashboard'))
|
||||
@section('h1', __('sections.Dashboard'))
|
||||
<x-private.layout>
|
||||
|
||||
</x-private.layout>
|
@@ -19,6 +19,20 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@can('viewAny', \App\Models\CaptchaToken::class)
|
||||
<li @class([
|
||||
'nav-item',
|
||||
'active' => request()->route()->named('captcha-tokens.*'),
|
||||
])>
|
||||
<a href="{{ route('captcha-tokens.index') }}" class="nav-link">
|
||||
<span class="sidebar-icon">
|
||||
<svg class="icon icon-xs me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M8.06 6.5a.5.5 0 0 1 .5.5v.776a11.5 11.5 0 0 1-.552 3.519l-1.331 4.14a.5.5 0 0 1-.952-.305l1.33-4.141a10.5 10.5 0 0 0 .504-3.213V7a.5.5 0 0 1 .5-.5Z"/><path d="M6.06 7a2 2 0 1 1 4 0 .5.5 0 1 1-1 0 1 1 0 1 0-2 0v.332c0 .409-.022.816-.066 1.221A.5.5 0 0 1 6 8.447c.04-.37.06-.742.06-1.115V7Zm3.509 1a.5.5 0 0 1 .487.513 11.5 11.5 0 0 1-.587 3.339l-1.266 3.8a.5.5 0 0 1-.949-.317l1.267-3.8a10.5 10.5 0 0 0 .535-3.048A.5.5 0 0 1 9.569 8Zm-3.356 2.115a.5.5 0 0 1 .33.626L5.24 14.939a.5.5 0 1 1-.955-.296l1.303-4.199a.5.5 0 0 1 .625-.329Z"/><path d="M4.759 5.833A3.501 3.501 0 0 1 11.559 7a.5.5 0 0 1-1 0 2.5 2.5 0 0 0-4.857-.833.5.5 0 1 1-.943-.334Zm.3 1.67a.5.5 0 0 1 .449.546 10.72 10.72 0 0 1-.4 2.031l-1.222 4.072a.5.5 0 1 1-.958-.287L4.15 9.793a9.72 9.72 0 0 0 .363-1.842.5.5 0 0 1 .546-.449Zm6 .647a.5.5 0 0 1 .5.5c0 1.28-.213 2.552-.632 3.762l-1.09 3.145a.5.5 0 0 1-.944-.327l1.089-3.145c.382-1.105.578-2.266.578-3.435a.5.5 0 0 1 .5-.5Z"/><path d="M3.902 4.222a4.996 4.996 0 0 1 5.202-2.113.5.5 0 0 1-.208.979 3.996 3.996 0 0 0-4.163 1.69.5.5 0 0 1-.831-.556Zm6.72-.955a.5.5 0 0 1 .705-.052A4.99 4.99 0 0 1 13.059 7v1.5a.5.5 0 1 1-1 0V7a3.99 3.99 0 0 0-1.386-3.028.5.5 0 0 1-.051-.705ZM3.68 5.842a.5.5 0 0 1 .422.568c-.029.192-.044.39-.044.59 0 .71-.1 1.417-.298 2.1l-1.14 3.923a.5.5 0 1 1-.96-.279L2.8 8.821A6.531 6.531 0 0 0 3.058 7c0-.25.019-.496.054-.736a.5.5 0 0 1 .568-.422Zm8.882 3.66a.5.5 0 0 1 .456.54c-.084 1-.298 1.986-.64 2.934l-.744 2.068a.5.5 0 0 1-.941-.338l.745-2.07a10.51 10.51 0 0 0 .584-2.678.5.5 0 0 1 .54-.456Z"/><path d="M4.81 1.37A6.5 6.5 0 0 1 14.56 7a.5.5 0 1 1-1 0 5.5 5.5 0 0 0-8.25-4.765.5.5 0 0 1-.5-.865Zm-.89 1.257a.5.5 0 0 1 .04.706A5.478 5.478 0 0 0 2.56 7a.5.5 0 0 1-1 0c0-1.664.626-3.184 1.655-4.333a.5.5 0 0 1 .706-.04ZM1.915 8.02a.5.5 0 0 1 .346.616l-.779 2.767a.5.5 0 1 1-.962-.27l.778-2.767a.5.5 0 0 1 .617-.346Zm12.15.481a.5.5 0 0 1 .49.51c-.03 1.499-.161 3.025-.727 4.533l-.07.187a.5.5 0 0 1-.936-.351l.07-.187c.506-1.35.634-2.74.663-4.202a.5.5 0 0 1 .51-.49Z"/></svg>
|
||||
</span>
|
||||
<span class="sidebar-text">{{ __('sections.Captcha tokens') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@can('viewAny', \App\Models\User::class)
|
||||
<li @class([
|
||||
'nav-item',
|
||||
|
Reference in New Issue
Block a user