Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Hide publish action fields when saving #8917

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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