Hotel/hotel/rooms/templates/form.html

36 lines
1.1 KiB
HTML

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
<meta charset="UTF-8">
<title>Formularz rezerwacji</title>
<script>
function changeBackground(imageUrl) {
if(imageUrl != null) {
document.body.style.background = "url(" + imageUrl + ") no-repeat center center fixed";
document.body.style.backgroundSize = "cover";
localStorage.backgroundImage = imageUrl;
}
}
</script>
</head>
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
<br>
<center>
<h1>Formularz rezerwacji</h1>
<div id="reservationform">
<form action="" method="post">
{{ error }}
{% csrf_token %}
{{ form.as_p }}
<input type="hidden" name="room" value="{{ room_number }}">
<input type="hidden" name="begindate" value="{{ begin_date }}">
<input type="hidden" name="enddate" value="{{ end_date }}">
<input type="submit" value="Rezerwuj">
</form>
</center>
</div>
</body>
</html>