summaryrefslogtreecommitdiff
path: root/components/add_action_form.html
blob: 95c869f0375dbef53d1c642dfb6378d99a3e7d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{{define "actionform"}}
<div id="actionform">
    <button button id="create-form-btn" type="submit" class="justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" hx-get="/hideform" hx-target="#actionform">HIDE FORM</button>
    <h1>Add action</h1>
    <form method="POST">
        <label>Name:</label><br />
        <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 />
        <input type="radio" name="act_type" value="plus" checked>
        <label for="plus">Plus</label>
        <input type="radio" name="act_type" value="minus">
        <label for="minus">Minus</label><br>
        <input type="submit">
    </form>
</div>
{{end}}

{{define "showformbtn"}}
<div id="actionform">
    <button button id="create-form-btn" type="submit" class="justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" hx-get="/showform" hx-target="#actionform">SHOW FORM</button>
</div>
{{end}}