mirror of https://github.com/rancher/dashboard.git
Merge pull request #11894 from rak-phillip/bugfix/11882-fleet-footer
Render wizard footer in CruResource
This commit is contained in:
commit
9cfcc682f8
|
|
@ -587,76 +587,74 @@ export default {
|
|||
</template>
|
||||
</template>
|
||||
<template #controlsContainer="{showPrevious, next, back, activeStep, canNext, activeStepIndex, visibleSteps}">
|
||||
<template name="form-footer">
|
||||
<CruResourceFooter
|
||||
class="cru__footer"
|
||||
:mode="mode"
|
||||
:is-form="showAsForm"
|
||||
:show-cancel="showCancel"
|
||||
@cancel-confirmed="confirmCancel"
|
||||
<CruResourceFooter
|
||||
class="cru__footer"
|
||||
:mode="mode"
|
||||
:is-form="showAsForm"
|
||||
:show-cancel="showCancel"
|
||||
@cancel-confirmed="confirmCancel"
|
||||
>
|
||||
<!-- Pass down templates provided by the caller -->
|
||||
<template
|
||||
v-for="(_, slot) of $slots"
|
||||
#[slot]="scope"
|
||||
:key="slot"
|
||||
>
|
||||
<!-- Pass down templates provided by the caller -->
|
||||
<template
|
||||
v-for="(_, slot) of $slots"
|
||||
#[slot]="scope"
|
||||
:key="slot"
|
||||
>
|
||||
<template v-if="shouldProvideSlot(slot)">
|
||||
<slot
|
||||
:name="slot"
|
||||
v-bind="scope"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="shouldProvideSlot(slot)">
|
||||
<slot
|
||||
:name="slot"
|
||||
v-bind="scope"
|
||||
/>
|
||||
</template>
|
||||
<div class="controls-steps">
|
||||
</template>
|
||||
<div class="controls-steps">
|
||||
<button
|
||||
v-if="showYaml"
|
||||
type="button"
|
||||
class="btn role-secondary"
|
||||
@click="showPreviewYaml"
|
||||
>
|
||||
<t k="cruResource.previewYaml" />
|
||||
</button>
|
||||
<template
|
||||
v-if="showPrevious"
|
||||
name="back"
|
||||
>
|
||||
<button
|
||||
v-if="showYaml"
|
||||
type="button"
|
||||
class="btn role-secondary"
|
||||
@click="showPreviewYaml"
|
||||
@click="back()"
|
||||
>
|
||||
<t k="cruResource.previewYaml" />
|
||||
<t k="wizard.previous" />
|
||||
</button>
|
||||
<template
|
||||
v-if="showPrevious"
|
||||
name="back"
|
||||
</template>
|
||||
<template
|
||||
v-if="activeStepIndex === visibleSteps.length-1"
|
||||
name="finish"
|
||||
>
|
||||
<AsyncButton
|
||||
v-if="!showSubtypeSelection && !isView"
|
||||
ref="save"
|
||||
:disabled="!activeStep.ready"
|
||||
:mode="finishButtonMode || mode"
|
||||
@click="$emit('finish', $event)"
|
||||
/>
|
||||
</template>
|
||||
<template
|
||||
v-else
|
||||
name="next"
|
||||
>
|
||||
<button
|
||||
:disabled="!canNext"
|
||||
type="button"
|
||||
class="btn role-primary"
|
||||
@click="next()"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="btn role-secondary"
|
||||
@click="back()"
|
||||
>
|
||||
<t k="wizard.previous" />
|
||||
</button>
|
||||
</template>
|
||||
<template
|
||||
v-if="activeStepIndex === visibleSteps.length-1"
|
||||
name="finish"
|
||||
>
|
||||
<AsyncButton
|
||||
v-if="!showSubtypeSelection && !isView"
|
||||
ref="save"
|
||||
:disabled="!activeStep.ready"
|
||||
:mode="finishButtonMode || mode"
|
||||
@click="$emit('finish', $event)"
|
||||
/>
|
||||
</template>
|
||||
<template
|
||||
v-else
|
||||
name="next"
|
||||
>
|
||||
<button
|
||||
:disabled="!canNext"
|
||||
type="button"
|
||||
class="btn role-primary"
|
||||
@click="next()"
|
||||
>
|
||||
<t k="wizard.next" />
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</CruResourceFooter>
|
||||
</template>
|
||||
<t k="wizard.next" />
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</CruResourceFooter>
|
||||
</template>
|
||||
</Wizard>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import AsyncButton from '@shell/components/AsyncButton';
|
|||
import { Banner } from '@components/Banner';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import { stringify } from '@shell/utils/error';
|
||||
import LazyImage from '@shell/components/LazyImage';
|
||||
|
||||
/*
|
||||
Wizard accepts an array of steps (see props), and creates named slots for each step.
|
||||
|
|
@ -26,6 +27,7 @@ export default {
|
|||
AsyncButton,
|
||||
Banner,
|
||||
Loading,
|
||||
LazyImage,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue