Skip to content

Commit

Permalink
Fix: fix unable to save snv translation - EXO-75758 - Meeds-io/meeds#…
Browse files Browse the repository at this point in the history
…2642 (#1238)

prior to this change, when editing an snv with advanced edition option
and adding a translation while automatic translation is disabled, the
save button remains disabled as it checks the validity of the note title
in the snv while it shouldn't in this case which causes the non
validation of the from to enable the save.
This PR ensures to ignore validating the title in an snv case to fix
thus issue.
  • Loading branch information
hakermi committed Dec 5, 2024
1 parent f94d7bc commit 855cbf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ export default {
},
computed: {
saveOrUpdateDisabled() {
return (!this.note?.title || this.note?.title?.length < 3
|| this.note?.title?.length > this.titleMaxLength)
|| (this.noteNotModified
return this.notValidTitle || (this.noteNotModified
&& !this.propertiesModified && !this.draftNote && !this.note.draftPage) || this.savingDraft;
},
notValidTitle() {
return !this.webPageNote && (!this.note?.title || this.note?.title?.length < 3 || this.note?.title?.length > this.titleMaxLength);
},
noteNotModified() {
return this.note?.title === this.originalNote?.title && this.$noteUtils.isSameContent(this.note?.content, this.originalNote?.content);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export default {
this.openPublicationDrawer(this.noteObject);
return;
}
this.postAndPublishNote();
this.postAndPublishNote(null, this.noteObject);
},
postAndPublishNote(publicationSettings, note) {
if (this.newPublicationDrawerEnabled) {
Expand Down

0 comments on commit 855cbf4

Please sign in to comment.