vitya_brodov
@vitya_brodov
Java dev

Почему не работает Navbar?

Не работает navbar, а точнее при переходе на другую страницу выдает 400 ошибку. В чем может быть проблема?
<!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/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/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="src=@{'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>


623871870d2d8737451929.png
  • Вопрос задан
  • 212 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы