@leroysheep / BookAlchemy Mirror · read-only
Fork 0

Mirrored from https://github.com/LeeRoySheep/BookAlchemy.git

Synced Nov 2, 19:30 UTC

master
html 44 lines 1.35 KB
Raw
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta http-equiv="X-UA-Compatible" content="ie=edge">
7 <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
8 </head>
9 <body>
10 <header><h1>📖 Add Book:</h1></header>
11 <main>
12 {% if success %}
13 <h2>Book added successfully!</h2>
14 {% elif success==False %}
15 <h2>{{ error }}</h2>
16 {% endif %}
17 <form action="/add_book" method="POST">
18
19 <label for="isbn">ISBN:</label>
20 <input type="string" id="isbn" name="isbn" ><br><br>
21
22 <label for="title">Book Title:</label>
23 <input type="text" id="title" name="title" required><br><br>
24
25 <label for="year">Publication Year:</label>
26 <input type="number" id="year" name="year" required><br><br>
27
28 <label for="author">Author:</label>
29 <select id="author" name="author" required>
30 {% for author in authors %}
31 <option value="{{ author.id }}">{{ author.name }}</option>
32 {% endfor %}
33 </select>
34 <br><br>
35
36 <label for="rating">Rating:</label>
37 <input type="number" id="rating" name="rating" step="0.1" min="0.0" max="10.0"><br><br>
38
39 <input type="submit" value="Add Book">
40 </form>
41 <a href="/"><button>Home</button></a>
42 </main>
43 </body>
44 </html>