Fix test creation page

This commit is contained in:
andrew committed 2023-05-20 08:09:22 -04:00
1 parent faff329962
commit 6ab3d18b33
4 files changed
+67 -13

No files matched your search

+32
View File
@@ -2,6 +2,14 @@
width: 25%;
}
.w-21 {
width: 21%;
}
.w-42 {
width: 42%;
}
.w-50 {
width: 50%;
}
@@ -10,6 +18,10 @@
width: 75%;
}
.w-84 {
width: 84%;
}
.w-100 {
width: 100%;
}
@@ -26,10 +38,18 @@
max-width: 75%;
}
.mw-84 {
max-width: 84%;
}
.mw-100 {
max-width: 100%;
}
.mt-0 {
margin-top: 0.00rem;
}
.mt-1 {
margin-top: 0.25rem;
}
@@ -50,6 +70,10 @@
margin-top: 3rem;
}
.mb-0 {
margin-bottom: 0.00rem;
}
.mb-1 {
margin-bottom: 0.25rem;
}
@@ -70,6 +94,10 @@
margin-bottom: 3rem;
}
.ml-0 {
margin-left: 0.00rem;
}
.ml-1 {
margin-left: 0.25rem;
}
@@ -90,6 +118,10 @@
margin-left: 3rem;
}
.mr-0 {
margin-right: 0.00rem;
}
.mr-1 {
margin-right: 0.25rem;
}
+8
View File
@@ -1,3 +1,11 @@
#content .form .col-half {
display: inline-block;
width: 21%;
white-space: normal;
box-sizing: border-box;
vertical-align: top;
}
#content .form .col {
display: inline-block;
width: 42%;
+1
View File
@@ -194,6 +194,7 @@ body, html, main{
#content .btn-start {
background-color: #384A5F;
width: 100%;
}
#content .btn-preset {
+26 -13
View File
@@ -76,17 +76,31 @@
while (button_div.hasChildNodes())
button_div.removeChild(button_div.lastChild);
var index = 0;
var index = -1;
for (let mode in engines[engine].testmodes) {
index++;
btn = document.createElement('button')
btn.innerHTML = mode;
btn.onclick = function() { set_test_mode(mode); };
{# btn.class = (++index % 2) ? "left-floated" : "right-floated";#}
btn.classList.add("anchorbutton")
btn.classList.add("btn-preset")
btn.classList.add("mr-2")
btn.classList.add("mt-2")
button_div.append(btn);
btn.classList.add("anchorbutton");
btn.classList.add("btn-preset");
btn.classList.add("mt-2");
btn.classList.add("w-100");
div = document.createElement('div')
div.appendChild(btn)
div.classList.add("col-half");
if ((index % 4) != 0)
div.classList.add("pl-1");
if ((index % 4) != 3)
div.classList.add("pr-1");
button_div.append(div);
}
var devnet = document.getElementById("devnetwork");
@@ -147,7 +161,6 @@
<form method="POST" action="/newTest/">
{% csrf_token %}
<div class="form w-100">
<div class="col">
@@ -272,17 +285,17 @@
</div>
</div>
<input type="submit" class="anchorbutton btn-start mt-3 ml-3 w-100" name="submit" value="Create Engine Test">
</form>
<input type="submit" class="anchorbutton btn-start mt-3 mw-84" name="submit" value="Create Engine Test">
<div class="form">
<div class="col-full">
<div class="row flex">
<div class="ml-3" id="test-mode-buttons">
<div id="test-mode-buttons">
<!-- Generated based on the selected Engine -->
</div>
</div>
</div>
</div>
</form>
{% endblock %}