PIbd-22_Puchkina_Internet_P.../laba3/page-edit.html

192 lines
6.3 KiB
HTML
Raw Permalink Normal View History

2023-12-02 02:43:00 +04:00
<html lang="ru">
<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="./css/style.css" />
</head>
<body class="h-100 d-flex flex-column">
<header>
<a class="navbar-brand p-0" href="catalog.html">
<img src="images/iconCatalog.png" alt="Каталог" width="45" />
</a>
<a class="nav-link active" aria-current="page" href="index.html">ANNA</a>
<nav>
<a class="navbar-brand p-0" href="cart.html">
<img src="images/iconsCor.png" alt="Корзина" width="37" />
</a>
<a class="navbar-brand p-0" href="account.html">
<img src="images/iconsAcc.png" alt="Аккаунт" width="38" />
</a>
</nav>
</header>
<main class="container-fluid p-2">
<button id="items-add" type="submit" class="btn btn-success">
Добавить товар (диалог)
</button>
2023-12-08 15:57:31 +04:00
2023-12-02 02:43:00 +04:00
<div>
<table id="items-table" class="table table-light table-striped">
<thead>
<th scope="col"></th>
2023-12-15 13:37:52 +04:00
<th scope="col" class="w-10">Категория</th>
<th scope="col" class="w-30">Название</th>
<th scope="col" class="w-20">Цена</th>
<th scope="col" class="w-10">Количество</th>
<th scope="col" class="w-10">Цвет</th>
<th scope="col" class="w-30">Размеры</th>
<th scope="col" class="w-20">Общая цена</th>
2023-12-02 02:43:00 +04:00
<th scope="col"></th>
<th scope="col"></th>
</thead>
<tbody></tbody>
</table>
</div>
</main>
<div
id="items-update"
class="modal fade"
tabindex="-1"
data-bs-backdrop="static"
data-bs-keyboard="false"
>
2023-12-08 15:57:31 +04:00
<div class="modal-dialog modal-dialog-scrollable">
2023-12-02 02:43:00 +04:00
<form id="items-form" class="needs-validation" novalidate>
<div class="modal-content">
2023-12-08 15:57:31 +04:00
<div class="modal-header fixed-header">
2023-12-02 02:43:00 +04:00
<h1 class="modal-title fs-5" id="items-update-title"></h1>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div class="text-center">
<img
id="image-preview"
src="https://via.placeholder.com/200"
class="rounded rounded-circle"
alt="placeholder"
/>
</div>
<input id="items-line-id" type="number" hidden />
<div class="mb-2">
<label for="item" class="form-label">Категория</label>
<select
id="item"
class="form-select"
name="selected"
required
></select>
</div>
<div class="mb-2">
<label class="form-label" for="description">Название</label>
<input
id="name"
name="name"
class="form-control"
type="text"
maxlength="100"
required
/>
</div>
<div class="mb-2">
<label class="form-label" for="price">Цена</label>
<input
id="price"
name="price"
class="form-control"
type="number"
2023-12-08 15:57:31 +04:00
value="0"
min="1000"
2023-12-15 13:37:52 +04:00
step="1"
2023-12-02 02:43:00 +04:00
required
/>
</div>
<div class="mb-2">
<label class="form-label" for="count">Количество</label>
<input
id="count"
name="count"
class="form-control"
type="number"
value="0"
min="1"
step="1"
required
/>
<div class="mb-2">
<label class="form-label" for="color">Цвет</label>
<input
id="color"
name="color"
class="form-control"
2023-12-08 15:57:31 +04:00
type="color"
2023-12-02 02:43:00 +04:00
maxlength="100"
required
/>
</div>
<div class="mb-2">
<label class="form-label" for="size">Размеры</label>
<input
id="size"
name="size"
class="form-control"
type="text"
maxlength="100"
required
/>
</div>
</div>
<div class="mb-2">
<label class="form-label" for="image">Изображение</label>
<input
id="image"
type="file"
name="image"
class="form-control"
accept="image/*"
/>
</div>
</div>
2023-12-08 15:57:31 +04:00
<div class="modal-footer fixed-footer">
2023-12-02 02:43:00 +04:00
<button
type="submit-grey"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
Закрыть
</button>
<button type="submit" class="btn btn-success">Сохранить</button>
</div>
</div>
</form>
</div>
</div>
<script type="module">
import validation from "./js/validation";
import { linesForm } from "./js/lines";
document.addEventListener("DOMContentLoaded", () => {
validation();
linesForm();
});
</script>
</body>
</html>