added more billing components.

This commit is contained in:
Blake Ridgway
2026-04-16 21:30:11 -05:00
parent a621b1deb9
commit ffc2bde162
7 changed files with 157 additions and 43 deletions

View File

@@ -4,6 +4,7 @@
{{define "nav-actions"}}
<form method="POST" action="/logout" style="display:inline;">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<button class="btn btn--ghost btn--sm" type="submit">logout</button>
</form>
{{end}}
@@ -60,6 +61,7 @@
<div class="dash-actions">
<form method="POST" action="/cancel"
onsubmit="return confirm('Are you sure you want to cancel your subscription? This cannot be undone.')">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<button class="btn btn--danger btn--sm" type="submit">cancel subscription</button>
</form>
</div>
@@ -109,8 +111,8 @@
<tbody>
{{range .Invoices}}
<tr class="inv-table__row">
<td class="inv-table__td inv-table__td--muted">{{.CreatedAt | slice 0 10}}</td>
<td class="inv-table__td inv-table__td--muted">{{.PeriodStart | slice 0 10}} {{.PeriodEnd | slice 0 10}}</td>
<td class="inv-table__td inv-table__td--muted">{{.CreatedAt | fmtDate}}</td>
<td class="inv-table__td inv-table__td--muted">{{.PeriodStart | fmtDate}} {{.PeriodEnd | fmtDate}}</td>
<td class="inv-table__td inv-table__td--right">{{.AmountDisplay}}</td>
<td class="inv-table__td"><span class="status-badge status-badge--{{.Status}}">{{.Status}}</span></td>
<td class="inv-table__td">

View File

@@ -25,6 +25,7 @@
{{end}}
<form method="POST" action="/login" class="form">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div class="form__group">
<label class="form__label" for="email">Email</label>
<input class="form__input" type="email" id="email" name="email"

View File

@@ -17,12 +17,14 @@
{{else if eq .Error "password_mismatch"}}Passwords do not match.
{{else if eq .Error "password_too_short"}}Password must be at least 8 characters.
{{else if eq .Error "email_taken"}}An account with that email already exists.
{{else if eq .Error "invalid_email"}}Please enter a valid email address.
{{else if eq .Error "server_error"}}A server error occurred. Please try again.
{{else}}An error occurred. Please try again.{{end}}
</div>
{{end}}
<form method="POST" action="/register" class="form">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div class="form__row">
<div class="form__group">
<label class="form__label" for="first_name">First name</label>

View File

@@ -23,6 +23,7 @@
{{end}}
<form method="POST" action="/reset/{{.Token}}" class="form">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div class="form__group">
<label class="form__label" for="password">New password <span class="form__hint">(min. 8 characters)</span></label>
<input class="form__input" type="password" id="password" name="password"

View File

@@ -29,6 +29,7 @@
</p>
<form method="POST" action="/reset" class="form">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div class="form__group">
<label class="form__label" for="email">Email</label>
<input class="form__input" type="email" id="email" name="email"