Add radio buttons for star rating

This commit is contained in:
Sanjit Joseph 2022-11-12 22:22:25 -08:00
parent bf04d82978
commit f9a0a01fb4

View File

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
@ -18,6 +18,7 @@
<script src="/source/assets/scripts/main.js" type="module"></script> <script src="/source/assets/scripts/main.js" type="module"></script>
</head> </head>
<body> <body>
<form id="new-food-entry"> <form id="new-food-entry">
<fieldset> <fieldset>
@ -42,28 +43,16 @@
<textarea name="comments" id="comments"></textarea> <textarea name="comments" id="comments"></textarea>
</label> </label>
</fieldset> </fieldset>
<fieldset>
<legend>Rating</legend>
<label for="rating-0">
0<input type="radio" id="rating-0" value="0" name="rating" required>
</label>
<label for="rating-1">
1<input type="radio" id="rating-1" value="1" name="rating">
</label>
<label for="rating-2">
2<input type="radio" id="rating-2" value="2" name="rating">
</label>
<label for="rating-3">
3<input type="radio" id="rating-3" value="3" name="rating">
</label>
<label for="rating-4">
4<input type="radio" id="rating-4" value="4" name="rating">
</label>
<label for="rating-5">
5<input type="radio" id="rating-5" value="5" name="rating">
</label>
<fieldset class="rating">
<legend> Rating: </legend>
<input type="radio" id="s5" name="rating" value="5"/> <label for="s5"> 5 stars </label>
<input type="radio" id="s4" name="rating" value="4"/> <label for="s4"> 4 stars </label>
<input type="radio" id="s3" name="rating" value="3"/> <label for="s3"> 3 stars </label>
<input type="radio" id="s2" name="rating" value="2"/> <label for="s2"> 2 stars </label>
<input type="radio" id="s1" name="rating" value="1"/> <label for="s1"> 1 star </label>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>Other Info:</legend> <legend>Other Info:</legend>
<label for="restaurant"> <label for="restaurant">
@ -84,4 +73,5 @@
<button type="button" class="danger">Clear Review Journal</button> <button type="button" class="danger">Clear Review Journal</button>
</form> </form>
</body> </body>
</html> </html>