Skip to content

Commit

Permalink
[4.x] Hide publish action fields when saving (#8917)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Varga <[email protected]>
  • Loading branch information
ryanmitchell and jasonvarga authored Nov 2, 2023
1 parent e816cf3 commit 660e4a9
Showing 1 changed file with 37 additions and 33 deletions.
70 changes: 37 additions & 33 deletions resources/js/components/entries/PublishActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,52 @@
<loading-graphic text="" />
</div>

<select-input
class="mb-6"
v-model="action"
:options="options"
/>
<template v-else>

<div v-if="action">

<date-fieldtype
v-if="action == 'schedule'"
<select-input
class="mb-6"
name="publishTime"
:value="publishTime" />

<textarea-input
class="mb-6 text-sm"
v-model="revisionMessage"
:placeholder="__('Notes about this revision')"
@keydown.enter="submit"
:focus="true" />

<button
class="btn-primary w-full mb-6"
v-text="submitButtonText"
@click="submit"
v-model="action"
:options="options"
/>

<div class="text-gray text-xs flex mb-6">
<div class="pt-px w-4 mr-2">
<svg-icon name="info-circle" class="pt-px" />
<div v-if="action">

<date-fieldtype
v-if="action == 'schedule'"
class="mb-6"
name="publishTime"
:value="publishTime" />

<textarea-input
class="mb-6 text-sm"
v-model="revisionMessage"
:placeholder="__('Notes about this revision')"
@keydown.enter="submit"
:focus="true" />

<button
class="btn-primary w-full mb-6"
v-text="submitButtonText"
@click="submit"
/>

<div class="text-gray text-xs flex mb-6">
<div class="pt-px w-4 mr-2">
<svg-icon name="info-circle" class="pt-px" />
</div>
<div class="flex-1" v-text="actionInfoText" />
</div>
<div class="flex-1" v-text="actionInfoText" />
</div>

<div class="text-gray text-xs flex mb-6 text-red-500" v-if="action === 'schedule'">
<div class="pt-px w-4 mr-2">
<svg-icon name="info-circle" class="pt-px" />
<div class="text-gray text-xs flex mb-6 text-red-500" v-if="action === 'schedule'">
<div class="pt-px w-4 mr-2">
<svg-icon name="info-circle" class="pt-px" />
</div>
<div class="flex-1" v-text="__('messages.publish_actions_current_becomes_draft_because_scheduled')" />
</div>
<div class="flex-1" v-text="__('messages.publish_actions_current_becomes_draft_because_scheduled')" />

</div>

</div>
</template>

</div>
</div>
Expand Down

0 comments on commit 660e4a9

Please sign in to comment.