fix wybor tla + form style + date picker
This commit is contained in:
parent
4257fd0567
commit
79787db1a5
BIN
hotel/db.sqlite3
BIN
hotel/db.sqlite3
Binary file not shown.
BIN
hotel/rooms/__pycache__/forms.cpython-36.pyc
Normal file
BIN
hotel/rooms/__pycache__/forms.cpython-36.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,8 +8,8 @@ class ClientForm(ModelForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Client
|
model = Client
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
labels = {
|
labels = {
|
||||||
'id_number': _('Numer dowodu: '),
|
'id_number': _('Numer dowodu '),
|
||||||
'name': _('Imię: '),
|
'name': _('Imię '),
|
||||||
'surname': _('Nazwisko: ')
|
'surname': _('Nazwisko ')
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -56,3 +56,12 @@ a {
|
|||||||
padding: 30px;
|
padding: 30px;
|
||||||
border: 2px solid grey;
|
border: 2px solid grey;
|
||||||
}
|
}
|
||||||
|
#reservationform {
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 30px;
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
width: 40%;
|
||||||
|
padding: 10px;
|
||||||
|
border: 2px solid grey;
|
||||||
|
}
|
||||||
|
@ -4,14 +4,29 @@
|
|||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Title</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
|
||||||
|
<br>
|
||||||
|
<center>
|
||||||
|
<h1>Formularz rezerwacji</h1>
|
||||||
|
<div id="reservationform">
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{{ error }}
|
{{ error }}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
<input type="submit" value="Submit">
|
<input type="submit" value="Rezerwuj">
|
||||||
</form>
|
</form>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -7,12 +7,15 @@
|
|||||||
<title>Hotel INO Scrum</title>
|
<title>Hotel INO Scrum</title>
|
||||||
<script>
|
<script>
|
||||||
function changeBackground(imageUrl) {
|
function changeBackground(imageUrl) {
|
||||||
document.body.style.background = "url(" + imageUrl + ") no-repeat center center fixed";
|
if(imageUrl != null) {
|
||||||
document.body.style.backgroundSize = "cover";
|
document.body.style.background = "url(" + imageUrl + ") no-repeat center center fixed";
|
||||||
|
document.body.style.backgroundSize = "cover";
|
||||||
|
localStorage.backgroundImage = imageUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
|
||||||
<h1>Hotel INO Scrum</h1>
|
<h1>Hotel INO Scrum</h1>
|
||||||
<center><h3>Lista pokoi dostępnych w naszym hotelu</h3></center>
|
<center><h3>Lista pokoi dostępnych w naszym hotelu</h3></center>
|
||||||
<table id="hotels">
|
<table id="hotels">
|
||||||
@ -35,7 +38,9 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="room" value="{{ room.room_number }}">
|
<input type="hidden" name="room" value="{{ room.room_number }}">
|
||||||
<div class="button-box" >
|
<div class="button-box" >
|
||||||
<button>Rezerwuj</button>
|
<button>Rezerwuj</button><br>
|
||||||
|
<input type="date" name="begindate">
|
||||||
|
<input type="date" name="enddate">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -43,7 +48,9 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="room" value="{{ room.room_number }}">
|
<input type="hidden" name="room" value="{{ room.room_number }}">
|
||||||
<div class="button-box" >
|
<div class="button-box" >
|
||||||
<button>Rezerwuj</button>
|
<button>Rezerwuj</button><br>
|
||||||
|
<input type="date" name="begindate">
|
||||||
|
<input type="date" name="enddate">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -4,9 +4,18 @@
|
|||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Zarezerwowano pokój</title>
|
<title>Rezerwacja</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>
|
</head>
|
||||||
<body>
|
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
|
||||||
<br>
|
<br>
|
||||||
<center>
|
<center>
|
||||||
<div id="reservationbox">
|
<div id="reservationbox">
|
||||||
|
Loading…
Reference in New Issue
Block a user