Added study programme selector
This commit is contained in:
23
ui.js
23
ui.js
@@ -110,6 +110,29 @@ async function author_info_layout(content, result) {
|
||||
.finish());
|
||||
}
|
||||
|
||||
async function programme_layout(content, result) {
|
||||
let faculty = steps.faculty.result.name;
|
||||
let programmes_faculty = programmes[faculty];
|
||||
let options = [
|
||||
[[-1, "(žádný)"]],
|
||||
programmes_faculty.map((x, idx) => [
|
||||
idx,
|
||||
"(" + x.title + ", " + x.form.slice(0, 4) + ".) " + x.cs_name
|
||||
])
|
||||
].flat().map(x => new ElementBuilder("option")
|
||||
.value(x[0])
|
||||
.text(x[1])
|
||||
.finish());
|
||||
|
||||
content.appendChild(new ElementBuilder("select")
|
||||
.append_all(options)
|
||||
.on_change(e => result.idx = +e.target.value)
|
||||
.value(result.faculty != faculty ? -1 : result.idx)
|
||||
.finish());
|
||||
|
||||
result.faculty = faculty;
|
||||
}
|
||||
|
||||
async function collaborators_layout(content, result) {
|
||||
let supervisor_name = new TextInputBuilder(result, "supervisor_name")
|
||||
.placeholder("Jméno vedoucího práce (vč. titulů), příp. vedoucích")
|
||||
|
Reference in New Issue
Block a user