summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-04-11 07:13:48 +0300
committerGrailFinder <wohilas@gmail.com>2024-04-11 07:13:48 +0300
commit9b160dcc0315aaf54a8b4588be9d2a0c98084cf0 (patch)
treef1068c6b70612d41a76b947370808cf147e45382 /components
parent499dcd25aa8d1f878b379e2ca8f94417807c4afb (diff)
Enha: make html elements to react; repeatable separation
Diffstat (limited to 'components')
-rw-r--r--components/actions_table.html5
-rw-r--r--components/add_action_form.html4
2 files changed, 4 insertions, 5 deletions
diff --git a/components/actions_table.html b/components/actions_table.html
index 8b151e5..24a4f9c 100644
--- a/components/actions_table.html
+++ b/components/actions_table.html
@@ -22,7 +22,7 @@
</tr>
{{range $action := .Actions}}
{{if and (eq $action.Type "ActionTypePlus") (or (not $action.Done) ($action.Repeatable))}}
- <form hx-post="/done">
+ <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML">
<tr>
<td><input class="action_name" name="name" value={{$action.Name}} type="hidden" readonly />{{$action.Name}}</td>
<td>{{$action.Magnitude}}</td>
@@ -45,10 +45,9 @@
</tr>
{{range $action := .Actions}}
{{if eq $action.Type "ActionTypeMinus"}}
- <form hx-post="/done">
+ <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML">
<tr>
<td><input class="action_name" name="name" value={{$action.Name}} type="hidden" readonly />{{$action.Name}}</td>
- <td>{{$action.Name}}</td>
<td>{{$action.Magnitude}}</td>
<td>{{$action.Repeatable}}</td>
<td><input type="submit" value="Done It"></input></td>
diff --git a/components/add_action_form.html b/components/add_action_form.html
index 95c869f..ac65ca0 100644
--- a/components/add_action_form.html
+++ b/components/add_action_form.html
@@ -7,8 +7,8 @@
<input type="text" name="name"><br />
<label>Magnitude:</label><br />
<input type="number" value="1" name="magnitude"><br />
- <label>Repeatable:</label><br />
- <input type="checkbox" name="repeatable"></input><br />
+ <!-- <label>Repeatable:</label><br /> -->
+ <!-- <input type="checkbox" name="repeatable"></input><br /> -->
<input type="radio" name="act_type" value="plus" checked>
<label for="plus">Plus</label>
<input type="radio" name="act_type" value="minus">