Files
blt/templates/test/edit.tmpl

54 lines
1.8 KiB
Cheetah

{{ template "header" . }}
<div class="row">
<h2>{{ .title }}</h2>
<form class="twelve columns" action="/test/{{ .test.ID }}/edit" method="POST">
<div class="row">
<div class="columns four">
<label for="test_hardware">
Hardware Component:
<select id="test_hardware" class="u-full-width" name="test_hardware">
{{ $testHardwareID := .test.Hardware.ID }}
{{ range $hw := .hardware }}
<option value="{{ $hw.ID }}" {{ if eq $testHardwareID $hw.ID }}selected{{ end }}>{{ $hw.Name }}</option>
{{ end }}
</select>
</label>
</div>
<div class="columns eight">
<label for="test_name">
Test name:
<input id="test_name" class="u-full-width" type="text" name="test_name" placeholder="My hardware benchmarking test" value="{{ .test.Name }}">
</label>
</div>
</div>
<div class="row">
<div class="columns twelve">
<label for="test_benchmarks">
Benchmarks to Test:
<select id="test_benchmarks" class="u-full-width" name="test_benchmarks" multiple>
{{ $testBenchmarks := .test.Benchmarks }}
{{ range $bm := .benchmarks }}
<option value="{{ $bm.ID }}" {{ if contains $testBenchmarks $bm.ID }}selected{{ end }}>{{ $bm.Name }}</option>
{{ end }}
</select>
</label>
</div>
</div>
<div class="row">
<label for="test_description">
Test description:
<textarea id="test_description" class="twelve columns" cols="30" rows="10" name="test_description"></textarea>
</label>
</div>
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
{{ template "footer" . }}