diff --git a/Kernel/System/Console/Command/Admin/DynamicField/Add.pm b/Kernel/System/Console/Command/Admin/DynamicField/Add.pm index 0206ee6..468bc7e 100644 --- a/Kernel/System/Console/Command/Admin/DynamicField/Add.pm +++ b/Kernel/System/Console/Command/Admin/DynamicField/Add.pm @@ -38,55 +38,48 @@ sub Configure { my ( $Self, %Param ) = @_; $Self->Description('Create a new dynamic field.'); - $Self->AddOption( + $Self->AddArgument( Name => 'name', Description => 'Name for the new field.', Required => 1, - HasValue => 1, ValueRegex => qr/[A-Za-z0-9]+/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'label', Description => 'Label which will be displayed alongside the field.', Required => 1, - HasValue => 1, ValueRegex => qr/.*/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'field-type', Description => 'Dynamic field type.', Required => 1, - HasValue => 1, ValueRegex => qr/[A-Za-z0-9]/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'object-type', Description => 'Object type for the new field.', Required => 1, - HasValue => 1, ValueRegex => qr/[A-Za-z0-9]/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'config', Description => 'Config for dynamic field. Takes either an YAML or JSON string. See also Admin::DynamicField::ConfigDump and Admin::DynamicField::ConfigBuild.', Required => 0, - HasValue => 1, ValueRegex => qr/.*/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'namespace', Description => 'Namespace to place the new field into.', Required => 0, - HasValue => 1, ValueRegex => qr/[A-Za-z0-9]+/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'field-order', Description => 'Field order to place the field at. Defaults to hightest order plus 1. Per default, other fields are reordered if an occupied order number is chosen.', Required => 0, - HasValue => 1, ValueRegex => qr/\d+/smx, ); $Self->AddOption( @@ -96,11 +89,10 @@ sub Configure { HasValue => 1, ValueRegex => qr/^[[0-1]{1}$/smx, ); - $Self->AddOption( + $Self->AddArgument( Name => 'valid', Description => 'Whether the field to add is valid or invalid. Defaults to 1.', Required => 0, - HasValue => 1, ValueRegex => qr/^[0-1]{1}$/smx, ); $Self->AddOption(