Merge branch 'develop' into feature/vuejs
This commit is contained in:
commit
21ffa08d66
54 changed files with 407 additions and 243 deletions
|
@ -340,7 +340,7 @@ return [
|
|||
'2fa_disable_error' => 'Der bereitgestellte 2FA-Token war nicht gültig. Der Schutz wurde für dieses Konto nicht deaktiviert.',
|
||||
'2fa_header' => '2-Faktor-Authentifizierung',
|
||||
'2fa_qr' => '2FA konfigurieren',
|
||||
'2fa_token_help' => 'Bitte gebe den 2FA Code von deiner 2FA APP ein (Google Authenticatior, Authy, etc.).',
|
||||
'2fa_token_help' => 'Bitte gebe den 2FA Code von deiner 2FA APP ein (Google Authenticator, Authy, etc.).',
|
||||
'disable_2fa' => '2-Factor-Authentifizierung deaktivieren',
|
||||
'enable_2fa' => '2-Faktor-Authentifizierung aktivieren',
|
||||
'header' => 'Kontosicherheit',
|
||||
|
|
|
@ -362,7 +362,7 @@ return [
|
|||
'2fa_enabled' => '2-Factor de Autenticación está habilitada en esta cuenta y será necesario iniciar la sesión en el panel de. Si usted desea deshabilitar el 2FA, simplemente ingrese un token válido a continuación y envíe el formulario.',
|
||||
'2fa_header' => '2-Factor De Autenticación',
|
||||
'2fa_qr' => 'Confgure 2FA en Su Dispositivo',
|
||||
'2fa_token_help' => 'Introduzca el 2FA Token generado por la aplicación (Google Authenticatior, Authy, etc.).',
|
||||
'2fa_token_help' => 'Introduzca el 2FA Token generado por la aplicación (Google Authenticator, Authy, etc.).',
|
||||
'disable_2fa' => 'Deshabilitar 2-Factor De Autenticación',
|
||||
'enable_2fa' => 'Habilitar 2-Factor De Autenticación',
|
||||
'header' => 'Seguridad De La Cuenta',
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
</div>
|
||||
@else
|
||||
<form action="{{ route('admin.settings.mail') }}" method="POST">
|
||||
<form>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
|
@ -98,7 +98,10 @@
|
|||
</div>
|
||||
<div class="box-footer">
|
||||
{{ csrf_field() }}
|
||||
<button type="submit" name="_method" value="PATCH" class="btn btn-sm btn-primary pull-right">Save</button>
|
||||
<div class="pull-right">
|
||||
<button type="button" id="testButton" class="btn btn-sm btn-success">Test</button>
|
||||
<button type="button" id="saveButton" class="btn btn-sm btn-primary">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
|
@ -106,3 +109,96 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
{!! Theme::js('js/laroute.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/sweetalert/sweetalert.min.js?t={cache-version}') !!}
|
||||
|
||||
<script>
|
||||
function saveSettings() {
|
||||
return $.ajax({
|
||||
method: 'PATCH',
|
||||
url: Router.route('admin.settings.mail'),
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
'mail:host': $('input[name="mail:host"]').val(),
|
||||
'mail:port': $('input[name="mail:port"]').val(),
|
||||
'mail:encryption': $('select[name="mail:encryption"]').val(),
|
||||
'mail:username': $('input[name="mail:username"]').val(),
|
||||
'mail:password': $('input[name="mail:password"]').val(),
|
||||
'mail:from:address': $('input[name="mail:from:address"]').val(),
|
||||
'mail:from:name': $('input[name="mail:from:name"]').val()
|
||||
}),
|
||||
headers: { 'X-CSRF-Token': $('input[name="_token"]').val() }
|
||||
}).fail(function (jqXHR) {
|
||||
showErrorDialog(jqXHR, 'save');
|
||||
});
|
||||
}
|
||||
|
||||
function testSettings() {
|
||||
swal({
|
||||
type: 'info',
|
||||
title: 'Test Mail Settings',
|
||||
text: 'Click "Test" to begin the test.',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Test',
|
||||
closeOnConfirm: false,
|
||||
showLoaderOnConfirm: true
|
||||
}, function () {
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: Router.route('admin.settings.mail.test'),
|
||||
headers: { 'X-CSRF-Token': $('input[name="_token"]').val() }
|
||||
}).fail(function (jqXHR) {
|
||||
showErrorDialog(jqXHR, 'test');
|
||||
}).done(function () {
|
||||
swal({
|
||||
title: 'Success',
|
||||
text: 'The test message was sent successfully.',
|
||||
type: 'success'
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function saveAndTestSettings() {
|
||||
saveSettings().done(testSettings);
|
||||
}
|
||||
|
||||
function showErrorDialog(jqXHR, verb) {
|
||||
console.error(jqXHR);
|
||||
var errorText = '';
|
||||
if (!jqXHR.responseJSON) {
|
||||
errorText = jqXHR.responseText;
|
||||
} else if (jqXHR.responseJSON.error) {
|
||||
errorText = jqXHR.responseJSON.error;
|
||||
} else if (jqXHR.responseJSON.errors) {
|
||||
$.each(jqXHR.responseJSON.errors, function (i, v) {
|
||||
if (v.detail) {
|
||||
errorText += v.detail + ' ';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
swal({
|
||||
title: 'Whoops!',
|
||||
text: 'An error occurred while attempting to ' + verb + ' mail settings: ' + errorText,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#testButton').on('click', saveAndTestSettings);
|
||||
$('#saveButton').on('click', function () {
|
||||
saveSettings().done(function () {
|
||||
swal({
|
||||
title: 'Success',
|
||||
text: 'Mail settings have been updated successfully and the queue worker was restarted to apply these changes.',
|
||||
type: 'success'
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
@ -60,7 +60,5 @@
|
|||
particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json?t={cache-version}') !!}', function() {});
|
||||
})
|
||||
</script>
|
||||
|
||||
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!} @endif
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -286,9 +286,6 @@
|
|||
{!! Theme::js('vendor/socketio/socket.io.v203.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('js/autocomplete.js?t={cache-version}') !!}
|
||||
@if(config('pterodactyl.lang.in_context'))
|
||||
{!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!}
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->root_admin)
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue