about summary refs log tree commit diff
path: root/templates/botNew.html
blob: 1d6e8a31d034fd3619afa952fa61370d29581c9c (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{{ define "botNew" }}

{{ template "head" . }}
<body>
  {{ template "nav" . }}

  <span id="newbot"></span>
  <h1><a href="#newbot">New Bot</a></h1>
  
  This is the page on which you can submit your bots

  <form method="POST" action="/bot/new">
    <table>
      <tr>
        <td><label for="name">Name:</label></td>
        <td><input class="border" type="text" id="name" name="name"></td>
      </tr>

      <tr>
        <td>Archs</td>
        <td>
          {{ range $idx, $arch := .archs }}{{if $idx}},{{end}}
            <input
              type="checkbox"
              class="check-with-label"
              name="arch-{{$arch.ID}}"
              id="arch-{{$arch.ID}}"/>
            <label class="label-for-check" for="arch-{{$arch.ID}}">{{$arch.Name}}</label>
          {{- end }}
        </td>
      </td>

      <tr>
        <td>Bits</td>
        <td>{{ range $idx, $bit := .bits }}{{if $idx}},{{end}}
          <input
            type="checkbox"
            class="check-with-label"
            id="bit-{{$bit.ID}}"
            name="bit-{{$bit.ID}}"/>
          <label class="label-for-check" for="bit-{{$bit.ID}}">{{$bit.Name}}</label>
          {{- end }}
        </td>
      </td>

      <tr>
        <td><label for="source">Source:</label></td>
        <td><textarea
              class="border"
              id="source"
              name="source"
              cols="80"
              rows="15"></textarea></td>
      </tr>

      <tr>
        <td></td>
        <td><input type="submit" value="Submit"></td>
      </tr>

      <tr>
        <td></td>
        <td>{{ .res }}</td>
      </tr>
    </table>
  </form>
</body>
{{ template "footer" . }}
{{ end }}