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

Update Footer Button Order based on PF guidelines #1665

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
"Enroll discovered application nav": "Enroll discovered application nav",
"Enroll discovered application steps": "Enroll discovered application steps",
"1 or more mandatory fields are empty. To proceed, fill in the required information.": "1 or more mandatory fields are empty. To proceed, fill in the required information.",
"Back": "Back",
"Save": "Save",
"Next": "Next",
"Back": "Back",
"Configure definition": "Configure definition",
"Choose your configuration preference to protect resources (application volumes/PVCs, or Kubernetes objects).": "Choose your configuration preference to protect resources (application volumes/PVCs, or Kubernetes objects).",
"You have selected {{count}} namespaces, to view or change your selection go back to the previous step._one": "You have selected {{count}} namespaces, to view or change your selection go back to the previous step.",
Expand Down
16 changes: 8 additions & 8 deletions packages/mco/components/discovered-application-wizard/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ export const EnrollDiscoveredApplicationFooter: React.FC<EnrollDiscoveredApplica
<Alert title={onSaveError} variant={AlertVariant.danger} isInline />
)}
<WizardFooter>
{/* Disabling the back button for the first step in wizard */}
<Button
variant={ButtonVariant.secondary}
onClick={onBack}
isDisabled={stepId === 1 || requestInProgress}
>
{t('Back')}
</Button>
<Button
isLoading={requestInProgress}
isDisabled={requestInProgress}
Expand All @@ -151,14 +159,6 @@ export const EnrollDiscoveredApplicationFooter: React.FC<EnrollDiscoveredApplica
? t('Save')
: t('Next')}
</Button>
{/* Disabling the back button for the first step in wizard */}
<Button
variant={ButtonVariant.secondary}
onClick={onBack}
isDisabled={stepId === 1 || requestInProgress}
>
{t('Back')}
</Button>
<Button
variant={ButtonVariant.link}
onClick={onCancel}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,6 @@ export const AssignPolicyViewFooter: React.FC<AssignPolicyViewFooterProps> = ({
</Alert>
)}
<WizardFooter>
<Button
isLoading={requestInProgress}
isDisabled={requestInProgress || validationError}
variant="primary"
type="submit"
onClick={handleNext}
>
{stepName ===
AssignPolicyStepsNames(t)[AssignPolicySteps.ReviewAndAssign]
? t('Assign')
: t('Next')}
</Button>
{/* Disabling the back button for the first step (Policy) in wizard */}
<Button
variant="secondary"
Expand All @@ -199,6 +187,18 @@ export const AssignPolicyViewFooter: React.FC<AssignPolicyViewFooterProps> = ({
>
{t('Back')}
</Button>
<Button
isLoading={requestInProgress}
isDisabled={requestInProgress || validationError}
variant="primary"
type="submit"
onClick={handleNext}
>
{stepName ===
AssignPolicyStepsNames(t)[AssignPolicySteps.ReviewAndAssign]
? t('Assign')
: t('Next')}
</Button>
<Button
variant="link"
onClick={onCancel}
Expand Down
Loading