fix wybor tla + form style + date picker

This commit is contained in:
Łukasz Jędyk 2019-01-22 20:26:44 +01:00
parent 4257fd0567
commit 79787db1a5
11 changed files with 56 additions and 16 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,8 +8,8 @@ class ClientForm(ModelForm):
class Meta:
model = Client
fields = '__all__'
labels = {
'id_number': _('Numer dowodu: '),
'name': _('Imię: '),
'surname': _('Nazwisko: ')
}
labels = {
'id_number': _('Numer dowodu '),
'name': _('Imię '),
'surname': _('Nazwisko ')
}

View File

@ -56,3 +56,12 @@ a {
padding: 30px;
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;
}

View File

@ -4,14 +4,29 @@
<head>
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
<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>
<body>
<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="submit" value="Submit">
<input type="submit" value="Rezerwuj">
</form>
</center>
</div>
</body>
</html>
</html>

View File

@ -7,12 +7,15 @@
<title>Hotel INO Scrum</title>
<script>
function changeBackground(imageUrl) {
document.body.style.background = "url(" + imageUrl + ") no-repeat center center fixed";
document.body.style.backgroundSize = "cover";
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>
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
<h1>Hotel INO Scrum</h1>
<center><h3>Lista pokoi dostępnych w naszym hotelu</h3></center>
<table id="hotels">
@ -35,7 +38,9 @@
{% csrf_token %}
<input type="hidden" name="room" value="{{ room.room_number }}">
<div class="button-box" >
<button>Rezerwuj</button>
<button>Rezerwuj</button><br>
<input type="date" name="begindate">
<input type="date" name="enddate">
</div>
</form>
{% else %}
@ -43,7 +48,9 @@
{% csrf_token %}
<input type="hidden" name="room" value="{{ room.room_number }}">
<div class="button-box" >
<button>Rezerwuj</button>
<button>Rezerwuj</button><br>
<input type="date" name="begindate">
<input type="date" name="enddate">
</div>
</form>
{% endif %}

View File

@ -4,9 +4,18 @@
<head>
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
<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>
<body>
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
<br>
<center>
<div id="reservationbox">