CreateImageWizard: add image name field
Add a details step where the user can enter a descriptive image name. This name is displayed in the review step above the Release. Both these fields are now horizontal to save vertical space.
This commit is contained in:
parent
7b1f5c7e71
commit
c257eec540
5 changed files with 107 additions and 24 deletions
31
src/Components/CreateImageWizard/steps/details.js
Normal file
31
src/Components/CreateImageWizard/steps/details.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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';
|
||||
|
||||
export default {
|
||||
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',
|
||||
validate: [
|
||||
{
|
||||
type: validatorTypes.PATTERN,
|
||||
pattern: /^[\w-]+$/i,
|
||||
message: 'Can only contain letters, numbers, hyphens (-), and underscores (_)',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -7,3 +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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue