Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
2022-10-24 01:01:10 +01:00
parent 614410e7b7
commit 0bc6c20a6d
166 changed files with 4250 additions and 1833 deletions

View File

@@ -14,7 +14,7 @@
@section('content')
<x-modal id="confirmForceEventDispatch" modal-label="confirmForceEventDispatch" modal-title="{{__('messages.choose_app')}}" include-close-button="true">
<x-modal id="confirmForceEventDispatch" modal-label="confirmForceEventDispatch" modal-title="{{__('Choose an application to override')}}" include-close-button="true">
<p>{{__('Please choose an application to force approve')}}</p>
<p>{{ __('Note that this process overrides users\'s votes.') }}</p>
@@ -35,7 +35,7 @@
</form>
<x-slot name="modalFooter">
<button type="button" class="btn btn-danger" onclick="document.getElementById('forceEval').submit()">{{__('messages.dispatch_event')}}</button>
<button type="button" class="btn btn-danger" onclick="document.getElementById('forceEval').submit()">{{__('Override now')}}</button>
</x-slot>
</x-modal>
@@ -70,45 +70,64 @@
<div class="col">
<div class="alert alert-warning">
<i class="fa fa-exclamation-triangle"></i> <b>{{__('Warning')}}</b>
<p>{{__('These tools were intended for development purposes. Unless you know exactly what each command does, we recommend you don\'t use any of them.')}}</p>
</div>
</div>
</div>
<div class="row">
<div class="col text-center">
<x-card id="tools" card-title="Commands & Actions" footer-style="text-center">
<div class="row mt-5">
<div class="col">
<x-card id="appCommands" card-title="{{ __('Application-specific commands') }}" footer-style="text-muted">
<x-slot name="cardHeader">
</x-slot>
<button data-toggle="tooltip" data-placement="top" title="{{ __('Dispatches an approval event for the selected application') }}" type="button" class="btn btn-primary" onclick="$('#confirmForceEventDispatch').modal('show')"><i class="fas fa-bullhorn"></i> {{ __('Dispatch approval event') }}</button>
<button data-toggle="tooltip" data-placement="top" title="{{ __('Dispatches a rejection event for the selected application') }}" type="button" class="btn btn-primary ml-2" onclick="$('#confirmDispatchRejection').modal('show')"><i class="fas fa-bullhorn"></i> {{ __('Dispatch rejection event') }}</button>
<form name="evalvotes" method="post" action="{{ route('devForceEvaluateVotes') }}" class="d-inline">
@csrf
<button data-toggle="tooltip" data-placement="top" title="{{ __('Counts and processes all backlogged votes, for all applications.') }}" type="submit" class="btn btn-primary ml-3"><i class="fas fa-redo"></i> {{ __('Count all votes now') }}</button>
</form>
<form name="purgebans" method="post" action="{{ route('devPurgeExpired') }}" class="d-inline">
@csrf
@method('DELETE')
<button data-toggle="tooltip" data-placement="top" title="{{ __('Cleans the database of old, expired suspensions, therefore unbanning certain users.') }}" type="submit" class="btn btn-primary ml-3"><i class="far fa-trash-alt"></i> {{ __('Purge expired bans') }}</button>
</form>
<div class="form-group d-block">
<button type="button" class="mb-3 btn btn-info" onclick="$('#confirmForceEventDispatch').modal('show')"><i class="fas fa-check-circle"></i> {{ __('Application Override: Approve') }}</button>
<button type="button" class="mt-3 btn btn-info" onclick="$('#confirmDispatchRejection').modal('show')"><i class="fas fa-ban"></i> {{ __('Application Override: Decline') }}</button>
</div>
<x-slot name="cardFooter">
<p class="text-muted"> .</p>
<p><i class="fas fa-info-circle"></i> {{ __('This panel allows you to override statuses for specific applications. Overriding them will trigger the correct events as well. Note that this system entirely ignores the voting system because these statuses ignore all other logic.') }}</p>
</x-slot>
</x-card>
</x-card>
</div>
<div class="col">
<x-card id="appCleaning" card-title="{{ __('Housekeeping') }}" footer-style="text-muted">
<x-slot name="cardHeader">
</x-slot>
<div class="form-group d-block">
<form method="post" action="{{ route('devForceEvaluateVotes') }}">
@csrf
<button type="submit" class="mb-3 btn btn-info"><i class="fas fa-vote-yea"></i> {{ __('Run task: process pending votes') }}</button>
</form>
<form method="post" action="{{ route('devPurgeExpiredSuspensions') }}">
@csrf
@method('DELETE')
<button type="submit" class="mb-3 btn btn-info"><i class="fas fa-users-cog"></i> {{ __('Run task: lift expired suspensions') }}</button>
</form>
<form method="post" action="{{ route('devPurgeExpiredAbsences') }}">
@csrf
@method('DELETE')
<button type="submit" class="mb-3 d-block btn btn-info"><i class="fas fa-calendar-minus"></i> {{ __('Run task: end expired absence requests') }}</button>
</form>
</div>
<x-slot name="cardFooter">
<p><i class="fas fa-info-circle"></i> {{ __('Housekeeping jobs usually run once every day, but if one of them has failed for some reason, you can manually run them here.') }}</p>
</x-slot>
</x-card>
</div>
</div>
@stop

View File

@@ -47,7 +47,7 @@
<div class="card-header">
<h4>{{__('messages.edt_action')}} {{ $title }}...</h4>
<h4>{{__('Editing :formTitle...', ['formTitle' => $title])}}</h4>
</div>

View File

@@ -93,15 +93,7 @@
<div class="col">
<!-- DEPRECATED! -->
<label for="permissionGroupName">{{__('Permission group')}}</label>
<input type="text" class="form-control" value="{{ $vacancy->permissionGroupName }}" id="permissionGroupName" disabled />
</div>
<div class="col">
<label for="discordRoleID">{{__('Discord role ID')}}</label>
<label for="discordRoleID">{{__('Comma-separated list of Discord role IDs')}}</label>
<input type="text" class="form-control" value="{{ $vacancy->discordRoleID }}" id="discordRoleID" disabled />
@@ -118,6 +110,18 @@
<label for="remainingSlots">{{__('Remaining slots')}}</label>
<input type="text" class="form-control" value="{{ $vacancy->vacancyCount }}" id="remainingSlots" name="vacancyCount" />
<label for="requiredAge">{{__('Minimum age')}}</label>
<input type="number" min="13" max="100" class="form-control" value="{{ $vacancy->requiredAge }}" id="requiredAge" name="requiredAge" />
<div class="form-check mt-4">
<input type="hidden" value="off" name="requireDiscordAccount">
<input class="form-check-input" type="checkbox" id="requireDiscordAccount" name="requireDiscordAccount" @if($vacancy->requiresDiscord) checked @endif>
<label class="text-bold form-check-label" for="requireDiscordAccount">
{{ __('Require a Discord account for users to apply') }}
</label>
<p class="text-muted"><i class="fas fa-info-circle"> </i> {{ __('This will redirect users to sign in with Discord before they are allowed to submit the form.') }}</p>
</div>
</div>

View File

@@ -65,13 +65,8 @@
<div class="row mt-3">
<div class="col">
<label for="pgroup">{{__('Permission group')}}</label>
<input rel="txtTooltip" title="{{__("The permission group from your server/network's permissions manager. Compatible with Luckperms and PEX (This feature is deprecated and will be removed on a future version).")}}" data-toggle="tooltip" data-placement="bottom" type="text" id="pgroup" name="permissionGroup" class="form-control">
</div>
<div class="col">
<label for="discordrole">{{__('Discord Role ID')}} (*)</label>
<input rel="txtTooltip" title="{{__("Discord Desktop: Go to your Account Settings > Appearance -> Advanced and toggle Developer Mode. On your server's roles tab, right click any role to copy it's ID.")}}" data-toggle="tooltip" data-placement="bottom" type="text" id="discordrole" name="discordRole" class="form-control">
<label for="discordrole">{{__('Discord Role ID(s) (optional)')}}</label>
<input rel="txtTooltip" title="{{__("Enter one or more comma-separated role IDs to be given to successful candidates")}}" data-toggle="tooltip" data-placement="bottom" type="text" id="discordrole" name="discordRole" class="form-control">
</div>
</div>
@@ -93,7 +88,17 @@
<label for="vacancyCount">{{__('Free slots')}}</label>
<input rel="txtTooltip" title="{{__('The number of free slots decreases each time an applicant is approved for this vacancy.')}}" data-toggle="tooltip" data-placement="bottom" type="text" id="vacancyCount" name="vacancyCount" class="form-control">
<label for="requiredAge">{{__('Minimum age')}}</label>
<input rel="txtTooltip" title="{{__('How old must users be to apply for this vacancy?')}}" data-toggle="tooltip" data-placement="bottom" type="number" min="13" max="100" id="requiredAge" name="requiredAge" class="form-control">
<div class="form-check mt-4">
<input type="hidden" value="off" name="requireDiscordAccount">
<input class="form-check-input" type="checkbox" id="requireDiscordAccount" name="requireDiscordAccount">
<label class="text-bold form-check-label" for="requireDiscordAccount">
{{ __('Require a Discord account for users to apply') }}
</label>
</div>
</div>
</form>

View File

@@ -78,8 +78,7 @@
<thead>
<tr>
<th>{{__('Name')}}</th>
<th>{{ __('Rank') }}</th>
<th>{{__('Status')}}</th>
<th>{{ __('Role') }}</th>
<th>{{__('Registration date')}}</th>
<th>{{__('Actions')}}</th>
</tr>
@@ -98,12 +97,10 @@
<span class="badge-warning badge"><i class="fas fa-user"></i> {{ __('Member') }}</span>
@endif
</td>
<td>
<x-account-status user-id="{{ $user->id }}"></x-account-status>
</td>
<td>{{$user->created_at}}</td>
<td>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showSingleProfile', ['user' => $user->id])}}'"><i class="fa fa-eye"></i></button>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showSingleProfile', ['user' => $user->id])}}'"><i class="fa fa-eye"></i> {{ __('View') }}</button>
<a class="ml-2 btn btn-sm btn-warning" href="{{ route('manageUser', ['user' => $user->id]) }}"><i class="fas fa-wrench"></i> {{ __('Manage') }}</a>
</td>
</tr>

View File

@@ -0,0 +1,92 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('Account age update'))
@section('content_header')
<h1>{{__('My account')}} / {{__('Apply')}} / {{__('Account age update')}}</h1>
@stop
@section('js')
@if (session()->has('success'))
<script>
toastr.success("{{session('success')}}")
</script>
@elseif(session()->has('error'))
<script>
toastr.error("{{session('error')}}")
</script>
@endif
@if(!$isEligibleForApplication)
<script>toastr.error("{{__('Application access denied')}}")</script>
@endif
<script>
flatpickr('#dob', {
altInput: true,
altFormat: "F j, Y",
dateFormat: "Y-m-d",
});
</script>
@stop
@section('content')
<div class="row">
<div class="col">
<x-alert title="{{ __('Date of birth required to continue') }}" alert-type="warning" icon="fa fa-exclamation-triangle">
{{ __('Because you signed up using Discord, your age was not registered in our system. In order to continue applying for this position, please add your date of birth below. Please note that we don\'t accept registrations from users under 13 years of age.') }}
</x-alert>
<x-alert title="{{ __('Warning') }}" alert-type="danger" icon="fas fa-user-lock">
{{ __('You can\'t change your date of birth after first setting it.') }}
</x-alert>
</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-3">
<x-card id="updateAge" card-title="Account age update" footer-style="">
<x-slot:cardHeader></x-slot:cardHeader>
<form id="addDob" method="post" action="{{ route('add-dob') }}">
@csrf
@method('PATCH')
<div class="form-group mb-4 mt-2">
<label for="dob" class="sr-only">{{__('Date of birth')}}</label>
<input type="text" class="form-control" name="dob" id="dob" placeholder="Date of birth">
<span class="text-muted text-sm"><i class="fas fa-info-circle"></i> {!! __("<b>Why do we need this?</b> We use your age information to make sure you meet age requirements for certain positions, and to make sure that everyone is compliant with our terms of service.") !!} </span>
</div>
</form>
<x-slot:cardFooter>
<button onclick="$('#addDob').submit()" type="button" class="btn btn-success"><i class="fas fa-save"></i> {{ __('Save and continue') }}</button>
</x-slot:cardFooter>
</x-card>
</div>
</div>
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop

View File

@@ -80,7 +80,7 @@
<p class="text-bold">{{__('You are applying for: :vacancyNameValue', ['vacancyNameValue' => $vacancy->vacancyName])}}</p>
<p>{{__("We're glad you've decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.")}}</p>
<p>{{__('Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :ageUpperLimitSettingValue years old.', ['ageUpperLimitSettingValue' => '16']) }}.</p>
<p>{{__('Please fill out the form below. Keep all answers concise and complete. Please keep in mind that you must be at least :ageUpperLimitSettingValue years old to apply.', ['ageUpperLimitSettingValue' => $vacancy->requiredAge]) }}</p>
<p class="text-bold">{{__('Asking about your application will result in instant denial. Everything you need to know is here.')}}.</p>
<p><i class="fab fa-markdown"></i> {!! __('All fields support <a target="_blank" href="https://www.markdownguide.org/cheat-sheet/">Markdown</a>') !!}</p>
@@ -91,6 +91,18 @@
</div>
@if ($vacancy->requiresDiscord && Auth::user()->hasDiscordConnection())
<div class="row mt-3">
<div class="col">
<h5>{!! __(':preIcon Applying as :icon :discordUsername', ['preIcon' => '<i class="fas fa-check-circle" style="color: green;"></i>', 'icon' => '<i class="fab fa-discord" style="color: #5865F2"></i>', 'discordUsername' => Auth::user()->username]) !!}</h5>
</div>
</div>
@endif
<div class="row">

View File

@@ -3,7 +3,7 @@
@section('title', config('app.name'))
@section('content_header')
<h1>{{config('app.name')}} / {{__('messages.dashboard')}}</h1>
<h1>{{config('app.name')}} / {{__('Dashboard')}}</h1>
@stop
@section('js')
@@ -67,6 +67,10 @@
</div>
@else
@if($vacancy->requiresDiscord)
<p class="text-muted"><i class="fas fa-info-circle"></i> {{ __('Note: to apply for this position, you must sign in with your Discord account beforehand.') }}</p>
@endif
{!! $vacancy->vacancyFullDescription !!}
<p class="text-sm text-muted">
{{__('Last updated @ :vacancyUpdatedTimeValue', ['vacancyUpdatedTimeValue' => $vacancy->updated_at]) }}
@@ -113,7 +117,7 @@
<div class="icon">
<i class="fas fa-sync"></i>
</div>
<a href="{{ route('showUserApps') }}" class="small-box-footer">{{__('messages.open')}} <i class="fas fa-arrow-circle-right"></i></a>
<a href="{{ route('showUserApps') }}" class="small-box-footer">{{__('Open')}} <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
@@ -257,7 +261,12 @@
<div class="card-footer text-center">
<button type="button" class="btn btn-primary btn-sm" onclick="window.location.href='{{ route('renderApplicationForm', ['vacancySlug' => $vacancy->vacancySlug]) }}'">{{__('Apply')}}</button>
@if ($vacancy->requiresDiscord && !Auth::user()->hasDiscordConnection())
<button type="button" style="background-color: #5865F2" class="btn btn-primary btn-sm" onclick="window.location.href='{{ route('renderApplicationForm', ['vacancySlug' => $vacancy->vacancySlug]) }}'"><i style="color: white" class="fab fa-discord"></i> {{__('Apply with Discord')}}</button>
@else
<button type="button" class="btn btn-primary btn-sm" onclick="window.location.href='{{ route('renderApplicationForm', ['vacancySlug' => $vacancy->vacancySlug]) }}'">{{__('Apply')}}</button>
@endif
<button type="button" class="btn btn-warning btn-sm" onclick="$('#{{ $vacancy->vacancySlug }}-details').modal('show')">{{__('Learn More')}}</button>
</div>
@@ -270,33 +279,6 @@
@endif
</div>
<div class="row mt-4">
<div class="col">
<div class="card">
<div class="card-header">
<h4>
<i class="fa fa-calendar"></i>&nbsp;&nbsp;{{__('Your upcoming interviews')}} (<i>{{__('Coming soon')}}</i>)
</h4>
</div>
<div class="card-body">
<div id="upcomingCalendar"></div>
</div>
</div>
</div>
</div>
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')

View File

@@ -1,110 +0,0 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('User Directory'))
@section('content_header')
<h4>{{__('Users')}} / {{__('Directory')}}</h4>
@stop
@section('js')
<script src="/js/app.js"></script>
<x-global-errors></x-global-errors>
@stop
@section('css')
<link rel="stylesheet" href="/css/directory.css" />
@stop
@section('content')
@if (Auth::user()->can('profiles.view.others'))
<div class="row">
@foreach ($users as $user)
<div class="col-md-4">
<div class="card card-widget widget-user">
<div class="widget-user-header bg-secondary">
<h3 class="widget-user-username">{{ $user->name }}</h3>
<h5 class="widget-user-desc">{{ $user->profile->profileShortBio }}</h5>
</div>
<div class="widget-user-image">
@if($user->profile->avatarPreference == 'gravatar')
<img class="profile-user-img elevation-2 img-fluid img-circle" src="https://gravatar.com/avatar/{{md5($user->email)}}" alt="{{ __('User profile picture') }}">
@else
<img class="profile-user-img elevation-2 img-fluid img-circle" src="https://crafatar.com/avatars/{{$user->uuid}}" alt="{{ __('User profile picture') }}">
@endif
</div>
<div class="card-footer text-center">
@if (Auth::user()->is($user))
<div class="user-indicator mb-2">
<span class="badge badge-success">{{__("It's you!")}}</span>
</div>
@endif
<div class="roles mb-2">
@foreach ($user->roles as $role)
<span class="badge badge-secondary mr-2">{{ucfirst($role->name)}}</span>
@endforeach
</div>
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('showSingleProfile', ['user' => $user->id]) }}'"><i class="fa fa-eye"></i> {{__('Profile')}}</button>
</div>
</div>
<!-- /.widget-user -->
</div>
@endforeach
</div>
<div clsas="row mt-4">
<div class="col">
<div class="card">
<div class="card-body text-center">
<div class="links">
{{ $users->links() }}
</div>
</div>
</div>
</div>
</div>
@else
<div class="alert alert-danger">
<p>
{{__("We're sorry, but you do not have permission to access this web page.")}}
</p>
</div>
@endif
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop

View File

@@ -0,0 +1,451 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('Account Management'))
@section('content_header')
<h4>{{ __('Users / Accounts / :username / Manage', ['username' => $user->name]) }}</h4>
@stop
@section('js')
<script src="/js/app.js"></script>
<x-global-errors></x-global-errors>
@stop
@section('content')
@if($user->has2FA())
<x-modal id="resetTwoFactorModal" modal-label="resetTwoFactor" modal-title="{{ __('Verify your identity') }}" include-close-button="true">
<p>{{ __('Resetting an account\'s two-factor authentication secret will automatically notify the account holder. Additionally, the user\'s password will also be forcefully reset during this process. Please confirm this action by verifying your identity below.') }}</p>
<form id="resetAccountTwofaForm" method="POST" action="{{ route('reset-twofa', ['user' => $user]) }}">
@csrf
@method('PATCH')
<x-confirm-password>
{{ __('Please re-enter your password.') }}
</x-confirm-password>
<x-confirm-second-factor>
{{ __('Please enter your two-factor authentication code.') }}
</x-confirm-second-factor>
</form>
<x-slot:modalFooter>
<button onclick="$('#resetAccountTwofaForm').submit()" type="button" class="btn btn-warning"><i class="fas fa-check"></i> {{ __('Re-authenticate and verify') }}</button>
</x-slot:modalFooter>
</x-modal>
@endif
@if($user->hasPassword())
<x-modal id="resetAccountPasswordModal" modal-label="resetAccountPassword" modal-title="{{ __('Verify your identity') }}" include-close-button="true">
<p>{{ __('Forcing a password reset will automatically notify the account holder and send them a password reset link. Please confirm this action by verifying your identity below.') }}</p>
<form id="resetAccountPasswordForm" method="POST" action="{{ route('force-reset-user', ['user' => $user]) }}">
@csrf
@method('patch')
<x-confirm-password>
{{ __('Re-entering your password is required to confirm sensitive administration actions.') }}
</x-confirm-password>
<x-confirm-second-factor>
{{ __('Two-factor authentication is required to confirm sensitive administration actions.') }}
</x-confirm-second-factor>
</form>
<x-slot name="modalFooter">
<button onclick="$('#resetAccountPasswordForm').submit()" type="button" class="btn btn-warning"><i class="fas fa-check"></i> {{ __('Re-authenticate and verify') }}</button>
</x-slot>
</x-modal>
@endif
<x-modal id="banAccountModal" modal-label="banAccount" modal-title="{{__('Please confirm')}}" include-close-button="true">
<p>{{__("Please confirm that you want to suspend this account. You'll need to add a reason and expiration date to confirm this.")}}</p>
<form id="banAccountForm" name="banAccount" method="POST" action="{{route('banUser', ['user' => $user->id])}}">
@csrf
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<div class="row">
<div class="col">
<label for="reason">{{__('Reason')}}</label>
<input type="text" name="reason" id="reason" class="form-control" placeholder="{{__('e.g. Spamming')}}">
</div>
<div class="col">
<label for="duration">{{ __('Duration') }}</label>
<input type="text" name="duration" id="duration" class="form-control" placeholder="{{ __('in days') }}">
</div>
</div>
<div class="mt-2">
<input type="hidden" name="suspensionType" value="off">
<label for="suspensionType">{{ __('Suspension type') }}</label><br>
<input type="checkbox" id="suspensionType" name="suspensionType" checked data-toggle="toggle" data-on="Temporary" data-off="Permanent" data-onstyle="success" data-offstyle="danger" data-width="130" data-height="40">
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('Temporary suspensions will be automatically lifted. The suspension note is visible to all users. Suspended users will not be able to login or register.') }}</p>
</div>
</form>
<x-slot name="modalFooter">
<button onclick="$('#banAccountForm').submit()" id="banAccountButton" type="button" class="btn btn-danger" {{ ($demoActive) ? 'disabled' : '' }} ><i class="fa fa-gavel"></i> {{__('Confirm')}}</button>
</x-slot>
</x-modal>
@if (!Auth::user()->is($user) && $user->isStaffMember())
<x-modal id="terminateUser" modal-label="terminateUser" modal-title="{{__('Please Confirm')}}" include-close-button="true">
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<p><i class="fa fa-exclamation-triangle"></i> <b>{{__('You are about to terminate a recruited staff member')}}</b></p>
<p>
{{__('Terminating a staff member will remove their privileges on the application management site and connected integrations configured for the vacancy they applied for.')}}
</p>
<p>
<b>{{__('THIS PROCESS IS IRREVERSIBLE AND IMMEDIATE')}}</b>
</p>
<x-slot name="modalFooter">
<form method="POST" action="{{route('terminateStaffMember', ['user' => $user->id])}}" id="terminateUserForm">
@csrf
@method('PATCH')
<button type="submit" class="btn btn-warning" {{ ($demoActive) ? 'disabled' : '' }}><i class="fas fa-exclamation-circle"></i> {{__('Confirm')}}</button>
</form>
</x-slot>
</x-modal>
@endif
<x-modal id="deleteAccount" modal-label="deleteAccount" modal-title="{{__('Confirm')}}" include-close-button="true">
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<p><i class="fa fa-exclamation-triangle"></i><b> {{__('WARNING: This is a potentially destructive action!')}}</b></p>
<p>{{__("Deleting a user's account is an irreversible process. Historic and current applications, votes, and profile content, as well as any personally identifiable information will be immediately erased.")}}</p>
<form id="deleteAccountForm" method="POST" action={{route('deleteUser', ['user' => $user->id])}}>
@csrf
@method('DELETE')
<label for="promptConfirm">{{__('Type to confirm: ')}} "DELETE ACCOUNT"</label>
<input type="text" name="confirmPrompt" class="form-control" placeholder="{{__('Please type the above text')}}">
</form>
<x-slot name="modalFooter">
<button type="button" class="btn btn-danger" {{ ($demoActive) ? 'disabled' : '' }} onclick="document.getElementById('deleteAccountForm').submit()"><i class="fa fa-trash"></i> {{strtoupper(__('Confirm'))}}</button>
</x-slot>
</x-modal>
<x-modal id="editUser" modal-label="editUser" modal-title="{{__('Edit account')}}" include-close-button="true">
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<form id="updateUserForm" method="post" action="{{ route('updateUser', ['user' => $user->id]) }}">
@csrf
@method('PATCH')
<label for="email">{{__('Email')}}</label>
<input {{ ($demoActive) ? 'disabled' : '' }} id="email" type="text" name="email" class="form-control" required value="{{ $user->email }}" />
<label for="name">{{__('Name')}}</label>
<input {{ ($demoActive) ? 'disabled' : '' }} id="name" type="text" name="name" class="form-control" required value="{{ $user->name }}" />
@if ($requireLicense)
<label for="uuid">{{ __('Mojang UUID (deprecated)') }}</label>
<input {{ ($demoActive) ? 'disabled' : '' }} id="uuid" type="text" name="uuid" class="form-control" required value="{{ $user->uuid ?? "disabled" }}" />
<p class="text-muted text-sm">
<i class="fas fa-exclamation-triangle"></i> {{__('If the setting "Require Valid Game License" is activated, editing this field may have unintended consequences. Proceed with caution.')}}
</p>
@endif
<div class="form-group mt-3">
<label>{{__('Roles')}}</label>
<table class="table table-borderless">
<tbody>
@foreach($roles as $roleName => $status)
<tr>
<th><input {{ ($demoActive) ? 'disabled' : '' }} type="checkbox" name="roles[]" value="{{ $roleName }}" {{ ($status) ? 'checked' : '' }}></th>
<td class="col-md-2">{{ ucfirst($roleName) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</form>
<x-slot name="modalFooter">
<button type="button" {{ ($demoActive) ? 'disabled' : '' }} class="btn btn-warning" onclick="$('#updateUserForm').submit()"><i class="fa fa-exclamation-cicle"></i> {{__('Save changes')}}</button>
</x-slot>
</x-modal>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<h3><i class="fas fa-user-alt"></i> {{ __('Personal details') }}</h3>
</div>
<div class="card-body">
<div class="row">
<div class="col">
<label for="uname">{{ __('Account name') }}</label>
<input id="uname" type="text" class="form-control" value="{{ $user->name }}" disabled>
</div>
<div class="col">
<label for="uemail">{{ __('Account email') }}</label>
<input id="uemail" type="email" class="form-control" value="{{ $user->email }}" disabled>
</div>
</div>
<div class="row">
<div class="col">
<label for="uip">{{ __('Current IP') }}</label>
<input type="text" class="form-control" id="uip" value="{{ $user->currentIp }}" disabled>
</div>
<div class="col">
<label for="uip">{{ __('Registration IP') }}</label>
<input type="text" class="form-control" id="uip" value="{{ (empty($user->registrationIp)) ? __('Unavailable') : $user->registrationIp }}" disabled>
</div>
</div>
<div class="row">
<div class="col">
<label for="uregdate">{{ __(' Registered at') }}</label>
<input id="uregdate" class="form-control" type="text" value="{{ $user->created_at }} ({{ $user->created_at->diffForHumans() }})" disabled>
</div>
</div>
<div class="mt-2 mb-2">
<label>{{ __('Account indicators') }}</label>
<x-account-status has-password="{{ $hasPassword }}" has-discord="{{ $hasDiscord }}" is-verified="{{ $isVerified }}" is-locked="{{ $isLocked }}" is-suspended="{{ $isSuspended }}" has2-f-a="{{ $has2FA }}" />
</div>
@if($user->hasDiscordConnection())
<div class="mt-2">
<h5><i class="fas fa-check-circle text-success"></i> {!! __('Connected to Discord as <i style="color: #5865F2" class="fab fa-discord"></i> :tag', ['tag' => $user->username]) !!}</h5>
<p class="text-muted">{{ __('User ID: :discordUserID', ['discordUserID' => $user->discord_user_id]) }}</p>
</div>
@endif
</div>
<div class="card-footer">
<button onclick="$('#editUser').modal('show')" type="button" class="btn btn-warning"><i class="fas fa-pencil-alt"></i> {{ __('Edit account details') }}</button>
</div>
</div>
</div>
</div>
<div class="row mt-5">
<div class="col">
<div class="card">
<div class="card-header">
<h3><i class="fas fa-clipboard"></i> {{ __('Application history') }}</h3>
</div>
<div class="card-body">
@if (!$applications->isEmpty())
<table class="table table-borderless" style="whitespace: nowrap">
<thead>
<tr>
<th>#</th>
<th>{{__('Status')}}</th>
<th>{{ __('Vacancy') }}</th>
<th>{{__('Date')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
<tbody>
@foreach($applications as $application)
<tr>
<td>{{ $application->id }}</td>
<td>
@switch($application->applicationStatus)
@case('STAGE_SUBMITTED')
<span class="badge badge-primary"><i class="far fa-clock"></i> {{__('Outstanding (Submitted)')}}</span>
@break
@case('STAGE_PEERAPPROVAL')
<span class="badge badge-warning"><i class="fas fa-vote-yea"></i> {{__('Peer Review')}}</span>
@break
@case('STAGE_INTERVIEW')
<span class="badge badge-warning"><i class="fas fa-microphone-alt"></i> {{__('Interview')}}</span>
@break
@case('STAGE_INTERVIEW_SCHEDULED')
<span class="badge badge-warning"><i class="far fa-clock"></i>{{__('Interview Scheduled')}}</span>
@break
@case('APPROVED')
<span class="badge badge-success"><i class="fas fa-check"></i> {{__('Approved')}}</span>
@break
@case('DENIED')
<span class="badge badge-danger"><i class="fas fa-times"></i> {{__('Denied')}}</span>
@break;
@default
<span class="badge badge-secondary"><i class="fas fa-question-circle"></i> {{__('Denied')}}</span>
@endswitch
</td>
<td>{{ $application->response->vacancy->vacancyName }}</td>
<td>{{ $application->created_at }} ({{ $application->created_at->diffForHumans() }})</td>
<td>
<x-button id="view" link="{{ route('showUserApp', ['application' => $application->id]) }}" icon="fas fa-eye" target="_blank" color="success" size="sm">
{{ __('View') }}
</x-button>
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<x-alert alert-type="warning" icon="fas fa-exclamation-triangle" title="{{ __('No applications') }}">
{{ __('This user has not submitted any applications yet.') }}
</x-alert>
@endif
</div>
</div>
</div>
</div>
<div class="row mt-5 mb-5">
<div class="col">
<div class="card">
<div class="card-header">
<h3><i class="fas fa-shield-alt"></i> {{ __('Admin actions') }}</h3>
</div>
<div class="card-body">
@if ($isSuspended)
<x-alert extra-styling="mb-4" alert-type="danger" icon="fa fa-exclamation-triangle" title="{{ __('Account suspended') }}" >
<p><i class="fas fa-arrow-circle-right"></i>&nbsp;{{ __('This account has been :suspensionType suspended.', ['suspensionType' => (is_null($suspensionDuration)) ? __('permanently') : __('temporarily') ]) }}</p>
<p><i class="fas fa-arrow-circle-right"></i>&nbsp;{!! __('<b>Reason: </b>:reason', ['reason' => $suspensionReason]) !!}</p>
@if (!is_null($suspensionDuration))
<p><i class="fas fa-arrow-circle-right"></i>&nbsp;{!! __('<b>Suspension expires: </b>:duration', ['duration' => $suspensionDuration]) !!}</p>
@endif
</x-alert>
@endif
@if (!$isSuspended)
<button onclick="$('#banAccountModal').modal('show')" type="button" class="btn btn-warning mr-3"><i class="fas fa-user-slash"></i> {{ __('Suspend account') }}</button>
@else
<form class="d-inline" method="post" action="{{ route('unbanUser', ['user' => $user]) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-success mr-2"><i class="fas fa-user"></i> {{ __('Unsuspend account') }}</button>
</form>
@endif
@if($user->hasPassword())
<button onclick="$('#resetAccountPasswordModal').modal('show')" class="btn-danger btn mr-3" type="button"><i class="fas fa-key"></i> {{ __('Force password reset') }}</button>
@else
<button disabled class="btn-danger btn mr-3" type="button"><i class="fas fa-key"></i> {{ __('Force password reset') }}</button>
@endif
@if($user->has2FA())
<button onclick="$('#resetTwoFactorModal').modal('show')" class="btn-danger btn mr-3" type="button"><i class="fas fa-unlock"></i> {{ __('Reset MFA') }}</button>
@endif
<button onclick="$('#deleteAccount').modal('show')" type="button" class="btn btn-danger"><i class="fas fa-trash"></i> {{ __('Delete account') }}</button>
</div>
</div>
</div>
</div>
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop

View File

@@ -24,7 +24,7 @@
<span><i class="fa fa-ban"></i> <b>{{__('This account has been suspended :suspensionTypeValue', ['suspensionTypeValue' => ($suspensionInfo['isPermanent']) ? __('permanently.') : __('until :date.', ['date' => $suspensionInfo['bannedUntil']])]) }}</b></span>
<p>{{__('This user has been suspended by the admins. Admins suspend accounts for a variety of reasons, including spam.')}}</p>
<p>{{__('This user has been suspended.')}}</p>
<p>
<i class="fas fa-chevron-right"></i> <b>{{$suspensionInfo['reason']}}</b>
@@ -34,256 +34,6 @@
@endif
@if (Auth::user()->hasRole('admin'))
<x-modal id="banAccountModal" modal-label="banAccount" modal-title="{{__('Please confirm')}}" include-close-button="true">
<p>{{__("Please confirm that you want to suspend this account. You'll need to add a reason and expiration date to confirm this.")}}</p>
<form id="banAccountForm" name="banAccount" method="POST" action="{{route('banUser', ['user' => $profile->user->id])}}">
@csrf
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<div class="row">
<div class="col">
<label for="reason">{{__('Public note')}}</label>
<input type="text" name="reason" id="reason" class="form-control" placeholder="{{__('e.g. Spamming')}}">
</div>
<div class="col">
<label for="duration">{{ __('Duration') }}</label>
<input type="text" name="duration" id="duration" class="form-control" placeholder="{{ __('in days') }}">
</div>
</div>
<div class="mt-2">
<input type="hidden" name="suspensionType" value="off">
<label for="suspensionType">{{ __('Suspension type') }}</label><br>
<input type="checkbox" id="suspensionType" name="suspensionType" checked data-toggle="toggle" data-on="Temporary" data-off="Permanent" data-onstyle="success" data-offstyle="danger" data-width="130" data-height="40">
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('Temporary suspensions will be automatically lifted. The suspension note is visible to all users. Suspended users will not be able to login or register.') }}</p>
</div>
</form>
<x-slot name="modalFooter">
<button id="banAccountButton" type="button" class="btn btn-danger" {{ ($demoActive) ? 'disabled' : '' }} ><i class="fa fa-gavel"></i> {{__('Confirm')}}</button>
</x-slot>
</x-modal>
@if (!Auth::user()->is($profile->user) && $profile->user->isStaffMember())
<x-modal id="terminateUser" modal-label="terminateUser" modal-title="{{__('Please Confirm')}}" include-close-button="true">
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<p><i class="fa fa-exclamation-triangle"></i> <b>{{__('You are about to terminate a recruited staff member')}}</b></p>
<p>
{{__('Terminating a staff member will remove their privileges on the application management site and connected integrations configured for the vacancy they applied for.')}}
</p>
<p>
<b>{{__('THIS PROCESS IS IRREVERSIBLE AND IMMEDIATE')}}</b>
</p>
<x-slot name="modalFooter">
<form method="POST" action="{{route('terminateStaffMember', ['user' => $profile->user->id])}}" id="terminateUserForm">
@csrf
@method('PATCH')
<button type="submit" class="btn btn-warning" {{ ($demoActive) ? 'disabled' : '' }}><i class="fas fa-exclamation-circle"></i> {{__('Confirm')}}</button>
</form>
</x-slot>
</x-modal>
@endif
<x-modal id="deleteAccount" modal-label="deleteAccount" modal-title="{{__('messages.reusable.confirm')}}" include-close-button="true">
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<p><i class="fa fa-exclamation-triangle"></i><b> {{__('WARNING: This is a potentially destructive action!')}}</b></p>
<p>{{__("Deleting a user's account is an irreversible process. Historic and current applications, votes, and profile content, as well as any personally identifiable information will be immediately erased.")}}</p>
<form id="deleteAccountForm" method="POST" action={{route('deleteUser', ['user' => $profile->user->id])}}>
@csrf
@method('DELETE')
<label for="promptConfirm">{{__('Type to confirm: ')}} "DELETE ACCOUNT"</label>
<input type="text" name="confirmPrompt" class="form-control" placeholder="{{__('Please type the above text')}}">
</form>
<x-slot name="modalFooter">
<button type="button" class="btn btn-danger" {{ ($demoActive) ? 'disabled' : '' }} onclick="document.getElementById('deleteAccountForm').submit()"><i class="fa fa-trash"></i> {{strtoupper(__('Confirm'))}}</button>
</x-slot>
</x-modal>
<x-modal id="ipInfo" modal-label="ipInfo" modal-title="{{__('IP Address Information')}}" include-close-button="true">
<h4 class="text-center">{{__('Search results')}}</h4>
@if (!isset($ipInfo->message))
<table class="table table-borderless">
<tbody>
<tr>
<th>{{__('Origin country')}}</th>
<td>{{$ipInfo->country_name ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('State/Province')}}</th>
<td>{{$ipInfo->state_prov ?? 'None'}}</td>
</tr>
<tr>
<th>{{__('District (if any)')}}</th>
<td>{{$ipInfo->district ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('City')}}</th>
<td>{{$ipInfo->city ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('Postal code')}}</th>
<td>{{$ipInfo->zipcode ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('Geographical coordinates')}}</th>
<td>{{$ipInfo->latitude ?? 0}}, {{$ipInfo->longitude ?? 0}}</td>
</tr>
<tr>
<th>{{__('European?')}}</th>
<td>{{($ipInfo->is_eu) ? __('Yes') : __('No')}}</td>
</tr>
<tr>
<th>{{__('ISP')}}</th>
<td>{{$ipInfo->isp ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('Organization')}}</th>
<td>{{$ipInfo->organization ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('Connection type (e.g. datacenter, home)')}}</th>
<td>{{$ipInfo->connection_type ?? 'N/A'}}</td>
</tr>
<tr>
<th>{{__('Timezone')}}</th>
<td>{{$ipInfo->time_zone->name ?? __('N/A')}}</td>
</tr>
</tbody>
</table>
@else
<div class="alert alert-danger">
<i class="fas fa-exclamation-circle"></i> <b>{{__("This query didn't return any results.")}}</b>
<p>
{{$ipInfo->message}}
</p>
</div>
@endif
<x-slot name="modalFooter"></x-slot>
</x-modal>
<x-modal id="editUser" modal-label="editUser" modal-title="{{__('messages.profile.edituser')}}" include-close-button="true">
@if($demoActive)
<div class="alert alert-danger">
<p class="font-weight-bold"><i class="fas fa-exclamation-triangle"></i> {{ __('This feature is disabled') }}</p>
</div>
@endif
<form id="updateUserForm" method="post" action="{{ route('updateUser', ['user' => $profile->user->id]) }}">
@csrf
@method('PATCH')
<label for="email">{{__('Email')}}</label>
<input {{ ($demoActive) ? 'disabled' : '' }} id="email" type="text" name="email" class="form-control" required value="{{ $profile->user->email }}" />
<label for="name">{{__('Name')}}</label>
<input {{ ($demoActive) ? 'disabled' : '' }} id="name" type="text" name="name" class="form-control" required value="{{ $profile->user->name }}" />
<label for="uuid">{{ __('Mojang UUID (deprecated)') }}</label>
<input {{ ($demoActive) ? 'disabled' : '' }} id="uuid" type="text" name="uuid" class="form-control" required value="{{ $profile->user->uuid ?? "disabled" }}" />
<p class="text-muted text-sm">
<i class="fas fa-exclamation-triangle"></i> {{__('messages.profile.edituser_consequence')}}
</p>
<div class="form-group mt-3">
<label>{{__('Roles')}}</label>
<table class="table table-borderless">
<tbody>
@foreach($roles as $roleName => $status)
<tr>
<th><input {{ ($demoActive) ? 'disabled' : '' }} type="checkbox" name="roles[]" value="{{ $roleName }}" {{ ($status) ? 'checked' : '' }}></th>
<td class="col-md-2">{{ ucfirst($roleName) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</form>
<x-slot name="modalFooter">
<button type="button" {{ ($demoActive) ? 'disabled' : '' }} class="btn btn-warning" onclick="$('#updateUserForm').submit()"><i class="fa fa-exclamation-cicle"></i> {{__('Save changes')}}</button>
</x-slot>
</x-modal>
@endif
<div class="row mb-3">
<div class="col">
@@ -308,7 +58,7 @@
<div class="card-body text-center">
@if ($profile->user->isBanned())
@if (is_array($suspensionInfo))
<del><h3>{{$profile->user->name}}</h3></del>
@else
<h3>{{$profile->user->name}}</h3>
@@ -316,72 +66,16 @@
<p class="text-muted">{{$profile->profileShortBio}}</p>
<p class="text-muted">{{__('Member since :date', ['date' => $since])}}</p>
@if (Auth::user()->hasRole('admin'))
<button type="button" class="btn btn-sm btn-info" onclick="$('#ipInfo').modal('show')">{{__('Lookup :ipAddress', ['ipAddress' => ($shouldCollect) ? $profile->user->originalIP : '0.0.0.0'])}}</button>
@endif
@if ($profile->user->is(Auth::user()))
<button type="button" class="btn btn-sm btn-warning" onclick="window.location.href='{{route('showProfileSettings')}}'"><i class="fas fa-pencil-alt"></i></button>
@elseif (Auth::user()->hasRole('admin') && $profile->user->isStaffMember())
<button type="button" class="btn btn-sm btn-danger" onclick="$('#terminateUser').modal('show')">{{__('Terminate Staff Member')}}</button>
@endif
</div>
<div class="card-footer text-center">
@foreach ($profile->user->roles as $role)
<span class="badge badge-success mr-2">{{ucfirst($role->name)}}</span>
@endforeach
</div>
</div>
</div>
@if (Auth::user()->hasRole('admin'))
<div class="col">
<div class="card">
<h5 class="card-header">
<a class="collapsed d-block" data-toggle="collapse" href="#collapse-collapsed" aria-expanded="true" aria-controls="collapse-collapsed" id="heading-collapsed">
<i class="fa fa-chevron-down pull-right"></i>
{{__('Account management (admin)')}}
</a>
</h5>
<div id="collapse-collapsed" class="collapse" aria-labelledby="heading-collapsed">
<div class="card-body">
<div class="management-btn text-center">
@if (!$profile->user->isBanned())
<button class="btn btn-danger mb-2" id="banAccountTrigger"><i class="fa fa-ban"></i> {{__('Suspend')}}</button><br>
@else
<form method="post" action="{{route('unbanUser', ['user' => $profile->user->id])}}">
@method('DELETE')
@csrf
<button type="submit" class="btn btn-warning mb-2"><i class="fa fa-check"></i> {{__('Lift Suspension')}}</button>
</form>
@endif
<button class="btn btn-danger mb-2" onclick="$('#deleteAccount').modal('show')"><i class="fas fa-trash-alt"></i> {{__('Delete Account')}}</button><br>
<button class="btn btn-warning mb-2" onclick="$('#editUser').modal('show')"><i class="fas fa-pencil-alt"></i> {{__('Edit Account')}}</button><br>
</div>
</div>
</div>
</div>
</div><!-- .col -->
@endif
</div>
<div class="row buttonBar">

View File

@@ -33,7 +33,7 @@
<p>{{ __('Deleting your account is an irreversible process. The following data will be deleted (including personally identifiable data):') }}</p>
<ul>
<li>{{ __('Last IP address') }}</li>
<li>{{ __('Name, Email and MC Username') }}</li>
<li>{{ __('Your name and email address') }}</li>
<li>{{ __('Your previous applications') }}</li>
<li>{{ __('Your profile data and preferences') }}</li>
<li>{{ __('Any other information stored in your user profile') }}</li>
@@ -60,21 +60,14 @@
@csrf
@method('PATCH')
<div class="form-group">
<label for="currentPassword">{{ __('Re-enter your password') }}</label>
<input class="form-control" autocomplete="current-password" type="password" name="currentPassword" id="currentPassword" required>
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('For your security, your password is always required for sensitive operations.') }} <a href="{{ route('password.request') }}">{{ __('Forgot your password?') }}</a></p>
</div>
<x-confirm-password>
{{ __('For your security, your password is always required for sensitive operations.') }}
</x-confirm-password>
@if (Auth::user()->has2FA())
<div class="form-group mt-5">
<x-confirm-second-factor>
{{ __('You cannot recover lost 2FA secrets.') }}
</x-confirm-second-factor>
<label for="otp">{{ __('Two-factor authentication code') }}</label>
<input type="text" id="otp" name="otp" class="form-control">
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('You cannot recover lost 2FA secrets.') }}</p>
</div>
@endif
</form>
@@ -247,6 +240,9 @@
<li class="nav-item">
<a class="nav-link" id="accountSecurityTab" data-toggle="tab" href="#accountSecurity" role="tab" aria-controls="AccountSecurity" aria-selected="true">{{__('Account Security')}}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="connectedAccountsTab" data-toggle="tab" href="#connectedAccounts" role="tab" aria-controls="ConnectedAccounts" aria-selected="false">{{__('Connected Accounts')}}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="twofaTab" data-toggle="tab" href="#twofa" role="tab" aria-controls="TwoFa" aria-selected="false">{{__('Two Factor Authentication')}}</a>
</li>
@@ -270,30 +266,102 @@
</div>
@endif
<h5 class="card-title">{{__('Change Password')}}</h5>
<p class="card-text">{{__('Change your password here. This will log you out from all existing sessions for your security.')}}</p>
@if (!Auth::user()->hasPassword())
<form method="POST" action="{{route('changePassword')}}" id="changePassword">
<h5>{{ __('Your :appName account does not have a password', ['appName' => config('app.name')]) }}</h5>
@csrf
@method('PATCH')
<label for="oldpassword">{{__('Old Password')}}</label>
<input class="form-control" name="oldPassword" type="password" id="oldpassword" autocomplete="current-password">
<p class="text-sm text-muted">{!! __('Forgot password? Reset it <a href="/auth/password/reset">here</a>!') !!}</p>
<p>{!! __('Because your account is linked to one or more <a href=":oAuthExplanationLink" target="_blank">OAuth</a> providers (such as Discord), there is no need for your account to use a password.', ['oAuthExplanationLink' => 'https://en.wikipedia.org/wiki/OAuth']) !!}</p>
<p>{{ __('Because several sensitive actions on the app require you to confirm your password, you may define one below. This will also allow you to unlink your accounts and login with a password.') }}</p>
<div class="form-group mt-5">
<form method="POST" action="{{ route('addPassword') }}" id="setPassword">
@csrf
@method('PATCH')
<label for="newpassword">{{__('New Password')}}</label>
<input type="password" name="newPassword" id="newpassword" class="form-control" autocomplete="new-password">
<p class="text-bold"><i class="fas fa-key"></i> {{ __('Setting a new password:') }}</p>
<label for="newpassword_confirmation">{{__('Confirm Password')}}</label>
<input type="password" name="newPassword_confirmation" id="newpassword_confirmation" autocomplete="new-password" class="form-control">
<div class="row">
<div class="col">
<label for="unlinkNewPassword">{{ __('New password') }}</label>
<input type="password" name="newpass" id="unlinkNewPassword" class="form-control">
</div>
<div class="col">
<label for="unlinkConfirmNewPassword">{{ __('Confirm new password') }}</label>
<input type="password" name="newpass_confirmation" if="unlinkConfirmNewPassword" class="form-control">
</div>
</div>
<input type="hidden" name="dc" value="false">
<button type="submit" class="btn btn-warning btn-md mt-4"><i class="fas fa-check"></i> {{ __('Set password') }}</button>
<p class="text-sm"><i>{{ __('You will be logged out afterwards.') }}</i></p>
</form>
@else
<h5 class="card-title">{{__('Change Password')}}</h5>
<p class="card-text">{{__('Change your password here. This will log you out from all existing sessions for your security.')}}</p>
<form method="POST" action="{{route('changePassword')}}" id="changePassword">
@csrf
@method('PATCH')
<label for="oldpassword">{{__('Old Password')}}</label>
<input class="form-control" name="oldPassword" type="password" id="oldpassword" autocomplete="current-password">
<p class="text-sm text-muted">{!! __('Forgot password? Reset it <a href="/auth/password/reset">here</a>!') !!}</p>
<div class="form-group mt-5">
<label for="newpassword">{{__('New Password')}}</label>
<input type="password" name="newPassword" id="newpassword" class="form-control" autocomplete="new-password">
<label for="newpassword_confirmation">{{__('Confirm Password')}}</label>
<input type="password" name="newPassword_confirmation" id="newpassword_confirmation" autocomplete="new-password" class="form-control">
</div>
</form>
<button {{ ($demoActive) ? 'disabled' : '' }} class="btn btn-success" type="button" onclick="document.getElementById('changePassword').submit()">{{__('Change Password')}}</button>
@endif
</div>
<div class="tab-pane fade p-3" id="connectedAccounts" role="tabpanel" aria-labelledby="connectedAccountsTab">
<h5 class="card-title">{{ __('Connected Accounts') }}</h5>
<p class="card-text">{{__('Manage your connected external accounts here.')}}</p>
@if(Auth::user()->hasDiscordConnection())
<p class="text-muted">{{ __('Your account is currently connected to Discord.') }}</p>
@if(!Auth::user()->hasPassword())
<x-alert icon="fas fa-exclamation-triangle" alert-type="warning" title="{{ __('Account unlinking disabled') }}">
{{ __("We've disabled unlinking your Discord account for now. To re-enable it, please add a password in the Account Security screen. This is to ensure you still have access to your account even after you change your Discord account email address.") }}
</x-alert>
@else
<x-alert icon="fas fa-info-circle" alert-type="info" title="{{ __('Note on disconnecting accounts') }}">
<p>{{ __("If you choose to disconnect your Discord account, we'll let Discord know by revoking your authorization. This means you will no longer be able to apply for positions that require a linked Discord account, and you may also lose any server privileges/roles that may have been granted through your linked account.") }}</p>
<p>{{ __(" You'll be able to link your account again through this page or by signing in with Discord again, but remember that if you changed your Discord email address, you will no longer have access to your old account.") }}</p>
</x-alert>
@endif
<div class="row mt-2">
<div class="col">
<x-button id="discordConnected" type="button" icon="fab fa-discord" color="primary" disabled> {{ __('Connected to Discord') }}</x-button>
</div>
<div class="col-9">
@if(Auth::user()->hasPassword())
<form name="disconnectAccount" method="post" action="{{ route('unlink-discord-account') }}">
@method('PATCH')
@csrf
<x-button id="discordDisconnect" type="submit" icon="fas fa-unlink" color="danger">{{ __('Disconnect') }}</x-button>
</form>
@else
<x-button id="discordDisconnect" type="button" icon="fas fa-unlink" color="danger" disabled>{{ __('Disconnect') }}</x-button>
@endif
</div>
</div>
@else
<p class="text-muted">{{ __('Your Discord account is not connected. Connect your Discord account below in order to apply for positions that require it.') }}</p>
<x-button id="discordDisconnected" type="button" icon="fab fa-discord" color="primary" link="{{ route('discordRedirect') }}"> {{ __('Connect to Discord') }}</x-button>
@endif
</form>
<button {{ ($demoActive) ? 'disabled' : '' }} class="btn btn-success" type="button" onclick="document.getElementById('changePassword').submit()">{{__('Change Password')}}</button>
</div>
<div class="tab-pane fade p-3" id="twofa" role="tabpanel" aria-labelledby="twofaTab">
<h5 class="card-title">{{__('Two Factor Authentication')}}</h5>

File diff suppressed because one or more lines are too long

View File

@@ -65,7 +65,7 @@
<form id="updateApplication" action="{{route('updateApplicationStatus', ['application' => $application->id, 'newStatus' => 'deny'])}}" method="POST">
@csrf
@method('PATCH')
<button type="submit" class="btn btn-danger">{{__('Confirm: Deny Applicant')}}</button>
<button type="submit" class="btn btn-danger"><i class="fas fa-ban"></i> {{__('Confirm')}}</button>
</form>
</x-slot>
@@ -156,8 +156,13 @@
<div class="card-body">
<p><b>{{__('Applicant Name')}} </b> <span class="badge badge-primary">{{$application->user->name}}</span></p>
@if ($application->user->hasDiscordConnection())
<p><b>{{ __('Discord tag: ') }}</b><i class="fab fa-discord"> </i> {{ __(':discordUsername (Connected account)', ['discordUsername' => $application->user->username]) }} </p>
@endif
@if (Auth::user()->hasRole('hiringManager'))
<p><b>{{__('Applicant IP Address')}}</b> <span class="badge badge-primary">{{ (!$shouldCollect) ? __('0.0.0.0 (censored)') : $application->user->originalIP }}</span></p>
<p><b>{{__('Applicant IP Address')}}</b> <span class="badge badge-primary">{{ (!$shouldCollect) ? __('0.0.0.0 (censored)') : $application->user->registrationIp }}</span></p>
@endif
<p><b>{{__('Application Date')}}</b> <span class="badge badge-primary">{{$application->created_at}}</span></p>
<p><b>{{__('Last updated')}}</b><span class="badge badge-primary">{{$application->updated_at}}</span></p>
@@ -222,7 +227,7 @@
<div class="col mr-5">
<button type="button" class="btn btn-danger" onclick="$('#denyApplication').modal('show')" {{($application->applicationStatus == 'DENIED') ? 'disabled' : ''}}><i class="fas fa-arrow-left"></i> {{__('messages.view_app.denyapp')}}</button>
<button type="button" class="btn btn-danger" onclick="$('#denyApplication').modal('show')" {{($application->applicationStatus == 'DENIED') ? 'disabled' : ''}}><i class="fas fa-arrow-left"></i> {{__('Decline application')}}</button>
</div>
<div class="col">