refactor: refactored administration strings

This commit also removes support for French and Spanish, and adds support for Brazillian Portuguese.
Additionally, the accidental leave protection on the form builder has also been fixed.
This commit is contained in:
2022-03-19 05:56:20 +00:00
committed by Miguel Nogueira
parent e6b10ab44e
commit 498fe5d09e
23 changed files with 222 additions and 1098 deletions

View File

@@ -1,10 +1,10 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.devoptions'))
@section('title', config('app.name') . ' | ' . __('Development & debug tools'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.devtools')}}</h4>
<h4>{{__('Administration')}} / {{__('Developer Tools')}}</h4>
@stop
@@ -24,11 +24,11 @@
@if(!$applications->isEmpty())
@foreach($applications as $application)
<option value="{{$application->id}}">{{__('messages.appid')}} {{$application->id}} ({{$application->user->name}})</option>
<option value="{{$application->id}}">{{__('Application ID')}} {{$application->id}} ({{$application->user->name}})</option>
@endforeach
@else
<option value="null" disabled>{{__('messages.no_valid_app')}}</option>
<option value="null" disabled>{{__('There are no valid applications')}}</option>
@endif
</select>
@@ -40,7 +40,7 @@
</x-modal>
<x-modal id="confirmDispatchRejection" modal-label="confirmDispatchRejection" modal-title="{{__('messages.choose_app')}}" include-close-button="true">
<x-modal id="confirmDispatchRejection" modal-label="confirmDispatchRejection" modal-title="{{__('Choose an application')}}" include-close-button="true">
<p>{{__('Please choose an application to force reject')}}</p>
<p>{{ __('Note that this process overrides users\'s votes, and it also ignores any stages the application may be in.') }}</p>
@@ -50,18 +50,18 @@
@if(!$rejectApplications->isEmpty())
@foreach($rejectApplications as $application)
<option value="{{$application->id}}">{{__('messages.appid')}} {{$application->id}} ({{$application->user->name}}) ({{ $application->applicationStatus }})</option>
<option value="{{$application->id}}">{{__('Application ID')}} {{$application->id}} ({{$application->user->name}}) ({{ $application->applicationStatus }})</option>
@endforeach
@else
<option value="null" disabled>{{__('messages.no_valid_app')}}</option>
<option value="null" disabled>{{__('There are no valid applications')}}</option>
@endif
</select>
</form>
<x-slot name="modalFooter">
<button type="button" class="btn btn-danger" onclick="document.getElementById('forceRejection').submit()">{{__('messages.dispatch_event')}}</button>
<button type="button" class="btn btn-danger" onclick="document.getElementById('forceRejection').submit()">{{__('Dispatch event now')}}</button>
</x-slot>
</x-modal>
@@ -71,8 +71,7 @@
<div class="alert alert-warning">
<i class="fa fa-exclamation-triangle"></i> <b>{{__('messages.warn')}}</b>
<p>{{__('messages.devtools_warn')}}</p>
<i class="fa fa-exclamation-triangle"></i> <b>{{__('Warning')}}</b>
</div>
</div>
@@ -87,20 +86,20 @@
<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 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>
<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>
<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>
<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>
<x-slot name="cardFooter">

View File

@@ -1,10 +1,10 @@
@extends('adminlte::page')
@section('title', 'Raspberry Network | Edit From')
@section('title', config('app.name') . ' | ' . __('Edit form'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.forms')}} / {{__('messages.edt')}}</h4>
<h4>{{__('Administration')}} / {{__('Forms')}} / {{__('Editor')}}</h4>
@stop
@@ -61,10 +61,10 @@
<select class="custom-select" id="{{ $fieldName }}-type" name="{{ $fieldName }}[]">
<option value="nil" disabled>{{__('messages.field_type')}}</option>
<option value="textbox" {{ ($field['type'] == 'textbox' ? 'selected' : '') }}>{{__('messages.txtbox')}}</option>
<option value="textarea" {{ ($field['type'] == 'textarea' ? 'selected' : '') }}>{{__('messages.multiline')}}</option>
<option value="checkbox" {{ ($field['type'] == 'checkbox' ? 'selected' : '') }}>{{__('messages.checkbox')}}</option>
<option value="nil" disabled>{{__('Choose a field type')}}</option>
<option value="textbox" {{ ($field['type'] == 'textbox' ? 'selected' : '') }}>{{__('Text box')}}</option>
<option value="textarea" {{ ($field['type'] == 'textarea' ? 'selected' : '') }}>{{__('Text area')}}</option>
<option value="checkbox" {{ ($field['type'] == 'checkbox' ? 'selected' : '') }}>{{__('Checkbox')}}</option>
</select>
@@ -82,8 +82,8 @@
<div class="card-footer text-center">
<button type="button" class="btn btn-warning ml-2" onclick="$('#editForm').submit()"><i class="fas fa-save"></i> {{__('messages.save_exit')}}</button>
<button type="button" class="btn btn-primary ml-2" id="add"><i class="fas fa-plus"></i> {{__('messages.new_field')}}</button>
<button type="button" class="btn btn-warning ml-2" onclick="$('#editForm').submit()"><i class="fas fa-save"></i> {{__('Save & Quit')}}</button>
<button type="button" class="btn btn-primary ml-2" id="add"><i class="fas fa-plus"></i> {{__('New field')}}</button>
</div>

View File

@@ -1,10 +1,10 @@
@extends('adminlte::page')
@section('title', 'Raspberry Network | Edit Positions')
@section('title', config('app.name') . ' | ' . __('Edit vacancies'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.positions')}} / {{__('messages.edit')}}</h4>
<h4>{{__('Administration')}} / {{__('Vacancies')}} / {{__('Edit')}}</h4>
@stop
@@ -24,7 +24,7 @@
<div class="col center">
<h3>{{__('messages.vacancy_edit')}}</h3>
<h3>{{__('Vacancy Editor')}}</h3>
</div>
@@ -49,7 +49,7 @@
<div class="card-body">
<p class="text-muted"><i class="fas fa-question-circle"></i> {{__('messages.form_consistency')}}</p>
<p class="text-muted"><i class="fas fa-question-circle"></i> {{__('For consistency purposes, grayed out fields can\'t be edited.')}}</p>
<form method="POST" id="editPositionForm" action="{{ route('updatePosition', ['vacancy' => $vacancy->id]) }}">
@@ -61,14 +61,14 @@
<div class="col">
<label for="vacancyName">{{__('messages.vacancy.name')}}</label>
<label for="vacancyName">{{__('Vacancy name')}}</label>
<input type="text" value="{{ $vacancy->vacancyName }}" class="form-control" disabled />
</div>
<div class="col">
<label for="vacancyDescription">{{__('messages.vacancy.description')}}</label>
<label for="vacancyDescription">{{__('Vacancy description')}}</label>
<input type="vacancyDescription" class="form-control" name="vacancyDescription" value="{{ $vacancy->vacancyDescription }}" />
@@ -81,9 +81,9 @@
<div class="col">
<!-- skipping the accessor for obvious reasons -->
<label for="vacanyDetails">{{__('messages.vacancy.details')}}</label>
<textarea name="vacancyFullDescription" class="form-control" placeholder="{{ (is_null($vacancy->vacancyFullDescription)) ? __('messages.vacancy.no_details') : '' }}" rows="20">{{ $vacancy->getAttributes()['vacancyFullDescription'] }}</textarea>
<span class="text-muted"><i class="fab fa-markdown"></i> {{__('messages.vacancy.markdown')}}</span>
<label for="vacanyDetails">{{__('Vacancy details')}}</label>
<textarea name="vacancyFullDescription" class="form-control" placeholder="{{ (is_null($vacancy->vacancyFullDescription)) ? __('No details yet... Add some!') : '' }}" rows="20">{{ $vacancy->getAttributes()['vacancyFullDescription'] }}</textarea>
<span class="text-muted"><i class="fab fa-markdown"></i> {{__('Markdown supported')}}</span>
</div>
@@ -93,14 +93,15 @@
<div class="col">
<label for="permissionGroupName">{{__('messages.vacancy.permission_group')}}</label>
<!-- 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">{{__('messages.vacancy.discord_roleid')}}</label>
<label for="discordRoleID">{{__('Discord role ID')}}</label>
<input type="text" class="form-control" value="{{ $vacancy->discordRoleID }}" id="discordRoleID" disabled />
@@ -111,10 +112,10 @@
<div class="col">
<label for="currentForm">{{__('messages.vacancy.current_form')}}</label>
<label for="currentForm">{{__('Current from (uneditable)')}}</label>
<input type="text" class="form-control" value="{{ $vacancy->forms->formName }}" id="currentForm" disabled />
<label for="remainingSlots">{{__('messages.vacancy.remaining_slots')}}</label>
<label for="remainingSlots">{{__('Remaining slots')}}</label>
<input type="text" class="form-control" value="{{ $vacancy->vacancyCount }}" id="remainingSlots" name="vacancyCount" />
@@ -128,15 +129,15 @@
<div class="card-footer">
<button type="button" class="btn btn-warning" onclick="$('#editPositionForm').submit()"><i class="fas fa-edit"></i> {{__('messages.vacancy.save')}}</button>
<button type="button" class="btn btn-danger" onclick="window.location.href='{{ route('showPositions') }}'"><i class="fas fa-times"></i> {{__('messages.vacancy.cancel')}}</button>
<button type="button" class="btn btn-warning" onclick="$('#editPositionForm').submit()"><i class="fas fa-edit"></i> {{__('Save changes')}}</button>
<button type="button" class="btn btn-danger" onclick="window.location.href='{{ route('showPositions') }}'"><i class="fas fa-times"></i> {{__('Go back')}}</button>
@if($vacancy->vacancyStatus == 'OPEN')
<form method="POST" action="{{ route('updatePositionAvailability', ['vacancy' => $vacancy->id, 'status' => 'close']) }}" style="display: inline">
@method('PATCH')
@csrf
<button type="submit" class="ml-4 btn btn-danger"><i class="fas fa-ban"></i> {{__('messages.vacancy.close_vacancy')}}</button>
<button type="submit" class="ml-4 btn btn-danger"><i class="fas fa-ban"></i> {{__('Close vacancy')}}</button>
</form>
@endif

View File

@@ -1,21 +1,15 @@
@extends('adminlte::page')
@section('title', config('app.name') . '| ' . __('messages.form_builder.builder_name'))
@section('title', config('app.name') . ' | ' . __('Application form management tool'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.form_builder.builder')}}</h4>
<h4>{{__('Administration')}} / {{__('Form builder')}}</h4>
@stop
@section('js')
<script>
jQuery(window).bind('beforeunload', function(){
return 'Are you sure you want to leave the form builder? You might have unsaved work.';
});
</script>
@if (session()->has('success'))
<script>
@@ -40,6 +34,23 @@
</script>
@endif
<script>
$(document).ready(function () {
$("#formName").keyup(function(){
if($(this).val().length > 10){
$(window).bind('beforeunload', function(){
return "{{ __('Are you sure you want to leave the form builder? You have unsaved work.') }}";
});
}
});
$(document).on("submit", "form", function(event){
$(window).off('beforeunload');
});
})
</script>
@stop
@section('content')
@@ -57,9 +68,9 @@
@csrf
<fieldset id="buildyourform">
<legend class="text-center">{{__('messages.form_builder.builder')}}</legend>
<legend class="text-center">{{__('Form builder')}}</legend>
<input type="text" name="formName" class="form-control mb-5" placeholder="{{__('messages.form_builder.name_form')}}" required>
<input type="text" name="formName" id="formName" class="form-control mb-5" placeholder="{{__('Name your form...')}}" required>
</fieldset>
@@ -69,8 +80,8 @@
<div class="card-footer text-center">
<button onclick="save()" type="button" class="btn btn-success">{{__('messages.form_builder.save_form')}}</button>
<input type="button" value="{{__('messages.new_field')}}" class="add btn btn-info ml-3" id="add" />
<button onclick="save()" type="button" class="btn btn-success">{{__('Save form')}}</button>
<input type="button" value="{{__('Add field')}}" class="add btn btn-info ml-3" id="add" />
</div>

View File

@@ -1,10 +1,10 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.form_preview.title'))
@section('title', config('app.name') . ' | ' . __('Previewing application form'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.form_builder.builder')}} / {{__('messages.form_preview.preview')}}</h4>
<h4>{{__('Administration')}} / {{__('Form builder')}} / {{__('Preview')}}</h4>
@stop
@@ -22,7 +22,7 @@
<div class="col-6 offset-4">
<img src="/img/preview.svg" width="250px" alt="Form preview illustration" />
<img src="/img/preview.svg" width="250px" alt="{{ __('Form preview illustration') }}" />
</div>
@@ -33,10 +33,10 @@
<div class="col">
<div class="alert alert-success">
<h5><i class="fas fa-eye"></i> {{__('messages.form_preview.looks')}}</h5>
<h5><i class="fas fa-eye"></i> {{__('This is how your form looks like to applicants.')}}</h5>
<p>
{{__('messages.form_preview.f_info')}}
{{__('You may edit it and add more fields later.')}}
</p>
</div>
@@ -52,7 +52,7 @@
<div class="card-header">
<h3>{{ $title }} - {{__('messages.form')}}</h2>
<h3>{{ $title }} - {{__('Form')}}</h3>
</div>
@@ -66,8 +66,8 @@
<div class="card-footer text-center">
<button type="button" class="btn btn-success ml-2" onclick="window.location.href='{{ route('showForms') }}'"><i class="fas fa-chevron-left"></i> {{__('messages.back')}}</button>
<button type="button" class="btn btn-warning ml-2" onclick="window.location.href='{{ route('editForm', ['form' => $formID]) }}'"><i class="far fa-edit"></i> {{__('messages.edit')}}</button>
<button type="button" class="btn btn-success ml-2" onclick="window.location.href='{{ route('showForms') }}'"><i class="fas fa-chevron-left"></i> {{__('Go back')}}</button>
<button type="button" class="btn btn-warning ml-2" onclick="window.location.href='{{ route('editForm', ['form' => $formID]) }}'"><i class="far fa-edit"></i> {{__('Edit')}}</button>
</div>
</div>

View File

@@ -1,10 +1,10 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.forms_p.available_forms'))
@section('title', config('app.name') . ' | ' . __('Available forms'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.forms')}}</h4>
<h4>{{__('Administration')}} / {{__('Forms')}}</h4>
@stop
@@ -23,7 +23,7 @@
<div class="card bg-gray-dark">
<div class="card-header bg-indigo">
<div class="card-title"><h4 class="text-bold">{{__('messages.forms_p.available_forms')}}</h4></div>
<div class="card-title"><h4 class="text-bold">{{__('Available forms')}}</h4></div>
</div>
<div class="card-body">
@@ -36,10 +36,10 @@
<tr>
<th>#</th>
<th>{{__('messages.forms_p.form_title')}}</th>
<th>{{__('messages.reusable.created_at')}}</th>
<th>{{__('messages.reusable.updated_at')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
<th>{{__('Title')}}</th>
<th>{{__('Created at')}}</th>
<th>{{__('Updated at')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
@@ -59,9 +59,9 @@
@method('DELETE')
@csrf
<button type="submit" class="btn btn-sm btn-danger mr-2"><i class="fa fa-trash"></i> {{__('messages.reusable.delete')}}</button>
<button type="submit" class="btn btn-sm btn-danger mr-2"><i class="fa fa-trash"></i> {{__('Delete')}}</button>
</form>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{ route('previewForm', ['form' => $form->id]) }}'"><i class="fa fa-eye"></i> {{__('messages.form_preview.preview')}}</button>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{ route('previewForm', ['form' => $form->id]) }}'"><i class="fa fa-eye"></i> {{__('Preview form')}}</button>
</td>
</tr>
@@ -75,7 +75,7 @@
<div class="alert alert-warning">
{{__('messages.forms_p.empty_noforms')}}
{{__('Nothing to see here! Please add some forms first.')}}
</div>
@@ -85,7 +85,7 @@
<div class="card-footer">
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route('showFormBuilder')}}'">{{__('messages.forms_p.new_form')}}</button>
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route('showFormBuilder')}}'">{{__('NEW FORM')}}</button>
</div>

View File

@@ -4,7 +4,7 @@
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('Users')}}</h4>
<h4>{{__('Administration')}} / {{__('Users')}}</h4>
@stop
@@ -79,9 +79,9 @@
<tr>
<th>{{__('Name')}}</th>
<th>{{ __('Rank') }}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.players.reg_date')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Registration date')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
@@ -93,9 +93,9 @@
<td>{{$user->name}}</td>
<td>
@if ($user->hasRole('reviewer'))
<span class="badge badge-warning"><i class="fas fa-user"></i> Staff</span>
<span class="badge badge-warning"><i class="fas fa-user"></i> {{ __('Staff') }}</span>
@else
<span class="badge-warning badge"><i class="fas fa-user"></i> Member</span>
<span class="badge-warning badge"><i class="fas fa-user"></i> {{ __('Member') }}</span>
@endif
</td>
<td>
@@ -115,9 +115,9 @@
@else
<div class="alert alert-secondary">
<i class="fas fa-question"></i><span> {{__('messages.players.no_reg')}}</span>
<i class="fas fa-question"></i><span> {{__('There are no registered users!')}}</span>
<p>
{{__('messages.players.no_reg_exp')}}
{{__('Registered users are those without a staff role in the team management application.')}}
</p>
</div>

View File

@@ -1,13 +1,13 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.open_positions'))
@section('title', config('app.name') . ' | ' . __('Open vacancies'))
@section('content_header')
@if (Auth::user()->hasAnyRole('admin', 'hiringManager'))
<h4>{{__('messages.adm')}} / {{__('messages.open_positions')}}</h4>
<h4>{{__('Administration')}} / {{__('Open vacancies')}}</h4>
@else
<h4>{{__('messages.reusable.no_access')}}</h4>
<h4>{{__('Application access denied')}}</h4>
@endif
@stop
@@ -29,7 +29,7 @@
@if($errors->any())
@foreach ($errors->all() as $error)
<script>toastr.error('{{$error}}', '{{__('messages.reusable.validation_err')}}')</script>
<script>toastr.error('{{$error}}', '{{__('Validation error!')}}')</script>
@endforeach
@endif
@@ -42,7 +42,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalFormLabel">{{__('messages.new_vacancy')}}</h5>
<h5 class="modal-title" id="modalFormLabel">{{__('New vacancy')}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@@ -53,35 +53,35 @@
<form id="savePositionForm" action="{{route('savePosition')}}" method="POST">
@csrf
<label for="vacancyName">{{__('messages.vacancy.name')}}</label>
<label for="vacancyName">{{__('Vacancy name')}}</label>
<input type="text" id="vacancyName" name="vacancyName" class="form-control">
<label for="vacancyDescription">{{__('messages.vacancy.description')}}</label>
<label for="vacancyDescription">{{__('Vacancy description')}}</label>
<input type="text" id="vacancyDescription" name="vacancyDescription" class="form-control">
<label for="vacancyFullDescription">{{__('messages.vacancy.description')}}</label>
<textarea name="vacancyFullDescription" class="form-control" rel="txtTooltip" title="{{__('messages.vacancy.description_tooltip')}}" data-toggle="tooltip" data-placement="bottom"></textarea>
<span class="right text-muted"><i class="fab fa-markdown"></i> {{__('messages.vacancy.markdown')}}</span>
<label for="vacancyFullDescription">{{__('Vacancy details')}}</label>
<textarea name="vacancyFullDescription" class="form-control" rel="txtTooltip" title="{{__('Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary')}}" data-toggle="tooltip" data-placement="bottom"></textarea>
<span class="right text-muted"><i class="fab fa-markdown"></i> {{__('Markdown supported')}}</span>
<div class="row mt-3">
<div class="col">
<label for="pgroup">{{__('messages.vacancy.permission_group')}}</label>
<input rel="txtTooltip" title="{{__('messages.vacancy.permission_group_tooltip')}}" data-toggle="tooltip" data-placement="bottom" type="text" id="pgroup" name="permissionGroup" class="form-control">
<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">{{__('messages.vacancy.discord_roleid')}} (*)</label>
<input rel="txtTooltip" title="{{__('messages.vacancy.discord_roleid_tooltip')}}" data-toggle="tooltip" data-placement="bottom" type="text" id="discordrole" name="discordRole" class="form-control">
<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">
</div>
</div>
<div class="form-group mt-4">
<label for="associatedForm">{{__('messages.positions_p.application_form')}}</label>
<label for="associatedForm">{{__('Application form')}}</label>
<select class="custom-select" name="vacancyFormID" id="associatedForm">
<option disabled>{{__('messages.positions_p.select_form')}}</option>
<option disabled>{{__('Select a form...')}}</option>
@foreach($forms as $form)
<option value="{{$form->id}}">{{$form->formName}}</option>
@@ -90,8 +90,8 @@
</select>
<label for="vacancyCount">{{__('messages.vacancy.free_slots')}}</label>
<input rel="txtTooltip" title="{{__('messages.vacancy.free_slots_tooltip')}}" data-toggle="tooltip" data-placement="bottom" type="text" id="vacancyCount" name="vacancyCount" class="form-control">
<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">
</div>
@@ -102,7 +102,9 @@
<div class="alert alert-danger">
<p>
{{__('messages.positions_p.no_form_error')}}
{{__('You cannot create a vacancy without any forms with which people would apply.')}}
{{ __('Create a form first, then, create a vacancy.') }}
{{ __("A single form is allowed to have multiple vacancies, so you can attach future vacancies to the same form if you'd like.") }}
</p>
</div>
@@ -112,10 +114,10 @@
<div class="modal-footer">
@if(!$forms->isEmpty())
<button type="button" class="btn btn-primary" onclick="document.getElementById('savePositionForm').submit()">{{__('messages.vacancy.add')}}</button>
<button type="button" class="btn btn-primary" onclick="document.getElementById('savePositionForm').submit()">{{__('Add vacancy')}}</button>
@endif
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{__('messages.modal_close')}}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{__('Close')}}</button>
</div>
</div>
</div>
@@ -129,7 +131,7 @@
<div class="card-body">
<button type="button" class="btn btn-primary" onclick="$('#newVacancyForm').modal('show')">{{__('messages.positions_p.new_pos')}}</button>
<button type="button" class="btn btn-primary" onclick="$('#newVacancyForm').modal('show')">{{__('NEW VACANCY')}}</button>
</div>
@@ -146,7 +148,7 @@
<div class="card bg-gray-dark">
<div class="card-header bg-indigo">
<div class="card-title"><h4 class="text-bold">{{__('messages.open_positions')}}</h4></div>
<div class="card-title"><h4 class="text-bold">{{__('Open vacancies')}}</h4></div>
</div>
<div class="card-body">
@@ -158,12 +160,12 @@
<thead>
<tr>
<th>{{__('messages.contactlabel_name')}}</th>
<th>{{__('messages.reusable.description')}}</th>
<th>{{__('messages.vacancy.free_slots')}}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.reusable.created_at')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Description')}}</th>
<th>{{__('Free slots')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Created at')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
@@ -177,9 +179,9 @@
<td>{{substr($vacancy->vacancyDescription, 0, 20)}}...</td>
<td>{{$vacancy->vacancyCount}}</td>
@if($vacancy->vacancyStatus == 'OPEN')
<td><span class="badge badge-success">{{__('messages.open')}}</span></td>
<td><span class="badge badge-success">{{__('Open')}}</span></td>
@else
<td><span class="badge badge-danger">{{__('messages.closed')}}</span></td>
<td><span class="badge badge-danger">{{__('Closed')}}</span></td>
@endif
<td>{{$vacancy->created_at}}</td>
<td>
@@ -223,7 +225,7 @@
@else
<div class="alert alert-warning">
<p>{{__('messages.positions_p.empty_pos_warning')}}</p>
<p>{{__('Nothing to see here! Open some vacancies first. This will get applicants pouring in! (hopefully)')}}</p>
</div>
@endif
@@ -231,7 +233,7 @@
<div class="card-footer">
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route('showForms')}}'">{{__('messages.positions_p.manage_forms')}}</button>
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route('showForms')}}'">{{__('MANAGE APPLICATION FORMS')}}</button>
</div>

View File

@@ -1,13 +1,13 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.settings.settings'))
@section('title', config('app.name') . ' | ' . __('Settings'))
@section('content_header')
@if (Auth::user()->hasAnyRole('admin'))
<h4>{{__('messages.adm')}} / {{__('messages.settings.settings')}}</h4>
<h4>{{__('Administration')}} / {{__('Settings')}}</h4>
@else
<h4>{{__('messages.reusable.no_access')}}</h4>
<h4>{{__('Application access denied')}}</h4>
@endif
@stop
@@ -34,7 +34,7 @@
@if($errors->any())
@foreach ($errors->all() as $error)
<script>toastr.error('{{$error}}', 'Validation error!')</script>
<script>toastr.error('{{$error}}', '{{__('Validation error!')}}')</script>
@endforeach
@endif
@@ -43,38 +43,38 @@
@section('content')
<div class="row">
<div class="col">
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<i class="fas fa-info-circle"></i> <b>Available security policies</b> (current policy: {{ $security['secPolicy'] }})
<p><b>Disabled:</b> No security policy will be enforced. This is insecure.</p>
<div class="col">
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<i class="fas fa-info-circle"></i> {!! __('<b>Available security policies</b> (current policy: :currentPolicySettingValue)', ['currentPolicySettingValue' => $security['secPolicy']]) !!}
<p>{!! __('<b>Disabled:</b> No security policy will be enforced. This is insecure.') !!}</p>
<div class="row">
<div class="col">
<p><b>Low:</b> Good choice for low-traffic websites, e.g. community with less than 100 members.</p>
<p>{!! __("<b>Low:</b> Good choice for low-traffic websites, e.g. community with less than 100 members.") !!}</p>
<ul>
<li>Minimum 10 characters</li>
<li>{{ __('Minimum 10 characters') }}</li>
</ul>
</div>
<div class="col">
<p><b>Medium (recommended):</b> Standard for most websites.</p>
<p>{!! __('<b>Medium (recommended):</b> Standard for most websites.') !!}</p>
<ul>
<li>Minimum 12 characters</li>
<li>Must contain special characters</li>
<li>Must contain upper and lower case characters</li>
<li>{{ __('Minimum 12 characters') }}</li>
<li>{{ __('Must contain special characters') }}</li>
<li>{{ __('Must contain upper and lower case characters') }}</li>
</ul>
</div>
<div class="col">
<p><b>(╯°□°)╯︵ ┻━┻:</b> For security aficionados. More of a nuisance than a good policy.</p>
<p>{!! __('<b>(╯°□°)╯︵ ┻━┻:</b> For security aficionados. More of a nuisance than a good policy.') !!}</p>
<ul>
<li>Minimum 20 characters</li>
<li>Same as Medium, but: </li>
<li>{{ __('Minimum 20 characters') }}</li>
<li>{{ __('Same as Medium, but: ') }}</li>
<ul>
<li>Must contain numerical characters</li>
<li>{{ __('Must contain numerical characters') }}</li>
</ul>
</ul>
</div>
@@ -85,7 +85,7 @@
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
</div>
@@ -95,17 +95,17 @@
<div class="row">
<div class="col">
<div class="alert alert-danger">
<p><b><i class="fas fa-exclamation-triangle"></i> DANGER: </b> Insecure security policy</p>
<p>Your current password security policy is set to <b>off</b>. This allows users to choose potentially unsafe passwords. We strongly recommend you update this value to <b>Medium</b>.</p>
<div class="alert alert-danger">
<p>{!! __('<b><i class="fas fa-exclamation-triangle"></i> DANGER: </b> Insecure security policy') !!}</p>
<p>{!! __('Your current password security policy is set to <b>off</b>. This allows users to choose potentially unsafe passwords. We strongly recommend you update this value to <b>Medium</b>.') !!}</p>
</div>
</div>
</div>
@endif
@@ -117,8 +117,8 @@
<div class="card">
<div class="card-header">
<h3>{{__('messages.settings.settings_header')}}</h3>
<p>{{__('messages.settings.settings_p')}}</p>
<h3>{{__('Notification settings')}}</h3>
<p>{{__('Change which notifications are sent here.')}}</p>
</div>
<div class="card-body">
@@ -137,7 +137,7 @@
</div>
<div class="card-footer">
<button type="button" class="btn btn-success" onclick="$('#settings').submit()"><i class="fa fa-save"></i> {{__('messages.vacancy.save')}}</button>
<button type="button" class="btn btn-success" onclick="$('#settings').submit()"><i class="fa fa-save"></i> {{__('Save changes')}}</button>
</div>
</div>
@@ -145,12 +145,12 @@
</div>
<div class="col">
<div class="card">
<div class="card-header">
<h3>Security Settings</h3>
<p>Here, you can configure security settings for the app, for all users.</p>
<h3>{{ __('Security Settings') }}</h3>
<p>{{ __('Here, you can configure security settings for the app, for all users.') }}</p>
</div>
<div class="card-body">
@@ -160,44 +160,44 @@
<div class="form-group">
<label for="policy">Password Security Policy</label>
<label for="policy">{{__('Password Security Policy')}}</label>
<select class="custom-select form-control" name="secPolicy">
<option value="nil" disabled>Choose a security policy</option>
<option value="off" {{ ($security['secPolicy'] == 'off') ? 'selected' : '' }}>Disabled (default)</option>
<option value="low" {{ ($security['secPolicy'] == 'low') ? 'selected' : '' }}>Low</option>
<option value="medium" {{ ($security['secPolicy'] == 'medium') ? 'selected' : '' }}>Medium</option>
<option value="high" {{ ($security['secPolicy'] == 'high') ? 'selected' : '' }}>High (╯°□°)╯︵ ┻━┻</option>
<option value="nil" disabled>{{ __('Choose a security policy') }}</option>
<option value="off" {{ ($security['secPolicy'] == 'off') ? 'selected' : '' }}>{{ __('Disabled (default)') }}</option>
<option value="low" {{ ($security['secPolicy'] == 'low') ? 'selected' : '' }}>{{ __('Low') }}</option>
<option value="medium" {{ ($security['secPolicy'] == 'medium') ? 'selected' : '' }}>{{ __('Medium') }}</option>
<option value="high" {{ ($security['secPolicy'] == 'high') ? 'selected' : '' }}>{{ __('High (╯°□°)╯︵ ┻━┻') }}</option>
</select>
</div>
</div>
<div class="form-group">
<label for="graceperiod">Grace period for 2FA requirement (above <code>reviewer</code>)</label>
<label for="graceperiod">{!! __('Grace period for 2FA requirement (above <code>reviewer</code>)') !!}</label>
<input type="text" class="form-control" id="graceperiod" placeholder="time in days" name="graceperiod" value="{{$security['graceperiod']}}">
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> Users will be locked out after this time period if they fail to enable 2FA. Leave empty to disable.</p>
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('Users will be locked out after this time period if they fail to enable 2FA. Leave empty to disable.') }}</p>
</div>
<div class="form-group">
<label for="pwExpiry">Password Expiry Control</label>
<label for="pwExpiry">{{ __('Password Expiry Control') }}</label>
<input type="text" class="form-control" id="pwExpiry" placeholder="time in days" name="pwExpiry" value="{{ $security['pwExpiry'] }}">
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> Leave this field zeroed to disable. Users will be forced to reset their password after the specified time.</p>
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('Leave this field zeroed to disable. Users will be forced to reset their password after the specified time.') }}</p>
</div>
<div class="form-group form-check">
<input type="hidden" name="enforce2fa" value="0">
<input type="checkbox" name="enforce2fa" value="1" id="enforce2fa" class="form-check-input" {{ $security['enforce2fa'] == true ? 'checked' : '' }}>
<label for="enforceAdmin2fa">Force roles above <code>reviewer</code> to use two factor authentication?</label>
</div>
<label for="enforceAdmin2fa">{{ __('Force roles above <code>reviewer</code> to use two factor authentication?') }}</label>
</div>
<div class="form-group form-check">
<input type="hidden" name="requirePMC" value="0">
<input type="checkbox" name="requirePMC" value="1" id="requirePMC" class="form-check-input" {{ $security['requiresPMC'] == true ? 'checked' : '' }}>
<label for="requirePMC">Require a valid game license to signup?</label>
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> Choose a game in the section below, if applicable.</p>
<label for="requirePMC">{{ __('Require a valid game license to signup?') }}</label>
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('Choose a game in the section below, if applicable.') }}</p>
</div>
</form>
@@ -205,22 +205,22 @@
</div>
<div class="card-footer">
<button onclick="$('#security').submit()" type="button" class="btn btn-success"><i class="fas fa-save"></i> Save Changes</button>
<button onclick="$('#security').submit()" type="button" class="btn btn-success"><i class="fas fa-save"></i> {{ __('Save Changes') }}</button>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="row mt-3">
<div class="col">
<div class="card">
<div class="card-header">
<h4>Game Integration</h4>
<p>In this section, you can choose which game your community plays. This gives you the ability to limit signups to users with valid game accounts, keeping pirates out. It also swaps front page images with images for that game, if you haven't customised them. Leave unselected if your community does not revolve around a game.</p>
<h4>{{ __('Game Integration') }}</h4>
<p>{{ __("In this section, you can choose which game your community plays. This gives you the ability to limit signups to users with valid game accounts, keeping pirates out. It also swaps front page images with images for that game, if you haven't customised them. Leave unselected if your community does not revolve around a game.") }}</p>
</div>
<div class="card-body">
@@ -258,15 +258,15 @@
<img alt="Gmod Logo" height="150px" width="150px" src="/img/se.png">
</label>
</div>
</div>
</div>
</form>
</div>
<div class="card-footer">
<button onclick="$('#gamePrefForm').submit()" type="button" class="btn btn-success"><i class="fas fa-save"></i> Save Changes</button>
<button onclick="$('#gamePrefForm').submit()" type="button" class="btn btn-success"><i class="fas fa-save"></i> {{ __('Save Changes') }}</button>
</div>
</div>
</div>
@@ -274,39 +274,39 @@
<div class="row mt-3">
<div class="col">
<div class="card">
<div class="card-header">
<h4>Integration with 3rd party services</h4>
<p>Configure any of the thirdy party services below to facilitate recruiting staff for specific services.</p>
<h4>{{ __('Integration with 3rd party services') }}</h4>
<p>{{ __('Configure any of the thirdy party services below to facilitate recruiting staff for specific services.') }}</p>
</div>
<div class="card-body">
<div class="form-group mb-3">
<div class="row text-center">
<div class="row text-center">
<div class="col mt-4">
<img src="/img/discord-mark-white.svg" width="270px" alt="Discord Workmark Logo - Black"><br>
<button class="btn btn-primary mt-4" type="button"><i class="fab fa-discord"></i> Configure Integration</button>
<button class="btn btn-primary mt-4" type="button"><i class="fab fa-discord"></i> {{ __('Configure Integration') }}</button>
</div>
<div class="col">
<img src="/img/reddit-mark-white.svg" width="250px" alt="Reddit Wordmark Logo - OrangeRed"><br>
<button class="btn btn-primary mt-4" type="button"><i class="fab fa-reddit"></i> Configure Integration</button>
<button class="btn btn-primary mt-4" type="button"><i class="fab fa-reddit"></i> {{ __('Configure Integration') }}</button>
</div>
</div>
</div>
</div>
<div class="card-footer">
<p class="text-muted text-bold"><i class="fas fa-exclamation-triangle"></i><b> Disclaimer: </b> {{ config('app.name') }} is not affiliated with and does not endorse the brands displayed above.</p>
<p class="text-muted text-bold"><i class="fas fa-exclamation-triangle"></i><b> {{ __('Disclaimer:') }} </b> {{ __(':siteNameSettingValue is not affiliated with and does not endorse the brands displayed above.', ['siteNameSettingValue' => config('app.name')]) }}</p>
</div>
</div>

View File

@@ -1,10 +1,10 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.staff.members'))
@section('title', config('app.name') . ' | ' . __('Staff members'))
@section('content_header')
<h4>{{__('messages.adm')}} / {{__('messages.staff.members')}}</h4>
<h4>{{__('Administration')}} / {{__('Staff members')}}</h4>
@stop
@@ -17,7 +17,7 @@
<div class="inner">
<h3>{{$users->count()}}</h3>
<p>{{__('messages.staff.active_sm')}}</p>
<p>{{__('Active Staff Members')}}</p>
</div>
<div class="icon">
<i class="fa fa-user-tie"></i>
@@ -35,7 +35,7 @@
<div class="card-header bg-indigo">
<div class="card-title"><h4 class="text-bold">{{__('messages.staff.m_listing')}}</h4></div>
<div class="card-title"><h4 class="text-bold">{{__('Member listing')}}</h4></div>
</div>
@@ -46,12 +46,12 @@
<thead>
<tr>
<th>#</th>
<th>{{__('messages.staff.f_name')}}</th>
<th>{{__('messages.staff.rank')}}</th>
<th>{{__('messages.contactlabel_email')}}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.reusable.join_date')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
<th>{{__('Full name')}}</th>
<th>{{__('Rank')}}</th>
<th>{{__('Email')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Join date')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
@@ -87,7 +87,7 @@
<div class="card-footer">
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route("registeredPlayerList")}}'">{{__('messages.players.reg_players_staff')}}</button>
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route("registeredPlayerList")}}'">{{__('View Registered Users (Applicant Pool)')}}</button>
</div>