Skip to content

Commit d0fe2cb

Browse files
authored
fix: edit Process : open pdf in edit mode not possible - EXO-81254 (#461)
Prior to this commit, pdf forms cannot be edited when editing a workflow This change resolves this by opening the form in edit mode when editing the workflow.
1 parent 847bfdd commit d0fe2cb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

processes-webapp/src/main/webapp/vue-app/processes/components/AddWorkFlowDrawer.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@
286286
:workflow-parent-space="workflowParentSpace"
287287
:allow-doc-form-creation="true"
288288
:edit-mode="editMode"
289+
:edit-workflow="true"
289290
:entity-id="workflow.id"
290291
entity-type="workflow" />
291292
<v-btn

processes-webapp/src/main/webapp/vue-app/processes/components/attachments-integration/ProcessesAttachments.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export default {
8585
type: Boolean,
8686
default: false,
8787
},
88+
editWorkflow: {
89+
type: Boolean,
90+
default: false,
91+
},
8892
entityType: {
8993
type: String,
9094
default: null
@@ -127,7 +131,8 @@ export default {
127131
attachments: JSON.parse(JSON.stringify(this.attachments)),
128132
spaceId: this.workflowParentSpace && this.workflowParentSpace.id,
129133
attachToEntity: this.editMode,
130-
openAttachmentsInEditor: true
134+
openAttachmentsInEditor: true,
135+
canFillAttachments: !this.editWorkflow
131136
};
132137
},
133138
attachmentsLength() {
@@ -153,6 +158,8 @@ export default {
153158
this.$root.$emit('attachments-updated',this.attachments);
154159
});
155160
this.$root.$on('add-new-created-form-document', (doc) => {
161+
doc.acl.canEdit = true;
162+
doc.acl.canView = true;
156163
this.attachments.push(doc);
157164
this.subscribeDocument(doc.id);
158165
this.$root.$emit('attachments-updated', this.attachments);
@@ -189,7 +196,7 @@ export default {
189196
},
190197
isFileFillable(attachment) {
191198
const type = attachment && attachment.mimetype || '';
192-
return type === 'application/pdf';
199+
return !this.editWorkflow && type === 'application/pdf';
193200
},
194201
refreshSupportedDocumentExtensions () {
195202
this.supportedDocuments = extensionRegistry.loadExtensions('documents', 'supported-document-types');

0 commit comments

Comments
 (0)