author_genders
-> author_pronouns
This commit is contained in:
12
ui.js
12
ui.js
@@ -50,15 +50,15 @@ async function author_info_layout(content, result) {
|
||||
.on_input((e) => result.name = e.target.value)
|
||||
.finish();
|
||||
|
||||
if(!Object.keys(genders).includes(result.gender)) {
|
||||
if(!Object.keys(pronounss).includes(result.pronouns)) {
|
||||
document.querySelector("#next-button").disabled = true;
|
||||
}
|
||||
|
||||
let gender_buttons = new ButtonListBuilder(Object.keys(genders))
|
||||
.should_be_pressed((key) => result.gender == key)
|
||||
.modify((b, key) => b.class("expand").text(genders[key].name))
|
||||
let pronouns_buttons = new ButtonListBuilder(Object.keys(pronounss))
|
||||
.should_be_pressed((key) => result.pronouns == key)
|
||||
.modify((b, key) => b.class("expand").text(pronounss[key].name))
|
||||
.on_click((key) => {
|
||||
result.gender = key;
|
||||
result.pronouns = key;
|
||||
document.querySelector("#next-button").disabled = false;
|
||||
})
|
||||
.finish();
|
||||
@@ -69,7 +69,7 @@ async function author_info_layout(content, result) {
|
||||
.text("Způsob sebeoslovení")
|
||||
.finish());
|
||||
content.appendChild(new ElementBuilder("div.horizontal-list")
|
||||
.append_all(gender_buttons)
|
||||
.append_all(pronouns_buttons)
|
||||
.finish());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user