Skip to content

Commit 61f001f

Browse files
fix(web): no js forms
1 parent a958b64 commit 61f001f

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

web/views/endpoints.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ <h4>Config</h4>
7070
</form>
7171
{{ end }}
7272

73-
<button hx-post="/endpoints/{{$val.ID}}/test" data-loading-disable data-loading-aria-busy>Test Endpoint</button>
73+
<form method="post" action="/endpoints/{{$val.ID}}/test" hx-post="/endpoints/{{$val.ID}}/test"
74+
class="pico-form-reset">
75+
<button type="submit" data-loading-disable data-loading-aria-busy>
76+
Test Endpoint
77+
</button>
78+
</form>
7479
</article>
7580
{{end}}
7681
</main>

web/views/index.html

+12-8
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ <h2>Recent Envelopes</h2>
1212
<h2>Storage</h2>
1313
<figure>{{template "p/storage-table" .}}</figure>
1414
<div class="grid">
15-
<button hx-post="/vacuum" data-loading-path="/vacuum" data-loading-disable data-loading-aria-busy
16-
title="Rebuild database file to take the minimal amount of disk space.">
17-
Vacuum Database
18-
</button>
19-
<button hx-post="/trim" data-loading-path="/trim" data-loading-disable data-loading-aria-busy
20-
title="Apply retention policy against data.">
21-
Trim Data
22-
</button>
15+
<form method="post" action="/vacuum" hx-post="/vacuum" class="pico-form-reset">
16+
<button data-loading-path="/vacuum" data-loading-disable data-loading-aria-busy
17+
title="Rebuild database file to take the minimal amount of disk space.">
18+
Vacuum Database
19+
</button>
20+
</form>
21+
<form method="post" action="/trim" hx-post="/trim" class="pico-form-reset">
22+
<button hx-post="/trim" data-loading-path="/trim" data-loading-disable data-loading-aria-busy
23+
title="Apply retention policy against data.">
24+
Trim Data
25+
</button>
26+
</form>
2327
<button hx-delete="/envelopes" data-loading-path="/envelopes" data-loading-disable data-loading-aria-busy
2428
hx-confirm="Are you sure you wish to delete all envelopes?" class="contrast">
2529
Delete Envelopes

0 commit comments

Comments
 (0)