mirror of https://github.com/rancher/dashboard.git
Add cancelConfirmRequireed (and back) flags to cru-resource footer
This commit is contained in:
parent
b93d202e55
commit
7661a67b97
|
|
@ -199,7 +199,7 @@ export default {
|
|||
:done-route="doneRoute"
|
||||
:mode="mode"
|
||||
:is-form="showAsForm"
|
||||
@cancelConfirmed="confirmCancel"
|
||||
@cancel-confirmed="confirmCancel"
|
||||
>
|
||||
<template #default>
|
||||
<div>
|
||||
|
|
@ -245,7 +245,7 @@ export default {
|
|||
:done-route="doneRoute"
|
||||
:mode="mode"
|
||||
:is-form="showAsForm"
|
||||
@cancelConfirmed="confirmCancel"
|
||||
@cancel-confirmed="confirmCancel"
|
||||
>
|
||||
<template #default="{checkCancel}">
|
||||
<div class="controls-middle">
|
||||
|
|
|
|||
|
|
@ -26,6 +26,16 @@ export default {
|
|||
type: String,
|
||||
default: null,
|
||||
},
|
||||
|
||||
confirmCancelRequired: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
confirmBackRequired: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -48,7 +58,7 @@ export default {
|
|||
confirmCancel(isCancel) {
|
||||
this.$modal.hide('cancel-modal');
|
||||
|
||||
this.$emit('cancelConfirmed', isCancel);
|
||||
this.$emit('cancel-confirmed', isCancel);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -57,7 +67,7 @@ export default {
|
|||
<template>
|
||||
<div class="cru-resource-footer">
|
||||
<slot name="cancel">
|
||||
<button type="button" class="btn role-secondary" @click="checkCancel(true)">
|
||||
<button type="button" class="btn role-secondary" @click="confirmCancelRequired ? checkCancel(true) : $emit('cancel-confirmed')">
|
||||
<t k="generic.cancel" />
|
||||
</button>
|
||||
</slot>
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ export default {
|
|||
:mode="mode"
|
||||
:finish-button-mode="(existing ? 'upgrade' : 'install')"
|
||||
:is-form="!!showValuesComponent"
|
||||
@cancelConfirmed="cancel"
|
||||
@cancel-confirmed="cancel"
|
||||
>
|
||||
<template #default="{checkCancel}">
|
||||
<template v-if="!showValuesComponent">
|
||||
|
|
|
|||
Loading…
Reference in New Issue