payment-poc/templates/index.gohtml

62 lines
2.1 KiB
Plaintext
Raw Normal View History

2023-07-10 08:10:13 +00:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Index</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<style>
th {text-align: left}
2023-07-30 10:14:05 +00:00
tr > td:nth-child(3) {
2023-07-10 08:10:13 +00:00
text-align: right;
}
2023-07-30 10:14:05 +00:00
tr > th:nth-child(3) {
2023-07-26 07:51:29 +00:00
text-align: right;
}
2023-07-10 08:10:13 +00:00
td, th {
padding: 0 8px;
}
h2 {
margin-top: 16px;
}
</style>
</head>
<body class="container">
2023-07-30 10:14:05 +00:00
<h2>Novo plaćanje</h2>
2023-07-10 08:10:13 +00:00
2023-07-26 07:51:29 +00:00
<form method="get" action="/methods">
2023-07-10 08:10:13 +00:00
<div class="mb-3">
<label class="form-label" for="amount">Vrijednost</label>
<input class="form-control" id="amount" required name="amount" type="number" step="0.01" min="0">
</div>
2023-07-30 10:14:05 +00:00
<button class="btn btn-primary" type="submit">Izradi novo plaćanje</button>
2023-07-10 08:10:13 +00:00
</form>
<div>
2023-07-30 10:14:05 +00:00
<h2>Entries</h2>
2023-07-26 07:51:29 +00:00
<table class="table">
<thead>
<tr>
<th>Id</th>
2023-07-30 10:14:05 +00:00
<th>Gateway</th>
2023-07-26 07:51:29 +00:00
<th>Vrijednost</th>
<th>Stanje</th>
</tr>
</thead>
<tbody>
2023-07-30 10:14:05 +00:00
{{range .Entries}}
2023-07-26 07:51:29 +00:00
<tr>
2023-07-30 10:14:05 +00:00
<td><a class="link-primary" href="/entries/{{.Id}}">{{.Id}}</a></td>
<td>{{.Gateway}}</td>
<td>{{formatCurrency .TotalAmount}}</td>
<td>{{formatState .State}}</td>
</tr>
{{end}}
</tbody>
</table>
2023-07-10 08:10:13 +00:00
</div>
</body>
</html>