Provisioning Action Drawer: Organize action and cancel button order to match existing pattern (#110487)
This commit is contained in:
+3
-3
@@ -96,14 +96,14 @@ function FormContent({ initialValues, selectedItems, repository, workflowOptions
|
||||
hidePath
|
||||
/>
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss} disabled={isCreatingJob}>
|
||||
<Trans i18nKey="browse-dashboards.bulk-delete-resources-form.button-cancel">Cancel</Trans>
|
||||
</Button>
|
||||
<Button type="submit" disabled={disableBtn} variant="destructive">
|
||||
{job?.status?.state === 'working' || job?.status?.state === 'pending'
|
||||
? t('browse-dashboards.bulk-delete-resources-form.button-deleting', 'Deleting...')
|
||||
: t('browse-dashboards.bulk-delete-resources-form.button-delete', 'Delete')}
|
||||
</Button>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss} disabled={isCreatingJob}>
|
||||
<Trans i18nKey="browse-dashboards.bulk-delete-resources-form.button-cancel">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</>
|
||||
)}
|
||||
|
||||
+3
-3
@@ -149,6 +149,9 @@ function FormContent({ initialValues, selectedItems, repository, workflowOptions
|
||||
/>
|
||||
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss} disabled={isCreatingJob}>
|
||||
<Trans i18nKey="browse-dashboards.bulk-move-resources-form.button-cancel">Cancel</Trans>
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={!!job || isCreatingJob || hasSubmitted || targetFolderUID === undefined}
|
||||
@@ -157,9 +160,6 @@ function FormContent({ initialValues, selectedItems, repository, workflowOptions
|
||||
? t('browse-dashboards.bulk-move-resources-form.button-moving', 'Moving...')
|
||||
: t('browse-dashboards.bulk-move-resources-form.button-move', 'Move')}
|
||||
</Button>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss} disabled={isCreatingJob}>
|
||||
<Trans i18nKey="browse-dashboards.bulk-move-resources-form.button-cancel">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</>
|
||||
)}
|
||||
|
||||
+3
-3
@@ -136,14 +136,14 @@ export function DeleteProvisionedDashboardForm({
|
||||
|
||||
{/* Save / Cancel button */}
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" onClick={onDismiss} fill="outline">
|
||||
<Trans i18nKey="dashboard-scene.delete-provisioned-dashboard-form.cancel-action">Cancel</Trans>
|
||||
</Button>
|
||||
<Button variant="destructive" type="submit" disabled={request.isLoading || readOnly}>
|
||||
{request.isLoading
|
||||
? t('dashboard-scene.delete-provisioned-dashboard-form.deleting', 'Deleting...')
|
||||
: t('dashboard-scene.delete-provisioned-dashboard-form.delete-action', 'Delete dashboard')}
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={onDismiss} fill="outline">
|
||||
<Trans i18nKey="dashboard-scene.delete-provisioned-dashboard-form.cancel-action">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</form>
|
||||
|
||||
+3
-3
@@ -228,6 +228,9 @@ export function MoveProvisionedDashboardForm({
|
||||
/>
|
||||
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" onClick={onDismiss} fill="outline">
|
||||
<Trans i18nKey="dashboard-scene.move-provisioned-dashboard-form.cancel-action">Cancel</Trans>
|
||||
</Button>
|
||||
<Button
|
||||
variant="primary"
|
||||
type="submit"
|
||||
@@ -237,9 +240,6 @@ export function MoveProvisionedDashboardForm({
|
||||
? t('dashboard-scene.move-provisioned-dashboard-form.moving', 'Moving...')
|
||||
: t('dashboard-scene.move-provisioned-dashboard-form.move-action', 'Move dashboard')}
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={onDismiss} fill="outline">
|
||||
<Trans i18nKey="dashboard-scene.move-provisioned-dashboard-form.cancel-action">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</form>
|
||||
|
||||
+3
-3
@@ -243,14 +243,14 @@ export function SaveProvisionedDashboardForm({
|
||||
/>
|
||||
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" onClick={drawer.onClose} fill="outline">
|
||||
<Trans i18nKey="dashboard-scene.save-provisioned-dashboard-form.cancel">Cancel</Trans>
|
||||
</Button>
|
||||
<Button variant="primary" type="submit" disabled={request.isLoading || !isDirty || readOnly}>
|
||||
{request.isLoading
|
||||
? t('dashboard-scene.save-provisioned-dashboard-form.saving', 'Saving...')
|
||||
: t('dashboard-scene.save-provisioned-dashboard-form.save', 'Save')}
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={drawer.onClose} fill="outline">
|
||||
<Trans i18nKey="dashboard-scene.save-provisioned-dashboard-form.cancel">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</form>
|
||||
|
||||
@@ -131,14 +131,14 @@ function FormContent({ initialValues, parentFolder, repository, workflowOptions,
|
||||
|
||||
{/* Delete / Cancel button */}
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss}>
|
||||
<Trans i18nKey="browse-dashboards.delete-provisioned-folder-form.button-cancel">Cancel</Trans>
|
||||
</Button>
|
||||
<Button type="submit" disabled={request.isLoading} variant="destructive">
|
||||
{request.isLoading
|
||||
? t('browse-dashboards.delete-provisioned-folder-form.button-deleting', 'Deleting...')
|
||||
: t('browse-dashboards.delete-provisioned-folder-form.button-delete', 'Delete')}
|
||||
</Button>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss}>
|
||||
<Trans i18nKey="browse-dashboards.delete-provisioned-folder-form.button-cancel">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</form>
|
||||
|
||||
@@ -187,14 +187,14 @@ function FormContent({ initialValues, repository, workflowOptions, folder, onDis
|
||||
)}
|
||||
|
||||
<Stack gap={2}>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss}>
|
||||
<Trans i18nKey="browse-dashboards.new-provisioned-folder-form.cancel">Cancel</Trans>
|
||||
</Button>
|
||||
<Button type="submit" disabled={request.isLoading || !!formState?.errors.title}>
|
||||
{request.isLoading
|
||||
? t('browse-dashboards.new-provisioned-folder-form.button-creating', 'Creating...')
|
||||
: t('browse-dashboards.new-provisioned-folder-form.button-create', 'Create')}
|
||||
</Button>
|
||||
<Button variant="secondary" fill="outline" onClick={onDismiss}>
|
||||
<Trans i18nKey="browse-dashboards.new-provisioned-folder-form.cancel">Cancel</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user