fah/www/index.html

85 lines
2.7 KiB
HTML
Raw Normal View History

2024-10-28 20:24:12 +01:00
<html>
<head>
<link rel="stylesheet" href="/adminlte.css">
<!--
<style>
body {
max-width: 70em;
}
</style>
-->
</head>
<body class="sidebar-mini layout-fixed layout-navbar-fixed sidebar-collapse">
<nav class="main-header navbar navbar-expand navbar-light">
<ul class="navbar-nav ">
<li class="nav-item"><a class="nav-link" href="/">Passwortschreiben</a></li>
<li class="nav-item"><a class="nav-link" href="/handy.html">Handyausgabe</a></li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<!--
<li class="nav-item"><input type="button" value="Abmelden" style="float: right;" onclick="document.getElementById('Formcode').submit(); "></li>
-->
</ul>
</nav>
<!--
<aside class="main-sidebar sidebar-light-primary elevation-4">
Menü1<br/>Menü2<br/>Menü3<br/>
</aside>
-->
<div class="content-wrapper px-4 py-2">
<div class="content-header" id="CellContent">
</div>
</div>
<div id="FrameDok1" style="display: none;">
<h1>Passwortschreiben:</h1>
<form method="post" id="Formcode" action="/api/passwort" enctype="multipart/form-data">
Anrede:<input type="text" id="anrede" class="form-control">
Vorname: <input type="text" id="vorname" class="form-control">
Nachname: <input type="text" id="nachname" class="form-control">
Benutzername:<input type="text" id="benutzername" class="form-control">
Passwort: <input type="text" id="passwort" class="form-control">
Abteilung: <input type="text" id="abteilung" class="form-control">
Email: <input type="text" id="email" class="form-control">
Datum: <input type="text" id="datum" class="form-control">
<input type="button" value="PDF erstellen" onclick="SendForm(); ">
</form>
</div>
<script src="/jquery.min.js"></script>
<script>
$(document).ready(function() {
var dialog = $(FrameDok1).html();
$(CellContent).html(dialog);
});
function SendForm() {
var FormData = {
"Anrede" : $(anrede).val(),
"Vorname" : $(vorname).val(),
"Nachname" : $(nachname).val(),
"Benutzername" : $(benutzername).val(),
"Passwort" : $(passwort).val(),
"Abteilung" : $(abteilung).val(),
"Email" : $(email).val(),
"Datum" : $(datum).val()
}
$.ajax({
type: "POST",
url: "/api/passwort",
crossDomain: true,
contentType: 'application/json',
dataType: "json",
cache : false,
data: JSON.stringify(FormData),
success: function(content) {
window.open('/data/passwort.pdf', '_blank', 'fullscreen=yes');
}
});
}
</script>
</body>
</html>