Add comfirm page, add account and name parameter
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
{{ .Date }} * cash
|
||||
cash ${{ .Amount }}
|
||||
assets:cash
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ledger Quick Note</h1>
|
||||
<form action="/action" method="POST">
|
||||
<form action="/new" method="POST">
|
||||
<label>Action: <select name="action">
|
||||
{{ range .Templates }}
|
||||
{{ if ne .Name "index.html" }}
|
||||
<option value="{{ .Name }}">{{ .Name }}</option>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</select></label>
|
||||
<label>Amount: <input name="amount" type="number"></label>
|
||||
</select></label><br>
|
||||
<label>Amount: <input name="amount" type="number"></label><br>
|
||||
<label>Account: <input name="account" type="text"></label></br>
|
||||
<label>Tx Name: <input name="name" type="text"></label></br>
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>
|
||||
|
||||
13
templates/new.html
Normal file
13
templates/new.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ledger Quick Note</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Comfirm new Tx</h1>
|
||||
<form action="/submit" method="POST">
|
||||
<textarea name="tx" rows="15" cols="40">{{ .Tx }}</textarea><br>
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
12
templates/success.html
Normal file
12
templates/success.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ledger Quick Note</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ledger Quick Note</h1>
|
||||
<p><strong>Success</strong></p>
|
||||
<pre><code>{{ .Tx }}</code></pre>
|
||||
<p><a href="/">Back to home</a></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +0,0 @@
|
||||
{{ .Date }} * withdraw
|
||||
assets:cash ${{ .Amount }}
|
||||
assets:checking
|
||||
|
||||
Reference in New Issue
Block a user