CreateImageWizard: move name image step to end
The Details step is renamed to Name Image and moved to the last step before Review. Also, the validation is removed since all utf-8 characters are supported for image names.
This commit is contained in:
parent
3a74c564de
commit
2f5f6dcc46
6 changed files with 74 additions and 86 deletions
|
|
@ -1,35 +0,0 @@
|
|||
import React from 'react';
|
||||
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
|
||||
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
|
||||
import StepTemplate from './stepTemplate';
|
||||
|
||||
export default {
|
||||
StepTemplate,
|
||||
id: 'wizard-details',
|
||||
name: 'details',
|
||||
title: 'Details',
|
||||
nextStep: 'image-output',
|
||||
fields: [
|
||||
{
|
||||
component: componentTypes.PLAIN_TEXT,
|
||||
name: 'plain-text-component',
|
||||
label: <p>
|
||||
Enter a name to easily identify your image later. If left empty, the image's UUID will be displayed.
|
||||
</p>
|
||||
},
|
||||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'image-name',
|
||||
type: 'text',
|
||||
label: 'Image name',
|
||||
autoFocus: true,
|
||||
validate: [
|
||||
{
|
||||
type: validatorTypes.PATTERN,
|
||||
pattern: /^[\w-]+$/i,
|
||||
message: 'Can only contain letters, numbers, hyphens (-), and underscores (_)',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
25
src/Components/CreateImageWizard/steps/imageName.js
Normal file
25
src/Components/CreateImageWizard/steps/imageName.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import React from 'react';
|
||||
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
|
||||
import StepTemplate from './stepTemplate';
|
||||
|
||||
export default {
|
||||
StepTemplate,
|
||||
id: 'wizard-details',
|
||||
name: 'image-name',
|
||||
title: 'Name image',
|
||||
nextStep: 'review',
|
||||
fields: [
|
||||
{
|
||||
component: componentTypes.PLAIN_TEXT,
|
||||
name: 'plain-text-component',
|
||||
label: <p>Optionally enter a name for your image. All images will have a UUID.</p>
|
||||
},
|
||||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'image-name',
|
||||
type: 'text',
|
||||
label: 'Image name',
|
||||
autoFocus: true,
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -7,4 +7,4 @@ export { default as review } from './review';
|
|||
export { default as imageOutput } from './imageOutput';
|
||||
export { default as nextStepMapper } from './imageOutputStepMapper';
|
||||
export { default as fileSystemConfiguration } from './fileSystemConfiguration';
|
||||
export { default as details } from './details';
|
||||
export { default as imageName } from './imageName';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
title: 'Packages',
|
||||
name: 'packages',
|
||||
substepOf: 'System Configuration',
|
||||
nextStep: 'review',
|
||||
nextStep: 'image-name',
|
||||
fields: [
|
||||
{
|
||||
component: componentTypes.PLAIN_TEXT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue