Skip to content

Commit

Permalink
Issue #3145: First walkthrough on selections.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter committed Mar 13, 2024
1 parent 2ccde3c commit 685efdd
Show file tree
Hide file tree
Showing 37 changed files with 141 additions and 113 deletions.
9 changes: 5 additions & 4 deletions Kernel/Modules/AdminAutoResponse.pm
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,11 @@ sub _Edit {
);

$Param{TypeOption} = $LayoutObject->BuildSelection(
Data => { $AutoResponseObject->AutoResponseTypeList(), },
Name => 'TypeID',
SelectedID => $Param{TypeID},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
Data => { $AutoResponseObject->AutoResponseTypeList(), },
Name => 'TypeID',
SelectedID => $Param{TypeID},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
Translation => 1,
);

$Param{SystemAddressOption} = $LayoutObject->BuildSelection(
Expand Down
1 change: 1 addition & 0 deletions Kernel/Modules/AdminDynamicFieldReference.pm
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ sub _ShowScreen {
SelectedID => $Param{$Name} || '0',
Class => 'Modernize W50pc' . ( $Setting->{Mandatory} ? ' Validate_Required' : '' ) . ( $Param{ $Name . 'ServerError' } ? ' ServerError' : '' ),
Multiple => ( $Setting->{Multiple} // 0 ),
Translation => $Name eq 'TicketType',
);
$LayoutObject->Block(
Name => 'ConfigParamRow',
Expand Down
12 changes: 6 additions & 6 deletions Kernel/Modules/AdminGenericAgent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ sub _MaskUpdate {
Sort => 'AlphanumericValue',
Size => 3,
Multiple => 1,
Translation => 0,
Translation => 1,
Class => 'Modernize',
);
$LayoutObject->Block(
Expand All @@ -1006,7 +1006,7 @@ sub _MaskUpdate {
Sort => 'AlphanumericValue',
Size => 3,
Multiple => 0,
Translation => 0,
Translation => 1,
Class => 'Modernize',
);
$LayoutObject->Block(
Expand All @@ -1032,7 +1032,7 @@ sub _MaskUpdate {
Size => 5,
Multiple => 1,
TreeView => $TreeView,
Translation => 0,
Translation => 1,
Max => 200,
Class => 'Modernize',
);
Expand All @@ -1043,7 +1043,7 @@ sub _MaskUpdate {
Size => 5,
Multiple => 0,
TreeView => $TreeView,
Translation => 0,
Translation => 1,
Max => 200,
Class => 'Modernize',
);
Expand All @@ -1057,7 +1057,7 @@ sub _MaskUpdate {
Sort => 'AlphanumericValue',
Size => 5,
Multiple => 1,
Translation => 0,
Translation => 1,
Max => 200,
Class => 'Modernize',
);
Expand All @@ -1068,7 +1068,7 @@ sub _MaskUpdate {
Sort => 'AlphanumericValue',
Size => 5,
Multiple => 0,
Translation => 0,
Translation => 1,
Max => 200,
Class => 'Modernize',
);
Expand Down
18 changes: 10 additions & 8 deletions Kernel/Modules/AdminMailAccount.pm
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,11 @@ sub _MaskUpdateMailAccount {
);

$Param{TypeOption} = $LayoutObject->BuildSelection(
Data => { $Kernel::OM->Get('Kernel::System::MailAccount')->MailAccountBackendList() },
Name => 'Type',
SelectedID => $Param{Type} || $Param{TypeAdd} || '',
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeInvalid'} || '' ),
Data => { $Kernel::OM->Get('Kernel::System::MailAccount')->MailAccountBackendList() },
Name => 'Type',
SelectedID => $Param{Type} || $Param{TypeAdd} || '',
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeInvalid'} || '' ),
Translation => 1,
);

$Param{TrustedOption} = $LayoutObject->BuildSelection(
Expand Down Expand Up @@ -492,10 +493,11 @@ sub _MaskAddMailAccount {
);

$Param{TypeOptionAdd} = $LayoutObject->BuildSelection(
Data => { $Kernel::OM->Get('Kernel::System::MailAccount')->MailAccountBackendList() },
Name => 'TypeAdd',
SelectedID => $Param{Type} || $Param{TypeAdd} || '',
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeAddInvalid'} || '' ),
Data => { $Kernel::OM->Get('Kernel::System::MailAccount')->MailAccountBackendList() },
Name => 'TypeAdd',
SelectedID => $Param{Type} || $Param{TypeAdd} || '',
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeAddInvalid'} || '' ),
Translation => 1,
);

$Param{TrustedOption} = $LayoutObject->BuildSelection(
Expand Down
7 changes: 4 additions & 3 deletions Kernel/Modules/AdminNotificationEvent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,7 @@ sub _Edit {
SelectedID => \@VisibleSelected,
DisabledBranch => \@DisabledQueues,
Class => 'Modernize W75pc Validate_Required',
Translation => 1,
);
}

Expand Down Expand Up @@ -1175,7 +1176,7 @@ sub _Edit {
Sort => 'AlphanumericValue',
Size => 3,
Multiple => 1,
Translation => 0,
Translation => 1,
Class => 'Modernize W75pc',
);
$LayoutObject->Block(
Expand All @@ -1199,7 +1200,7 @@ sub _Edit {
SelectedID => $Param{Data}->{ServiceID},
Size => 5,
Multiple => 1,
Translation => 0,
Translation => 1,
Max => 200,
TreeView => $TreeView,
Class => 'Modernize W75pc',
Expand All @@ -1214,7 +1215,7 @@ sub _Edit {
Sort => 'AlphanumericValue',
Size => 5,
Multiple => 1,
Translation => 0,
Translation => 1,
Max => 200,
Class => 'Modernize W75pc',
);
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminQueue.pm
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ sub _Edit {
SelectedValue => $ParentQueue,
PossibleNone => 1,
HTMLQuote => 0,
Translation => 0,
Translation => 1,
Class => 'Modernize',
);
}
Expand Down
2 changes: 2 additions & 0 deletions Kernel/Modules/AdminRegistration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ sub Run {
Name => 'Type',
SelectedValue => $Param{SystemType},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
Translation => 1,
);

my $EnvironmentObject = $Kernel::OM->Get('Kernel::System::Environment');
Expand Down Expand Up @@ -411,6 +412,7 @@ sub Run {
Name => 'Type',
SelectedValue => $Param{Type} // $RegistrationData{Type},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
Translation => 1,
);

# fall-back for support data sending switch
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminSLA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ sub _MaskNew {
SelectedID => $SLAData{ServiceIDs} || [],
Multiple => 1,
Size => 5,
Translation => 0,
Translation => 1,
TreeView => ( $ListType eq 'tree' ) ? 1 : 0,
Max => 200,
Class => 'Modernize',
Expand Down
1 change: 1 addition & 0 deletions Kernel/Modules/AdminService.pm
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ sub _MaskNew {
DisabledBranch => $ServiceData{Name},
Translation => 0,
Class => 'Modernize',
Translation => 1,
);

# get valid list
Expand Down
9 changes: 5 additions & 4 deletions Kernel/Modules/AdminState.pm
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,11 @@ sub _Edit {
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'ValidIDInvalid'} || '' ),
);
$Param{StateTypeOption} = $LayoutObject->BuildSelection(
Data => { $StateObject->StateTypeList( UserID => 1 ), },
Name => 'TypeID',
SelectedID => $Param{TypeID},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
Data => { $StateObject->StateTypeList( UserID => 1 ), },
Name => 'TypeID',
SelectedID => $Param{TypeID},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
Translation => 1,
);
$LayoutObject->Block(
Name => 'OverviewUpdate',
Expand Down
9 changes: 5 additions & 4 deletions Kernel/Modules/AdminTemplate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,11 @@ sub _Edit {
my $TemplateTypeList = $Kernel::OM->Get('Kernel::Config')->Get('StandardTemplate::Types');

$Param{TemplateTypeString} = $LayoutObject->BuildSelection(
Data => $TemplateTypeList,
Name => 'TemplateType',
SelectedID => $Param{TemplateType},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TemplateTypeInvalid'} || '' ),
Data => $TemplateTypeList,
Name => 'TemplateType',
SelectedID => $Param{TemplateType},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TemplateTypeInvalid'} || '' ),
Translation => 1,
);

my $StdAttachmentObject = $Kernel::OM->Get('Kernel::System::StdAttachment');
Expand Down
1 change: 1 addition & 0 deletions Kernel/Modules/AgentAppointmentEdit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ sub Run {
Multiple => 0,
Class => 'Modernize',
PossibleNone => 0,
Translation => 1,
);

# notification custom units
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AgentSplitSelection.pm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ sub Run {
ID => 'ProcessEntityID',
Class => 'Modernize',
Sort => 'AlphanumericValue',
Translation => 0,
Translation => 1,
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions Kernel/Modules/AgentTicketActionCommon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ sub _Mask {
SelectedID => $Param{TypeID},
PossibleNone => 1,
Sort => 'AlphanumericValue',
Translation => 0,
Translation => 1,
);
$LayoutObject->Block(
Name => 'Type',
Expand Down Expand Up @@ -2405,7 +2405,7 @@ sub _Mask {
PossibleNone => 1,
TreeView => $TreeView,
Sort => 'TreeView',
Translation => 0,
Translation => 1,
Max => 200,
);

Expand All @@ -2432,7 +2432,7 @@ sub _Mask {
. ( $Param{ServiceInvalid} || '' ),
PossibleNone => 1,
Sort => 'AlphanumericValue',
Translation => 0,
Translation => 1,
Max => 200,
);

Expand Down
10 changes: 6 additions & 4 deletions Kernel/Modules/AgentTicketBounce.pm
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ $Param{Signature}";
Name => 'BounceStateID',
SelectedValue => $Config->{StateDefault},
Class => 'Modernize',
Translation => 1,
);

# add rich text editor
Expand Down Expand Up @@ -426,10 +427,11 @@ $Param{Signature}";
$NextStates{''} = '-';
}
$Param{NextStatesStrg} = $LayoutObject->BuildSelection(
Data => \%NextStates,
Name => 'BounceStateID',
SelectedID => $Param{BounceStateID},
Class => 'Modernize',
Data => \%NextStates,
Name => 'BounceStateID',
SelectedID => $Param{BounceStateID},
Class => 'Modernize',
Translation => 1,
);

# add rich text editor
Expand Down
5 changes: 3 additions & 2 deletions Kernel/Modules/AgentTicketBulk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,8 @@ sub _Mask {
Data => \%StateList,
Name => 'StateID',
%State,
Class => 'Modernize FormUpdate',
Class => 'Modernize FormUpdate',
Translation => 1,
);
$LayoutObject->Block(
Name => 'State',
Expand Down Expand Up @@ -1403,7 +1404,7 @@ sub _Mask {
Name => 'TypeID',
SelectedID => $Param{TypeID},
Sort => 'AlphanumericValue',
Translation => 0,
Translation => 1,
Class => 'Modernize FormUpdate',
);
$LayoutObject->Block(
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Modules/AgentTicketCompose.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,8 @@ sub _Mask {
PossibleNone => 1,
%State,
%Param,
Class => 'Modernize FormUpdate',
Class => 'Modernize FormUpdate',
Translation => 1,
);

my $IsVisibleForCustomer = $Config->{IsVisibleForCustomerDefault};
Expand Down
17 changes: 9 additions & 8 deletions Kernel/Modules/AgentTicketEmail.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3262,11 +3262,12 @@ sub _MaskEmailNew {
}
else {
$Param{FromStrg} = $LayoutObject->BuildSelection(
Data => \%NewTo,
Class => 'Validate_Required Modernize FormUpdate ' . ( $Param{Errors}->{DestinationInvalid} || ' ' ),
Name => 'Dest',
TreeView => $TreeView,
SelectedID => $Param{FromSelected},
Data => \%NewTo,
Class => 'Validate_Required Modernize FormUpdate ' . ( $Param{Errors}->{DestinationInvalid} || ' ' ),
Name => 'Dest',
Translation => 1,
TreeView => $TreeView,
SelectedID => $Param{FromSelected},
);
}

Expand Down Expand Up @@ -3467,7 +3468,7 @@ sub _MaskEmailNew {
SelectedID => $Param{TypeID},
PossibleNone => 1,
Sort => 'AlphanumericValue',
Translation => 0,
Translation => 1,
);
$LayoutObject->Block(
Name => 'TicketType',
Expand All @@ -3488,7 +3489,7 @@ sub _MaskEmailNew {
PossibleNone => 1,
TreeView => $TreeView,
Sort => 'TreeView',
Translation => 0,
Translation => 1,
Max => 200,
);
$LayoutObject->Block(
Expand All @@ -3508,7 +3509,7 @@ sub _MaskEmailNew {
. ( $Param{Errors}->{SLAInvalid} || '' ),
PossibleNone => 1,
Sort => 'AlphanumericValue',
Translation => 0,
Translation => 1,
Max => 200,
);
$LayoutObject->Block(
Expand Down
1 change: 1 addition & 0 deletions Kernel/Modules/AgentTicketEmailOutbound.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,7 @@ sub _Mask {
Data => $Param{NextStates},
Name => 'ComposeStateID',
PossibleNone => 1,
Translation => 1,
Class => 'Modernize FormUpdate',
%State,
);
Expand Down
1 change: 1 addition & 0 deletions Kernel/Modules/AgentTicketForward.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,7 @@ sub _Mask {
Data => $Param{NextStates},
Name => 'ComposeStateID',
PossibleNone => 1,
Translation => 1,
Class => 'Modernize FormUpdate',
%State,
);
Expand Down
Loading

0 comments on commit 685efdd

Please sign in to comment.