Google2Fa ready to upload
This commit is contained in:
parent
e3495be8b8
commit
73e38a006e
127 changed files with 2637 additions and 589 deletions
31
resources/views/admin/active_modal.blade.php
Normal file
31
resources/views/admin/active_modal.blade.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
</div>
|
||||
{!! Form::open(['url' => route('admin_user_update_modal', [$action]), 'class' => 'form-horizontal']) !!}
|
||||
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id" value="{{ $user->id }}">
|
||||
<input type="hidden" name="action" id="action" value="{{ $action }}">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
{{ Form::text('email', $user->email, array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'readonly')) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
{!! Form::checkbox('active', 1, $user->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">User aktiv</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
60
resources/views/admin/google2fa__modal.blade.php
Normal file
60
resources/views/admin/google2fa__modal.blade.php
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title">{{__('User')}}<span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
</div>
|
||||
{!! Form::open(['url' => route('admin_user_update_modal', [$action]), 'class' => 'form-horizontal']) !!}
|
||||
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id" value="{{ $user->id }}">
|
||||
<input type="hidden" name="action" id="action" value="{{ $action }}">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
{{ Form::text('email', $user->email, array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'readonly')) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="admin" class="form-label">{{__('Role')}}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="admin">
|
||||
{!! HTMLHelper::getRolesOptions($user->admin) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@foreach($groups as $role_id => $permissions)
|
||||
<h6>{{$roles[$role_id]}}</h6>
|
||||
@foreach($permissions as $key=>$val)
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
{!! Form::checkbox('permissions['.$key.']', 1, $user->isPermission($key), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label custom-control-label-{{$val['color']}}">{{$val['name']}}</span>
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
<hr>
|
||||
@endforeach
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
{!! Form::checkbox('confirmed', 1, $user->confirmed, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('verified')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
{!! Form::checkbox('active', 1, $user->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('active')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
35
resources/views/admin/google2fa_delete_modal.blade.php
Normal file
35
resources/views/admin/google2fa_delete_modal.blade.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title">Google2Fa</h5>
|
||||
</div>
|
||||
{!! Form::open(['url' => route('admin_user_update_modal', [$action]), 'class' => 'form-horizontal']) !!}
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id" value="{{ $user->id }}">
|
||||
<input type="hidden" name="action" id="action" value="{{ $action }}">
|
||||
|
||||
<style>
|
||||
.qrcode {
|
||||
display: inline-block;
|
||||
width: 280px;
|
||||
margin: 20px 0px 25px 0px;
|
||||
padding: 15px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div class="text-center">
|
||||
<h5>{{ $MyGoogle2FA->getBy('name') }} | {{ $MyGoogle2FA->getBy('email') }}</h5>
|
||||
<p>Zwei-Faktor-Authentifizierung zurücksetzen.</p>
|
||||
<br>
|
||||
</div>
|
||||
<hr>
|
||||
<p><strong>Vor</strong> der Aktivierung wird beim Login er QR-Code und Secret Key angezeigt, um die Google2FA einzurichten.</p>
|
||||
<p><strong>Nach</strong> der Aktivierung wird beim Login die Google2FA abgefragt.</p>
|
||||
<p><strong>Zurücksetzen</strong> eines aktivierten Codes erzeugt einen neuen Google2FA Code der erneut in die Google Authenticator App hinzugefügt werden muss.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-danger">{{__('Google2FA jetzt zurücksetzen')}}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
41
resources/views/admin/google2fa_modal.blade.php
Normal file
41
resources/views/admin/google2fa_modal.blade.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title">Google2Fa</h5>
|
||||
</div>
|
||||
{!! Form::open(['url' => route('admin_user_update_modal', [$action]), 'class' => 'form-horizontal']) !!}
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id" value="{{ $user->id }}">
|
||||
<input type="hidden" name="action" id="action" value="{{ $action }}">
|
||||
|
||||
<style>
|
||||
.qrcode {
|
||||
display: inline-block;
|
||||
width: 280px;
|
||||
margin: 20px 0px 25px 0px;
|
||||
padding: 15px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div class="text-center">
|
||||
<h5>{{ $MyGoogle2FA->getBy('name') }} | {{ $MyGoogle2FA->getBy('email') }}</h5>
|
||||
<p>Richten Sie Ihre Zwei-Faktor-Authentifizierung ein, indem Sie mit der Google Authenticator App den Barcode unten scannen.</p>
|
||||
<br>
|
||||
<div><strong>Secret Key</strong></div>
|
||||
<div class="key">{{ $MyGoogle2FA->getBy('secretKey') }}</div>
|
||||
|
||||
<div class="qrcode">
|
||||
{!! $MyGoogle2FA->getBy('inlineUrl') !!}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<p><strong>Vor</strong> der Aktivierung wird beim Login er QR-Code und Secret Key angezeigt, um die Google2FA einzurichten.</p>
|
||||
<p><strong>Nach</strong> der Aktivierung wird beim Login die Google2FA abgefragt.</p>
|
||||
<p><strong>Zurücksetzen</strong> eines aktivierten Codes erzeugt einen neuen Google2FA Code der erneut in die Google Authenticator App hinzugefügt werden muss.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('Google2FA jetzt aktivieren')}}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<div class="modal-content">
|
||||
{!! Form::open(['url' => $data['url'], 'class' => '', 'enctype' => 'multipart/form-data']) !!}
|
||||
{{ Form::hidden('id', $data['id']) }}
|
||||
{{ Form::hidden('back', $data['back']) }}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
Buchnungen PDF Inhalte
|
||||
<span class="font-weight-light">anlegen/bearbeiten</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">Name*</label>
|
||||
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="general_id" class="form-label">{{__('Vorlage')}}*</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="general_id" data-live-search="true" required>
|
||||
{!! HTMLHelper::getCMSContentOptions($data['identifier'], $value->getObjectBy('general_id'), false) !!}
|
||||
</select>
|
||||
<i>Ein PDF Inhalt benötigt eine Vorlage mit min einen Eintrag.</i>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="country_ids" class="form-label">für folgende Länder benutzen (Mehrfachauswahl möglich)</label>
|
||||
{{ Form::select('country_ids[]', \App\Models\TravelCountry::getAsNameIdArray() , [], array('class'=>'selectpicker', 'id'=>'country_ids', 'data-style'=>"btn-default", 'multiple')) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('content[page-break]', 1, 1, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">Bei jeder Buchung automatisch erstellen (sonst kann es manuell in der Buchung erstellt werden)</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('content[page-break]', 1, 1, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">PDF Inhalt aktiv (nicht aktive Inhalte werden nicht angezeigt und nicht automatisch erstellt)</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="newOrSaveName">hinzufügen</button>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
|
@ -22,14 +22,6 @@
|
|||
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
@if(isset($isFromAdmin))
|
||||
@if(count($user->user_update_email) > 0)
|
||||
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
|
||||
@endif
|
||||
<a href="{{ route('admin_user_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
|
||||
@else
|
||||
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
|
||||
@endif
|
||||
@else
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title">{{__('User')}}<span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
</div>
|
||||
{!! Form::open(['url' => route('admin_user_update_modal', ['user']), 'class' => 'form-horizontal']) !!}
|
||||
{!! Form::open(['url' => route('admin_user_update_modal', [$action]), 'class' => 'form-horizontal']) !!}
|
||||
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id" value="{{ $user->id }}">
|
||||
<input type="hidden" name="action" id="action" value="{{ $action }}">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
|
|
@ -37,13 +38,6 @@
|
|||
<hr>
|
||||
@endforeach
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
{!! Form::checkbox('confirmed', 1, $user->confirmed, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('verified')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
{!! Form::checkbox('active', 1, $user->active, ['class'=>'custom-control-input']) !!}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('Zugang')}}</th>
|
||||
<th>{{__('verified')}}</th>
|
||||
<th>{{__('Google2FA')}}</th>
|
||||
<th>{{__('active')}}</th>
|
||||
<th>{{__('delete')}}</th>
|
||||
</tr>
|
||||
|
|
@ -42,6 +42,46 @@
|
|||
|
||||
|
||||
<script>
|
||||
|
||||
function update_modal_data_show(e, $ele) {
|
||||
e.preventDefault();
|
||||
|
||||
var ele = $ele,
|
||||
url = ele.data('url'),
|
||||
data = {id:ele.data('data'), action:ele.data('action')};
|
||||
|
||||
console.log(data);
|
||||
console.log(url);
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: data,
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
cache: false,
|
||||
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
encode: true,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
// do what ever you want here. add content to <div> if it was not 1 .
|
||||
//console.log(data);
|
||||
$('#update-modal-content').html(data);
|
||||
$('.selectpicker').selectpicker(["refresh"]);
|
||||
$('.input-daterange').datepicker({toggleActive: true,format: 'dd.mm.yyyy'});
|
||||
// $.Nestable.init();
|
||||
$('#updateModalShow').modal('show');
|
||||
},
|
||||
error: function(xhr, status, errorThrown) {
|
||||
console.log(xhr);
|
||||
console.log(xhr.responseText);
|
||||
console.log(status);
|
||||
console.log("Sorry, there was a problem!");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-users').dataTable({
|
||||
"processing": true,
|
||||
|
|
@ -52,7 +92,7 @@
|
|||
{ data: 'name', name: 'name' },
|
||||
{ data: 'email', name: 'email' },
|
||||
{ data: 'admin', name: 'admin' },
|
||||
{ data: 'confirmed', name: 'confirmed' },
|
||||
{ data: 'google2fa', name: 'google2fa' },
|
||||
{ data: 'active', name: 'active' },
|
||||
{ data: 'action_delete', orderable: false, searchable: false},
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue