74 lines
2.3 KiB
Plaintext
74 lines
2.3 KiB
Plaintext
{{- /*gotype: main.CreateDeviceVM */}}
|
|
{{define "create_device_step2"}}
|
|
{{template "header" "Create Device - Enter Device Data"}}
|
|
<form action="/create" method="post">
|
|
<h2>General Information</h2>
|
|
<table>
|
|
<tr>
|
|
<td><label for="qr">QR Code:</label></td>
|
|
{{if .Qr}}
|
|
<td><input type="number" id="qr" name="qr" value="{{.Qr}}" required readonly></td>
|
|
{{else}}
|
|
<td><input type="number" id="qr" name="qr" required></td>
|
|
{{end}}
|
|
</tr>
|
|
<tr>
|
|
<td><label for="asset_type">Type:</label></td>
|
|
<td><input type="text" id="asset_type" name="asset_type" required readonly value="{{.Type}}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="asset_brand">Brand:</label></td>
|
|
<td><select id="asset_brand" name="asset_brand" onchange="newOption('asset_brand', 'Brand')">
|
|
<option value="Unknown" selected>Unknown</option>
|
|
{{range .Brands}}
|
|
{{if ne . "Unknown"}}
|
|
<option value="{{.}}">{{.}}</option>
|
|
{{end}}
|
|
{{end}}
|
|
<option>New...</option>
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="asset_name">Name:</label></td>
|
|
<td><input type="text" id="asset_name" name="asset_name"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="asset_description">Description:</label></td>
|
|
<td><textarea id="asset_description" name="asset_description"></textarea></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Memory Information</h2>
|
|
<table>
|
|
<tr>
|
|
<td><label for="ram_type">Type:</label></td>
|
|
<td><select id="ram_type" name="ram_type" onchange="newOption('ram_type', 'Memory Type')">
|
|
<option value="Unknown" selected>Unknown</option>
|
|
{{range .RamTypes}}
|
|
{{if ne . "Unknown"}}
|
|
<option value="{{.}}">{{.}}</option>
|
|
{{end}}
|
|
{{end}}
|
|
<option>New...</option>
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="ram_capacity">Capacity:</label></td>
|
|
<td>
|
|
<input type="number" id="ram_capacity" name="ram_capacity">
|
|
<select id="ram_capacity_unit" name="ram_capacity_unit">
|
|
<option value="B">B</option>
|
|
<option value="KB">KB</option>
|
|
<option value="MB" selected>MB</option>
|
|
<option value="GB">GB</option>
|
|
<option value="TB">TB</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<button type="submit">Create</button>
|
|
</form>
|
|
{{template "footer"}}
|
|
{{end}}
|