Mobile Integration: * in footer.php js eingefügt damit das mobile Menu funktioniert * in menu.php bzw. app.css neue Klasse eingefügt mobile-hide um in der mobilen Version Menupünkte zu verstecken Pop Multiple Networks * Pops können nun mehrere Netzgebiete haben * Netzgebiete und Pop ansicht angepasst * (Script muss ausgeführt werden um die PopNetwork Table vom Bestand zu befüllen) DataTables responsible update * Datatables update und responsible addon * Diverse Anpassungen für Responsible in: - Pops, Geräte Hersteller, Geräte Typen, Devices, Benutzer Migrations * PopNetwork * Poprackmodulepatch
165 lines
7.9 KiB
PHP
165 lines
7.9 KiB
PHP
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
|
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
|
type="text/css"/>
|
|
<!-- start page title -->
|
|
<style>
|
|
|
|
.fa-new-code {
|
|
cursor: pointer;
|
|
color: #007bff;
|
|
font-size: 16px;
|
|
margin-left: 5px;
|
|
}
|
|
|
|
.alert {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
</style>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
|
|
</li>
|
|
<li class="breadcrumb-item"><a
|
|
href="<?= self::getUrl("UserProfile") ?>">Benutzerprofil</a></li>
|
|
<li class="breadcrumb-item active">bearbeiten</li>
|
|
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">Benutzerprofil</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
<?php
|
|
$twofa = $userprofile->twofactor;
|
|
if ($twofa == 0) {
|
|
$formAction = self::getUrl("UserProfile", 'save');
|
|
} elseif ($twofa == 1) {
|
|
$formAction = self::getUrl("UserProfile", 'save');
|
|
} elseif ($twofa == 2) {
|
|
$formAction = self::getUrl("UserProfile", 'save');
|
|
}
|
|
?>
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="header-title mb-2">Allgemeine Daten</h4>
|
|
|
|
<form class="form-horizontal" method="post"
|
|
action="<?= $formAction ?>">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
|
|
<input type="hidden" name="id" value="<?= $devicetypes->id ?>"/>
|
|
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="name">Name *</label>
|
|
<div class="col-lg-3">
|
|
<input type="text" class="form-control input-control" name="name" id="name"
|
|
value="<?= $userprofile->name ?>">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="email">Email *</label>
|
|
<div class="col-lg-3">
|
|
<input type="text" class="form-control input-control" name="email" id="email"
|
|
required="required"
|
|
value="<?= $userprofile->email ?>" <?php if ($twofa == 1) : ?> disabled="disabled" <?php endif; ?> />
|
|
</div>
|
|
<?php if ($twofa == 1) : ?>
|
|
<div class="col-lg-4 ">
|
|
|
|
<div class="info-span alert alert-info"> Um die Email Adresse zu ändern
|
|
bitte 2FA auf SMS umschalten.
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="olt">Mobiltelefon</label>
|
|
<div class="col-lg-3">
|
|
<input placeholder="+4366411223344" type="text"
|
|
class="form-control input-control"
|
|
name="mobile" id="mobile"
|
|
value="<?= $userprofile->mobile ?>" <?php if ($twofa == 2) : ?> disabled="disabled" <?php endif; ?>/>
|
|
</div>
|
|
<?php if ($twofa == 2) : ?>
|
|
<div class="col-lg-4 ">
|
|
<span class="info-span alert alert-info"> Um die Mobilnummer zu ändern bitte 2FA auf Email umschalten.</span>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div id="verification2fa" class="form-group row" style="display:none">
|
|
<label class="col-lg-2 col-form-label" for="olt">Verifizierungscode<i
|
|
data-codetype="<?= $twofa ?>"
|
|
class="fa-solid fa-arrows-rotate fa-new-code" id="new-authcode"
|
|
title="Neuen Code anfordern."></i></label>
|
|
<div class="col-lg-2">
|
|
<input type="number" min="0" max="99999" class="form-control"
|
|
name="code" id="code"/>
|
|
</div>
|
|
<label class="col-lg-4 col-form-label" for="olt">Verifizierungscode wurde versendet
|
|
(5 Minuten gültig)</label>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-lg-2"></label>
|
|
<div class="col-lg-10">
|
|
<button id="submit" type="submit" data-codetype="<?= $twofa ?>"
|
|
class="btn btn-primary">Speichern
|
|
</button>
|
|
<a href="<?= self::getUrl("UserProfile") ?>">
|
|
<button type="button" class="btn btn-secondary">Abbrechen</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
var verficationtype = <?= $twofa ?>;
|
|
$('form').submit(function (e) {
|
|
var me = this;
|
|
if ($('#verification2fa').is(":hidden")) {
|
|
if (verficationtype > 0) {
|
|
e.preventDefault();
|
|
$('.input-control').attr('readonly', true);
|
|
$('#verification2fa').show();
|
|
$('#code').attr("required", true);
|
|
|
|
$.getJSON("<?= self::getUrl("UserProfile", "api", ['do' => 'sendcode', 'twofactor' => $twofa]) ?>", {}).done(function (data) {
|
|
}).fail(function (jqxhr, textStatus, error) {
|
|
window.location.href = "<?= self::getUrl("Dashboard") ?>";
|
|
});
|
|
}
|
|
}
|
|
});
|
|
$("body").on("click", "#new-authcode", function (event) {
|
|
$.getJSON("<?= self::getUrl("UserProfile", "api", ['do' => 'sendcode', 'twofactor' => $twofa]) ?>", {}).done(function (data) {
|
|
$("#new-authcode").hide(0).delay(5000).show(0);
|
|
}).fail(function (jqxhr, textStatus, error) {
|
|
window.location.href = "<?= self::getUrl("Dashboard") ?>";
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|