Started working on test edit page; removed nodemon because it wasn't working

This commit is contained in:
2025-07-14 13:53:50 -04:00
parent 9ecff3a25d
commit f81879302d
9 changed files with 101 additions and 142 deletions

53
templates/test/edit.tmpl Normal file
View File

@ -0,0 +1,53 @@
{{ 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" . }}