TRF Certest first commit

This commit is contained in:
2025-02-26 08:57:46 +01:00
commit 3ce064a108
2524 changed files with 475404 additions and 0 deletions
@@ -0,0 +1,44 @@
<div class="form-group">
<label for="email">@lang('Email')</label>
<input type="email"
class="form-control input-solid"
id="email"
name="email"
placeholder="@lang('Email')"
value="{{ $edit ? $user->email : '' }}">
</div>
<div class="form-group">
<label for="username">@lang('Username')</label>
<input type="text"
class="form-control input-solid"
id="username"
placeholder="(@lang('optional'))"
name="username"
value="{{ $edit ? $user->username : '' }}">
</div>
<div class="form-group">
<label for="password">{{ $edit ? __("New Password") : __('Password') }}</label>
<input type="password"
class="form-control input-solid"
id="password"
name="password"
@if ($edit) placeholder="@lang("Leave field blank if you don't want to change it")" @endif>
</div>
<div class="form-group">
<label for="password_confirmation">{{ $edit ? __("Confirm New Password") : __('Confirm Password') }}</label>
<input type="password"
class="form-control input-solid"
id="password_confirmation"
name="password_confirmation"
@if ($edit) placeholder="@lang("Leave field blank if you don't want to change it")" @endif>
</div>
@if ($edit)
<button type="submit" class="btn btn-primary mt-2" id="update-login-details-btn">
<i class="fa fa-refresh"></i>
@lang('Update Details')
</button>
@endif
@@ -0,0 +1,92 @@
<div class="avatar-wrapper">
<div class="spinner">
<div class="spinner-dot"></div>
<div class="spinner-dot"></div>
<div class="spinner-dot"></div>
</div>
<div id="avatar"></div>
<div class="text-center">
<div class="avatar-preview">
<img class="avatar rounded-circle img-thumbnail img-responsive mt-5 mb-4"
width="150"
src="{{ $edit ? $user->present()->avatar : url('assets/img/profile.png') }}">
<h5 class="text-muted">{{ $user->present()->nameOrEmail }}</h5>
</div>
<div id="change-picture"
class="btn btn-outline-secondary btn-block mt-5"
data-toggle="modal"
data-target="#choose-modal">
<i class="fa fa-camera"></i>
@lang('Change Photo')
</div>
<div class="row avatar-controls d-none">
<div class="col-md-6">
<div id="cancel-upload" class="btn btn-block btn-outline-secondary text-center">
<i class="fa fa-times"></i> @lang('Cancel')
</div>
</div>
<div class="col-md-6">
<button type="submit" id="save-photo" class="btn btn-success btn-block text-center">
<i class="fa fa-check"></i> @lang('Save')
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="choose-modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="row">
<div class="col-md-4 avatar-source" id="no-photo"
data-url="{{ $updateUrl }}">
<img src="{{ url('assets/img/profile.png') }}" class="rounded-circle img-thumbnail img-responsive">
<p class="mt-3">@lang('No Photo')</p>
</div>
<div class="col-md-4 avatar-source">
<div class="btn btn-light btn-upload">
<i class="fa fa-upload"></i>
<input type="file" name="avatar" id="avatar-upload">
</div>
<p class="mt-3">@lang('Upload Photo')</p>
</div>
@if ($edit)
<div class="col-md-4 avatar-source source-external"
data-url="{{ $updateUrl }}">
<img src="{{ $user->gravatar() }}" class="rounded-circle img-thumbnail img-responsive">
<p class="mt-3">@lang('Gravatar')</p>
</div>
@endif
</div>
@if ($edit && count($socialLogins))
@foreach ($socialLogins->chunk(3) as $logins)
<br>
<div class="row">
@foreach($logins as $login)
<div class="col-md-4 avatar-source source-external"
data-url="{{ $updateUrl }}">
<img src="{{ $login->avatar }}"
class="rounded-circle img-thumbnail img-responsive"
style="width: 120px;">
<p>{{ ucfirst($login->provider) }}</p>
</div>
@endforeach
</div>
@endforeach
@endif
</div>
</div>
</div>
</div>
<div class="d-none">
<input type="hidden" name="points[x1]" id="points_x1">
<input type="hidden" name="points[y1]" id="points_y1">
<input type="hidden" name="points[x2]" id="points_x2">
<input type="hidden" name="points[y2]" id="points_y2">
</div>
@@ -0,0 +1,76 @@
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="role_id">@lang('Role')</label>
<select name="role_id" id="role_id" class="form-control input-solid" {{ $profile ? 'disabled' : '' }}>
@foreach($roles as $roleId => $roleName)
<option value="{{ $roleId }}" {{ ($edit && $user->role->id == $roleId) ? 'selected' : '' }}>
{{ $roleName }}
</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="status">@lang('Status')</label>
<select name="status" id="status" class="form-control input-solid" {{ $profile ? 'disabled' : '' }}>
@foreach($statuses as $statusId => $statusName)
<option value="{{ $statusId }}" {{ ($edit && $user->status->value == $statusId) ? 'selected' : '' }}>
{{ $statusName }}
</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="first_name">@lang('First Name')</label>
<input type="text" class="form-control input-solid" id="first_name"
name="first_name" placeholder="@lang('First Name')" value="{{ $edit ? $user->first_name : '' }}">
</div>
<div class="form-group">
<label for="last_name">@lang('Last Name')</label>
<input type="text" class="form-control input-solid" id="last_name"
name="last_name" placeholder="@lang('Last Name')" value="{{ $edit ? $user->last_name : '' }}">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="birthday">@lang('Date of Birth')</label>
<div class="form-group">
<input type="text"
name="birthday"
id='birthday'
value="{{ $edit && $user->birthday ? $user->present()->birthday : '' }}"
class="form-control input-solid" />
</div>
</div>
<div class="form-group">
<label for="phone">@lang('Phone')</label>
<input type="text" class="form-control input-solid" id="phone"
name="phone" placeholder="@lang('Phone')" value="{{ $edit ? $user->phone : '' }}">
</div>
<div class="form-group">
<label for="address">@lang('Address')</label>
<input type="text" class="form-control input-solid" id="address"
name="address" placeholder="@lang('Address')" value="{{ $edit ? $user->address : '' }}">
</div>
<div class="form-group">
<label for="country_id">@lang('Country')</label>
<select name="country_id" id="country_id" class="form-control input-solid">
@foreach($countries as $countryId => $countryName)
<option value="{{ $countryId }}" {{ ($edit && $user->country_id == $countryId) ? 'selected' : '' }}>
{{ $countryName }}
</option>
@endforeach
</select>
</div>
</div>
@if ($edit)
<div class="col-md-12 mt-2">
<button type="submit" class="btn btn-primary" id="update-details-btn">
<i class="fa fa-refresh"></i>
@lang('Update Details')
</button>
</div>
@endif
</div>
@@ -0,0 +1,73 @@
<tr>
<td style="width: 40px;">
<a href="{{ route('users.show', $user) }}">
<img
class="rounded-circle img-responsive"
width="40"
src="{{ $user->present()->avatar }}"
alt="{{ $user->present()->name }}">
</a>
</td>
<td class="align-middle">
<a href="{{ route('users.show', $user) }}">
{{ $user->username ?: __('N/A') }}
</a>
</td>
<td class="align-middle">{{ $user->first_name . ' ' . $user->last_name }}</td>
<td class="align-middle">{{ $user->email }}</td>
<td class="align-middle">{{ $user->created_at->format(config('app.date_format')) }}</td>
<td class="align-middle">
<span class="badge badge-lg badge-{{ $user->present()->labelClass }}">
{{ trans("app.status.{$user->status->value}") }}
</span>
</td>
<td class="text-center align-middle">
<div class="dropdown show d-inline-block">
<a class="btn btn-icon"
href="#" role="button" id="dropdownMenuLink"
data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fas fa-ellipsis-h"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink">
@if (config('session.driver') == 'database')
<a href="{{ route('user.sessions', $user) }}" class="dropdown-item text-gray-500">
<i class="fas fa-list mr-2"></i>
@lang('User Sessions')
</a>
@endif
<a href="{{ route('users.show', $user) }}" class="dropdown-item text-gray-500">
<i class="fas fa-eye mr-2"></i>
@lang('View User')
</a>
@canBeImpersonated($user)
<a href="{{ route('impersonate', $user) }}" class="dropdown-item text-gray-500 impersonate">
<i class="fas fa-user-secret mr-2"></i>
@lang('Impersonate')
</a>
@endCanBeImpersonated
</div>
</div>
<a href="{{ route('users.edit', $user) }}"
class="btn btn-icon edit"
title="@lang('Edit User')"
data-toggle="tooltip" data-placement="top">
<i class="fas fa-edit"></i>
</a>
<a href="{{ route('users.destroy', $user) }}"
class="btn btn-icon"
title="@lang('Delete User')"
data-toggle="tooltip"
data-placement="top"
data-method="DELETE"
data-confirm-title="@lang('Please Confirm')"
data-confirm-text="@lang('Are you sure that you want to delete this user?')"
data-confirm-delete="@lang('Yes, delete him!')">
<i class="fas fa-trash"></i>
</a>
</td>
</tr>
@@ -0,0 +1,62 @@
@php
$route = 'enable';
$needsVerification = session('tab') == '2fa' && $user->needsTwoFactorVerification();
if ($needsVerification) {
$route = 'verify';
} elseif ($user->twoFactorEnabled()) {
$route = 'disable';
}
@endphp
<form action="{{ route("two-factor.{$route}") }}" method="POST" id="two-factor-form">
@csrf
<input type="hidden" name="user" value="{{ $user->id }}">
@if (!$user->twoFactorEnabled() && !$needsVerification)
<button type="submit"
class="btn btn-primary"
data-toggle="loader"
data-loading-text="@lang('Enabling...')">
@lang('Enable')
</button>
@else
@if ($user->twoFactorEnabled())
<button type="submit"
class="btn btn-danger mt-2"
data-toggle="loader"
data-loading-text="@lang('Disabling...')">
<i class="fa fa-close"></i>
@lang('Disable')
</button>
@else
<h3>@lang("Please finish configuring Two-Factor authentication below.")</h3>
<div class="my-3 font-medium text-sm font-weight-bold">
@lang("When two factor authentication is enabled, you will be prompted for a secure, random token during authentication.")
@lang("You may retrieve this token from your phone's Authenticator application.")
</div>
<div class="my-3 font-medium text-sm">
@lang("To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.")
</div>
<div class="my-5 d-flex align-items-center justify-content-center w-100">
{!! $user->twoFactorQrCodeSvg() !!}
</div>
<input type="text"
name="code"
id="code"
class="form-control input-solid mb-4"
placeholder="@lang('Code')"
value="{{ old('code') }}">
<button type="submit"
class="btn btn-primary mr-2"
data-toggle="loader"
data-loading-text="@lang('Confirming...')">
<i class="fa fa-close"></i>
@lang('Confirm')
</button>
@endif
@endif
</form>