Files
rezepte-app/public/edit.html

87 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rezept bearbeiten</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div class="form-container">
<a href="/index.html" class="custom-button">Zurück zur Übersicht</a>
<button id="viewRecipeBtn" class="custom-button" style="display:none;">Rezept anzeigen</button>
<h1 id="pageTitle">Neues Rezept</h1>
<form id="recipeForm">
<input type="hidden" id="recipeId" name="id">
<table>
<tr>
<th>Rezeptnummer:</th>
<td><input type="number" id="rezeptnummer" name="rezeptnummer" required></td>
</tr>
<tr>
<th>Bezeichnung:</th>
<td><input type="text" id="bezeichnung" name="bezeichnung"></td>
</tr>
<tr>
<th>Beschreibung:</th>
<td><textarea id="beschreibung" name="beschreibung"></textarea></td>
</tr>
<tr>
<th>Kategorie:</th>
<td><input type="text" id="kategorie" name="kategorie"></td>
</tr>
<tr>
<th>Vorbereitung:</th>
<td><textarea id="vorbereitung" name="vorbereitung"></textarea></td>
</tr>
<tr>
<th>Anzahl der Personen:</th>
<td><input type="number" id="anzahl" name="anzahl" value="2" min="0" required></td>
</tr>
<tr>
<th>Zutaten:</th>
<td><textarea id="zutaten" name="zutaten"></textarea></td>
</tr>
<tr>
<th>Zubereitung:</th>
<td><textarea id="zubereitung" name="zubereitung"></textarea></td>
</tr>
<tr>
<th>Kommentar:</th>
<td><textarea id="kommentar" name="kommentar"></textarea></td>
</tr>
<tr>
<th>Bilder hochladen:</th>
<td>
<div class="file-upload-row">
<div class="file-upload-container">
<button type="button" class="file-upload-btn" onclick="document.getElementById('fileInput').click()">
Bild auswählen
</button>
<input type="file" id="fileInput" accept=".jpg,.jpeg,.png" style="display:none;">
</div>
<button type="button" id="uploadImageBtn" class="save-single-image-btn">Bild speichern</button>
</div>
<div id="bildvorschau" class="bilder-container"></div>
</td>
</tr>
</table>
<div class="button-container">
<button type="submit" class="submit-btn">Speichern</button>
<button type="button" id="deleteBtn" class="delete-btn" style="display:none;">Rezept löschen</button>
</div>
</form>
</div>
<div id="lightbox" onclick="closeLightbox()">
<span class="close">&times;</span>
<img id="lightbox-img" src="" alt="Vergrößerte Ansicht">
</div>
<script src="/js/edit.js"></script>
</body>
</html>