Skip to content

Commit

Permalink
Merge pull request #1665 from TimothyAsirJeyasing/fix-dr-button-issue
Browse files Browse the repository at this point in the history
Update Footer Button Order based on PF guidelines
  • Loading branch information
openshift-merge-bot[bot] authored Nov 10, 2024
2 parents fd1ddd4 + 90ed755 commit b8eda07
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
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

0 comments on commit b8eda07

Please sign in to comment.