mirror of
https://github.com/Rainyy21/Front-end-Design-Project.git
synced 2026-10-10 23:40:24 -04:00
change how the form work
This commit is contained in:
+26
-17
@@ -50,7 +50,7 @@
|
||||
<div id = "seach_bar">
|
||||
|
||||
</div>
|
||||
<div id = "addLog_button">
|
||||
<div id = "openForm">
|
||||
+ log a book/show
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,23 +78,32 @@
|
||||
<div class ="container">
|
||||
<div class = "header-secton">
|
||||
<h1>📚 My Library</h1>
|
||||
|
||||
{% comment %} button {% endcomment %}
|
||||
<button id= "openForm">Add New Entry</button>
|
||||
|
||||
{% comment %} this is the form {% endcomment %}
|
||||
<dialog id="formModal">
|
||||
|
||||
<form action ="/add" method ="dialog" enctype="multipart/form-data">
|
||||
<input type="text" name="title" placeholder="Title" required>
|
||||
<select name="type">
|
||||
<option value="Book">Book</option>
|
||||
<option value="Show">Show</option>
|
||||
</select>
|
||||
<input type="number" name="year" placeholder="Year">
|
||||
<input type="text" name="extra_info" placeholder="Author/Network">
|
||||
<select name="genre_id">
|
||||
{% for g in genres %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="file" name="cover_image">
|
||||
<button type="submit">Add Entry</button>
|
||||
</form>
|
||||
|
||||
</dialog>
|
||||
|
||||
<form action ="/add" method ="POST" enctype="multipart/form-data">
|
||||
<input type="text" name="title" placeholder="Title" required>
|
||||
<select name="type">
|
||||
<option value="Book">Book</option>
|
||||
<option value="Show">Show</option>
|
||||
</select>
|
||||
<input type="number" name="year" placeholder="Year">
|
||||
<input type="text" name="extra_info" placeholder="Author/Network">
|
||||
<select name="genre_id">
|
||||
{% for g in genres %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="file" name="cover_image">
|
||||
<button type="submit">Add Entry</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--the card area-->
|
||||
|
||||
Reference in New Issue
Block a user