Added thesis assignment format
This commit is contained in:
19
ui.js
19
ui.js
@@ -136,6 +136,25 @@ async function collaborators_layout(content, result) {
|
||||
.finish());
|
||||
}
|
||||
|
||||
async function assignment_layout(content, result) {
|
||||
if(!Object.keys(assignment_formats).includes(result.format)) {
|
||||
document.querySelector("#next-button").disabled = true;
|
||||
}
|
||||
|
||||
let buttons = new ButtonListBuilder(Object.keys(assignment_formats))
|
||||
.should_be_pressed((key) => result.format == key)
|
||||
.modify((b, key) => b.class("wide").text(assignment_formats[key].name))
|
||||
.on_click((key) => {
|
||||
result.format = key;
|
||||
document.querySelector("#next-button").disabled = false;
|
||||
})
|
||||
.finish();
|
||||
|
||||
for(const button of buttons) {
|
||||
content.appendChild(button);
|
||||
}
|
||||
}
|
||||
|
||||
async function run() {
|
||||
startbutton.style.cursor = "auto";
|
||||
startbutton.disabled = true;
|
||||
|
Reference in New Issue
Block a user