Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions css/reservations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
body{
background-color: #fdd46b;

}


.container{
width: 550px;
height: 500px;
background-color: whitesmoke;
border-radius: 10px; /*gives rounded corners*/
position: relative;
margin: 8% auto;

}


h2{
text-align: center;
margin-bottom: 40px;
color: #03071E;
}


.container form{
width: 380px;
top: 40px;
left: 60px;
position: absolute; /*positioned relative to the container */

}

form input{
width: 100%;
padding: 10px 5px;
margin: 5px 0;
border: 0px;
border-bottom: 1px solid #999;
outline: none;
color: transparent;
}

.btn-box{

width: 100px;
margin: 30px auto;
margin-left: 125px;
text-align: center;

}

form button{
width: 150px;
height: 50px;
background: linear-gradient( to right, #ff105f ,#ffad06);
border-radius: 30px;
border:0px;
cursor:pointer; /*makes the arrow as hand when hovering over the button*/

}

#form2{
left: 600px;
}


#form3{
left: -500px;
}
7 changes: 5 additions & 2 deletions js/reservation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ let buttons = document.getElementById('confirm');
document.addEventListener('submit', validateForm);

let cardName=document.getElementById('fullName');

function validateForm(event) {

alert(`${cardName.value} Thank you for confirming your reservation`);
event.preventDefault();

table.textContent='';
}


Expand All @@ -25,7 +28,6 @@ fees.appendChild(extraF);
function calculate() {
let weight = document.getElementById('weight').value;

console.log(weight);

if (weight <= 20) {

Expand All @@ -35,9 +37,10 @@ function calculate() {

extraF.textContent = `${(weight - 20) * 5} $`;


}
}

}



Expand Down
108 changes: 61 additions & 47 deletions pages/reservations.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/reservations.css">
<title>Document</title>
</head>
<body>
Expand All @@ -23,67 +24,80 @@
</header>
<main>
<h1>hello</h1>
<h2>Hello, to confirm your reservation please fill the following form </h2>
<form id="info">
<fieldset>
<label for="fullName">Full Name:</label><br>
<input type="text" id="fullName" name="fullName" required><br>
<label for="phoneNumb">Phone Number:</label><br>
<input type="number" id="phoneNumb" name="phoneNumb" required><br>
<label for="email">Email Address:</label><br>
<input type="email" id="email" name="email" required><br>
<label for="address">Address:</label><br>
<input type="text" id="address" name="address" required><br>
<br>
<br>
<h3>Payment Method</h3>

<div class="container">
<!-- The box that holds the form -->


​<form id="form1">

<h2>PERSONAL INFO</h2>
<input type="text" id="fullName" name="fullName" placeholder="Full Name" required>
<input type="number" id="phoneNumb" name="phoneNumb" placeholder="Phone Number" required>
<input type="email" id="email" name="email" placeholder="Email" required>
<input type="text" id="address" name="address" placeholder="Home Address" required>
<div class="btn-box">

<button type="button">Next</button>
</div>

</form>



<form id="form2">
<h2>Payment Method</h2>



<label for="cardName">Name on Card</label><br>
<input type="text" id="cardName" name="cardname" placeholder="John More Doe" required ><br>
<input type="text" id="cardName" name="cardname" placeholder="John More Doe" required >
<label for="cardNum">Credit card number</label><br>
<input type="number" id="cardNum" name="cardNum" placeholder="1111-2222-3333-4444" required><br>
<input type="number" id="cardNum" name="cardNum" placeholder="1111-2222-3333-4444" required>
<label for="expmonth">Exp Month</label><br>
<input type="text" id="expmonth" name="expmonth" placeholder="September" required><br>
<input type="text" id="expmonth" name="expmonth" placeholder="September" required>
<label for="expyear">Exp Year</label><br>
<input type="text" id="expyear" name="expyear" placeholder="2018" required><br>
<input type="text" id="expyear" name="expyear" placeholder="2018" required>

<label for="cvv">CVV</label><br>
<input type="number" id="cvv" name="cvv" placeholder="352" required><br>
<br>
<input type="number" id="cvv" name="cvv" placeholder="352" required>


<br>
<br>
<div class="btn-box">
<button type="button">Back</button>
<button type="button">Next</button>
</div>
​</form>


<form id="form3">
<h2>Extra luggage weight fee</h2>
<h3>Extra luggage weight fee</h3>

<input type="number" name="weight" id="weight" placeholder="Expected Luggage Weight" onchange="calculate()"><br>
<label for="weight"></label><br>
<input type="number" name="weight" id="weight" onchange="calculate()"><br>
<h3 id="fees">Fees:</h3>

<!-- <button id='confirm' type="submit">Submit</button> -->
<div class="btn-box">
<button type="button">Back</button>
<button type="submit" id="confirm">Submit</button>
</div>

</form>
<h3 id="fees">Fees</h3>
<button id='confirm' type="submit">Submit</button>
</div>

</fieldset>
</form>

<div id="table"></div>
</main>
Expand All @@ -104,4 +118,4 @@ <h3 id="fees">Fees</h3>

<script src="../js/reservation.js"></script>
</body>
</html>
</html>