Answer the question
In order to leave comments, you need to log in
Why is Navbar not working?
The navbar does not work, or rather, when switching to another page, it gives a 400 error. What could be the problem?
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:pth="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>Get Qr Code</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="main.html">QR<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="import-page.html">Загурзить файл</a>
</li>
</ul>
</div>
</nav>
</header>
<div align="center" style="margin-top: 50px">
<div class="w-25 m-2">
<form th:action="@{/get}" th:object="${qrCode}" >
<input type="text" class="form-control mb-2" th:name="inn" placeholder="Введите ИНН" aria-label="Введите ИНН" aria-describedby="basic-addon2">
<div class="input-group-append">
<button type="submit" class="btn btn-outline-secondary">Получить QR</button>
</div>
</form>
<p th:if="${error}" th:text="${error}" style="color: red;font-weight: bold"></p>
<table class="table table-bordered" th:if="${qrCode!=null}" style="margin-top: 40px;" >
<thead class="thead-light">
<tr >
<div style="align-items: center;display: flex; justify-content: center;">
<th class="text-center" scope="col">Наименование</th>
<th class="text-center" scope ="col">QR</th>
</div>
</tr>
</thead>
<tbody class="table-body">
<tr th:block th:each="qr : ${qrCode}" >
<td class="align-middle"><p th:text="${qr.name}"></p></td>
<td><a th:download="${qr.name.isEmpty()} ? ${inn} : (${qr.name.equals('-')} ? ${inn} : ${qr.name} )" th:href="@{'data:image/png;base64,'+${qr.qrImage}}"><img th:attr="[email protected]{'data:image/png;base64,'+${qr.qrImage}}" width="300" height="300"/></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Import excel</title>
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="main.html">QR<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="import-page.html">Загурзить файл</a>
</li>
</ul>
</div>
</nav>
</header>
<div align="center" class="mainPage" style="margin-top: 50px" id="txn_result">
<form th:action="@{/import}" method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="formFile" class="form-label" > <b>Введите EXCEL файл</b></label>
<input class="form-control" type="file" id="formFile" name="rbs_file">
</div>
<p style="text-align: center ; color: red"><b>Выберите тип файла</b></p>
<select name="type" id="type">
<option value="choice">Выбрать</option>
<option value="EMPLOYEE">Сотрудник</option>
<option value="PARTNER">Партнер</option>
</select>
<input type="submit" value="import" class="ui-button"/>
</form>
<!-- <div th:if="${FormatError}" style="text-align: center ; color: red">У выводимых файлов неверное разширения! </div>-->
</div>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question