Skip to content

Commit

Permalink
Add is-inline prop to PublishForm and use it in InlinePublishForm (#2827
Browse files Browse the repository at this point in the history
)
  • Loading branch information
webenapp authored Nov 20, 2020
1 parent aa911cc commit a7f3b5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resources/js/components/entries/PublishForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<save-button-options
v-if="!readOnly"
:show-options="!revisionsEnabled"
:show-options="!revisionsEnabled && !isInline"
:button-class="saveButtonClass"
:preferences-prefix="preferencesPrefix"
>
Expand Down Expand Up @@ -290,6 +290,7 @@ export default {
method: String,
amp: Boolean,
isCreating: Boolean,
isInline: Boolean,
initialReadOnly: Boolean,
initialIsRoot: Boolean,
initialPermalink: String,
Expand Down Expand Up @@ -492,12 +493,12 @@ export default {
}
// If the user has opted to create another entry, redirect them to create page.
if (this.afterSaveOption === 'create_another') {
if (!this.isInline && this.afterSaveOption === 'create_another') {
window.location = this.createAnotherUrl;
}
// If the user has opted to go to listing (default/null option), redirect them there.
else if (this.afterSaveOption === null) {
else if (!this.isInline && this.afterSaveOption === null) {
window.location = this.listingUrl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
v-bind="componentPropValues"
:method="method"
:is-creating="creating"
:is-inline="true"
:publish-container="publishContainer"
@saved="saved"
>
Expand Down

0 comments on commit a7f3b5f

Please sign in to comment.