internet-programming/lab3/makingOrder.html

151 lines
6.5 KiB
HTML
Raw Normal View History

2024-01-12 14:27:01 +04:00
<html lang="ru" class="h-100">
<head>
<meta charset="UTF-8">
<title>Оформление заказа</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="./node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="./style.css">
</head>
<body class="d-flex flex-column h-100">
<header>
<nav class="navbar navbar-expand-md">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="Images/logo.png" alt="logo" width="128">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse justify-content-start" id="navbarNav">
<div class="navbar-nav">
<a class="nav-link" href="index.html">Каталог</a>
<a class="nav-link" href="aboutUs.html">О нас</a>
<a class="nav-link" href="paymentAndDelivery.html">Оплата и доставка</a>
<a class="nav-link" href="contacts.html">Контакты</a>
</div>
</div>
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
<div class="navbar-nav">
<a class="btn custom-btn" href="account.html">Профиль</a>
<a class="btn" href="basket.html">Корзина</a>
</div>
</div>
</div>
</nav>
</header>
<main class="container-fluid p-2">
<section class="h-100">
<div class="mask d-flex align-items-center h-100 gradient-custom-3">
<div class="container h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col-12 col-md-9 col-lg-7 col-xl-6">
<div class="card" style="border-radius: 15px; border-color:#7bca8c;">
<div class="card-body p-5">
<h2 class="text-success text-center mb-5">Оформление заказа</h2>
<form>
<div class="form-outline mb-4">
<input type="text" id="form3Example1cg" class="form-control form-control-lg" />
<label class="form-label" for="form3Example1cg">Ваше имя</label>
</div>
<div class="form-outline mb-4">
<input type="tel" id="form3Example5cg" class="form-control form-control-lg" />
<label class="form-label" for="form3Example5cg">Номер телефона</label>
</div>
<label class="form-check-label" for="creditCard">Вариант получения</label>
<div class="form-check mb-4">
<input class="form-check-input" type="radio" name="deliveryMethod" id="selfPickup" value="selfPickup">
<label class="form-check-label" for="selfPickup">Самовывоз</label>
</div>
<div class="form-check mb-4">
<input class="form-check-input" type="radio" name="deliveryMethod" id="delivery" value="delivery">
<label class="form-check-label" for="delivery">Доставка</label>
</div>
<div class="form-outline mb-4" id="deliveryAddress" style="display: none;">
<input type="text" id="form3ExampleAddress" class="form-control form-control-lg" />
<label class="form-label" for="form3ExampleAddress">Ваш адрес доставки</label>
</div>
<div class="row mb-4">
<div class="col">
<div class="form-outline">
<input type="text" id="formNameOnCard" class="form-control">
<label class="form-label" for="formNameOnCard">Имя держателя карты</label>
</div>
</div>
<div class="col">
<div class="form-outline">
<input type="text" id="formCardNumber" class="form-control" />
<label class="form-label" for="formCardNumber">Номер карты</label>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-3">
<div class="form-outline">
<input type="text" id="formExpiration" class="form-control" />
<label class="form-label" for="formExpiration">Срок действия</label>
</div>
</div>
<div class="col-3">
<div class="form-outline">
<input type="text" id="formCVV" class="form-control" />
<label class="form-label" for="formCVV">CVV</label>
</div>
</div>
</div>
</div>
<div class="d-flex justify-content-center">
<button class="btn" style="margin-bottom: 20px;" type="button" id="saveButton">Оформить</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function() {
$('input[type=radio][name=deliveryMethod]').change(function() {
if (this.value === 'delivery') {
$('#deliveryAddress').show();
$('#deliveryTimeOptions').show();
} else {
$('#deliveryAddress').hide();
$('#deliveryTimeOptions').hide();
}
});
$('input[type=radio][name=paymentMethod]').change(function() {
if (this.value === 'creditCard') {
$('#creditCardDetails').show();
} else {
$('#creditCardDetails').hide();
}
});
});
</script>
</main>
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center">
Все права защищены © 2023-2024
</footer>
</body>
</html>