-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added button and Controler "/addAccount"
- Loading branch information
Showing
5 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
13 changes: 8 additions & 5 deletions
13
Back/Spring/backend/src/main/java/pl/zeto/backend/VMC/controller/AccountController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
Back/Spring/backend/src/main/resources/templates/adding new account.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="http://www.thymeleaf.org"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Dodaj konto walutowe</title> | ||
<link rel="stylesheet" href="/webjars/bootstrap/5.1.3/css/bootstrap.min.css" /> | ||
</head> | ||
<body class="d-flex flex-column min-vh-100" > | ||
|
||
<nav class="navbar navbar-expand-lg navbar-light bg-light"> | ||
<a class="navbar-brand" href="#">Kantor Walut</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
Konto Walutowe | ||
</a> | ||
<div class="dropdown-menu" aria-labelledby="navbarDropdown" th:if="${not #lists.isEmpty(accounts)}"> | ||
<a class="dropdown-item" th:each="account : ${accounts}" th:text="${account.name}" th:href="@{/selectAccount(accountId=${account.id})}"></a> | ||
</div> | ||
</li> | ||
<li class="nav-item"><a class="nav-link" href="/addAccount">Dodaj konto walutowe</a></li> | ||
<li class="nav-item"><a class="nav-link" href="#">Profil</a></li> | ||
<li class="nav-item"><a class="nav-link" href="#">Ustawienia</a></li> | ||
<li class="nav-item"><a class="nav-link" href="#">Wiadomości</a></li> | ||
</ul> | ||
<form class="form-inline" action="/logout" method="post"> | ||
<input type="hidden" name="_csrf" th:value="${_csrf.token}"/> | ||
<button class="btn btn-outline-danger my-2 my-sm-0" type="submit">Wyloguj się</button> | ||
</form> | ||
</div> | ||
</nav> | ||
<div class="container mt-5"> | ||
|
||
<h2>Dodaj konto walutowe</h2> | ||
<form th:action="@{/addAccount}" th:object="${account}" method="post"> | ||
<div class="mb-3"> | ||
<label for="name" class="form-label">Nazwa konta</label> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="currency" class="form-label">Waluta</label> | ||
<select class="form-select" id="currency" th:field="*{currency}" required> | ||
<option value="" selected>Wybierz...</option> | ||
<option th:each="currency : ${currencies}" th:value="${currency}" th:text="${currency}"></option> | ||
</select> | ||
</div> | ||
<button type="submit" class="btn btn-primary">Dodaj</button> | ||
</form> | ||
</div> | ||
<footer class="mt-auto"> | ||
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2); flex-grow: 1;"> | ||
© 2024 Kantor Walut, Wszelkie prawa zastrzeżone. | ||
</div> | ||
</footer> | ||
<script src="/webjars/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters