Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/pretalx/orga/templates/orga/cfp/flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="{% static "common/css/headers-uncompressed.css" %}" />
{% compress css %}
<link rel="stylesheet" href="{% static "orga/css/flow.css" %}">
{% endcompress %}
<link rel="stylesheet" href='{% static "orga/css/flow.css" %}'>
{% endblock stylesheets %}

{% block scripts %}
Expand Down
3 changes: 2 additions & 1 deletion src/pretalx/static/orga/css/flow.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
position: relative;
user-select: none;
margin-right: 270px;
width: 100%;

#steps {
display: flex;
Expand Down Expand Up @@ -103,7 +104,7 @@
margin-bottom: 0;
bottom: 1px;
left: 250px;
right: 0;
right: 250px;
box-shadow: var(--shadow-dialog);
button {
margin-left: auto;
Expand Down
27 changes: 17 additions & 10 deletions src/pretalx/static/orga/js/cfp_flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var api = {
}

let currentLanguage = "en"
let currentModal = Vue.observable({
let currentModal = Vue.reactive({
type: null,
data: null,
show: false,
Expand Down Expand Up @@ -127,7 +127,7 @@ function areEqual() {
return true
}

Vue.component("field", {
const FieldComponent = {
template: `
<div>
<h2 v-if="isModal" class="mb-4">Change input field</h2>
Expand Down Expand Up @@ -231,7 +231,7 @@ Vue.component("field", {
makeModal(event) {
if (this.isModal) return
if (!this.isModal && !this.editable) {
Vue.set(currentModal, "data", null)
currentModal.data = null
currentModal.type = null
currentModal.show = false
} else {
Expand All @@ -247,9 +247,9 @@ Vue.component("field", {
"",
)
},
})
}

Vue.component("step", {
const StepComponent = {
template: `
<div class="step" @click="editingTitle = false; editingText = false">
<div :class="['step-header', 'header', eventConfiguration.header_pattern]" :style="headerStyle">
Expand Down Expand Up @@ -283,8 +283,12 @@ Vue.component("step", {
</span>
</div>
<form v-if="step.identifier != 'user'">
<field :field="field" v-for="field in step.fields" :key="field.key" :locales="locales" v-if="field.widget !== 'HiddenInput'">
</field>
<template v-for="field in step.fields" :key="field.key">
<field v-if="field && field.widget !== 'HiddenInput'"
:field="field"
:locales="locales">
</field>
</template>
</form>
<form v-else id="auth-form">
<div class="auth-form-block">
Expand Down Expand Up @@ -376,10 +380,9 @@ Vue.component("step", {
return result
},
},
})
}

var app = new Vue({
el: "#flow",
const app = Vue.createApp({
template: `
<div :class="currentModal.data ? 'defocused' : 'focused'" :style="{'--color': eventConfiguration.primary_color || '#2185d0'}">
<div id="flow-modal" v-if="currentModal.data">
Expand Down Expand Up @@ -488,3 +491,7 @@ var app = new Vue({
},
},
})

app.component("field", FieldComponent)
app.component("step", StepComponent)
app.mount("#flow")
Loading
Loading