Skip to content

Commit

Permalink
Fix slot rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanw committed Aug 1, 2023
1 parent b73a348 commit 0fcc2c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="document-uploader mb-3 mt-3">
<div v-if="imageDocuments.length > 0" class="images mt-5">
<template v-html="slots['convert-images']" />
<div v-html="slots['convert-images']" />
<image-document
v-for="doc in imageDocuments"
:key="doc.id"
Expand All @@ -16,7 +16,7 @@
@notnew="doc.new = false" />
</div>
<div v-if="pdfDocuments.length > 0" class="documents mt-5">
<template v-html="slots['documents']" />
<div v-html="slots['documents']" />
<div class="mt-3 mb-3">
<div class="row bg-body-secondary pb-2 pt-2 mb-2 border-bottom">
<div class="col-auto me-md-auto">
Expand Down Expand Up @@ -64,7 +64,7 @@

<div v-if="otherAttachments.length > 0" class="mt-5">
<hr />
<template v-html="slots['other-files']" />
<div v-html="slots['other-files']" />
<file-document
v-for="doc in otherAttachments"
:key="doc.id"
Expand All @@ -76,7 +76,7 @@
</div>

<div v-if="canUpload" class="upload mt-5">
<template v-html="slots['upload-header']" />
<div v-html="slots['upload-header']" />
<file-uploader
class="mb-3 mt-2"
:config="config"
Expand Down
30 changes: 7 additions & 23 deletions frontend/javascript/components/makerequest/request-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:hide-publicbody-chooser="hidePublicbodyChooser" />

<div :class="{ container: !multiRequest, 'container-multi': multiRequest }">
<slot name="messages" />
<div v-html="slots['messages']" />

<div class="row justify-content-lg-center">
<div class="col-lg-12">
Expand All @@ -22,15 +22,15 @@
:scope="pbScope"
:config="config">
<template #publicbody-missing>
<template v-html="slots['publicbody-missing']" />
<div v-html="slots['publicbody-missing']" />
</template>
</publicbody-multi-chooser>
</div>
<div v-else>
<div class="row">
<div class="col-lg-7">
<template v-html="slots['publicbody-legend-title']" />
<template v-html="slots['publicbody-help-text']" />
<div v-html="slots['publicbody-legend-title']" />
<div v-html="slots['publicbody-help-text']" />
</div>
</div>
<div class="row">
Expand All @@ -54,7 +54,7 @@
</template>
</div>
<div class="col-lg-4 small">
<slot name="publicbody-missing" />
<div v-html="slots['publicbody-missing']" />
</div>
</div>
</div>
Expand Down Expand Up @@ -90,10 +90,10 @@
:submitting="submitting"
@setStepSelectPublicBody="setStepSelectPublicBody">
<template #request-hints>
<slot name="request-hints" />
<div v-html="slots['request-hints']" />
</template>
<template #request-legend-title>
<slot name="request-legend-title" />
<div v-html="slots['request-legend-title']" />
</template>
</request-form>

Expand Down Expand Up @@ -358,22 +358,6 @@ export default {
this.updateFullText(value)
}
},
firstName: {
get() {
return this.$store.state.user.first_name
},
set(value) {
this.updateFirstName(value)
}
},
lastName: {
get() {
return this.$store.state.user.last_name
},
set(value) {
this.updateLastName(value)
}
},
email: {
get() {
return this.$store.state.user.email
Expand Down

0 comments on commit 0fcc2c8

Please sign in to comment.