Skip to content

Commit 8ff3df0

Browse files
fixed no display
1 parent 7285cf4 commit 8ff3df0

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/pretalx/static/orga/js/cfp_flow.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const { createApp, reactive } = Vue;
2-
31
var api = {
42
submit(data) {
53
var fullHeaders = {}
@@ -32,7 +30,7 @@ var api = {
3230
}
3331

3432
let currentLanguage = "en"
35-
let currentModal = reactive({
33+
let currentModal = Vue.reactive({
3634
type: null,
3735
data: null,
3836
show: false,
@@ -60,17 +58,15 @@ document.onclick = (event) => {
6058
currentModal.data = null
6159
}
6260
}
63-
document.onkeydown = (event) => {
64-
if (!currentModal.data) return;
65-
let isEscape = false;
66-
if ("key" in event) {
67-
isEscape = event.key === "Escape" || event.key === "Esc";
61+
document.onkeypress = (event) => {
62+
if (!currentModal.data) return
63+
let isEscape = false
64+
if ("key" in evt) {
65+
isEscape = evt.key === "Escape" || evt.key === "Esc"
6866
} else {
69-
isEscape = event.keyCode === 27;
70-
}
71-
if (isEscape) {
72-
currentModal.data = null;
67+
isEscape = evt.keyCode === 27
7368
}
69+
currentModal.data = null
7470
}
7571

7672
function areEqual() {
@@ -287,8 +283,12 @@ const StepComponent = {
287283
</span>
288284
</div>
289285
<form v-if="step.identifier != 'user'">
290-
<field :field="field" v-for="field in step.fields" :key="field.key" :locales="locales" v-if="field.widget !== 'HiddenInput'">
291-
</field>
286+
<template v-for="field in step.fields" :key="field.key">
287+
<field v-if="field && field.widget !== 'HiddenInput'"
288+
:field="field"
289+
:locales="locales">
290+
</field>
291+
</template>
292292
</form>
293293
<form v-else id="auth-form">
294294
<div class="auth-form-block">
@@ -382,7 +382,7 @@ const StepComponent = {
382382
},
383383
}
384384

385-
const app = createApp({
385+
const app = Vue.createApp({
386386
template: `
387387
<div :class="currentModal.data ? 'defocused' : 'focused'" :style="{'--color': eventConfiguration.primary_color || '#2185d0'}">
388388
<div id="flow-modal" v-if="currentModal.data">
@@ -492,6 +492,6 @@ const app = createApp({
492492
},
493493
})
494494

495-
app.component('field', FieldComponent)
496-
app.component('step', StepComponent)
497-
app.mount('#flow')
495+
app.component("field", FieldComponent)
496+
app.component("step", StepComponent)
497+
app.mount("#flow")

0 commit comments

Comments
 (0)