Merge branch 'master' into WebGUI8. Merged up to 7.10.4
This commit is contained in:
commit
5f3014aaee
66 changed files with 3078 additions and 997 deletions
|
|
@ -107,6 +107,24 @@ sub _fetchDepartments {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStatusList
|
||||
|
||||
Returns the statusList property as an array
|
||||
|
||||
=cut
|
||||
|
||||
sub getStatusList {
|
||||
my $self = shift;
|
||||
my $text = $self->get('statusList');
|
||||
|
||||
return
|
||||
grep { $_ } # no empty lines
|
||||
map { s/^\s+//; s/\s+$//; $_ } # trim
|
||||
split(/\r\n|\r|\n/, $text); # seperated by any kind of newline
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 prepareView ( )
|
||||
|
|
@ -174,16 +192,9 @@ sub view {
|
|||
}
|
||||
|
||||
my $statusUserId = $self->session->scratch->get("userId") || $self->session->user->userId;
|
||||
my $statusListString = $self->statusList;
|
||||
my @statusListArray = split("\n",$statusListString);
|
||||
my $statusListHashRef;
|
||||
tie %$statusListHashRef, 'Tie::IxHash';
|
||||
|
||||
foreach my $status (@statusListArray) {
|
||||
chomp($status);
|
||||
next if $status eq "";
|
||||
$statusListHashRef->{$status} = $status;
|
||||
}
|
||||
tie my %statusOptions, 'Tie::IxHash', (
|
||||
map { $_ => $_ } $self->getStatusList
|
||||
);
|
||||
|
||||
#$self->session->log->warn("VIEW: userId: ".$statusUserId."\n" );
|
||||
my ($status) = $session->db->quickArray(
|
||||
|
|
@ -222,7 +233,7 @@ sub view {
|
|||
$f->radioList(
|
||||
-name=>"status",
|
||||
-value=>$status,
|
||||
-options=>$statusListHashRef,
|
||||
-options=>\%statusOptions,
|
||||
-label=>$i18n->get(5),
|
||||
-hoverHelp=>$i18n->get('5 description'),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue