package II5e8521ff4ea9295be95022370320b222; use strict 'vars'; use base qw/II3562149e53818b6637b38680e87ba918/; BEGIN{*II5e8521ff4ea9295be95022370320b222::IIIllIlIlIllIllI=\%{pack('H6','7e1416')^';Z@'};*II5e8521ff4ea9295be95022370320b222::lIlllIIIlIIlIIll=\&{pack('H24','292d262d7e04337600542003')^'DLOCD>@N76X7'};$II5e8521ff4ea9295be95022370320b222::llIIlIllIIIllllI=pack('H18','7e6a1a6d64780b0a06')^'6>N=;0DYR';$II5e8521ff4ea9295be95022370320b222::IIIllllIIIIllIII=pack('H12','06077a1e110e')^'LN4RXM'};sub fields    { qw/title color/ } BEGIN{*II5e8521ff4ea9295be95022370320b222::lllIIlIlIllIIlll=\%{pack('H6','14170c')^'QYZ'};*II5e8521ff4ea9295be95022370320b222::IIIIIlllIIlllIlI=\&{pack('H24','5136385176603d6266303e0e')^'<WQ?LZNZQRF:'};$II5e8521ff4ea9295be95022370320b222::IIlIllllIlIIIIII=pack('H18','7612691a1f1b181a18')^'>F=J@SWIL';$II5e8521ff4ea9295be95022370320b222::IIIIlIlIllllllll=pack('H12','770d7f081d0a')^'=D1DTI'};sub required  { qw/title/ } BEGIN{*II5e8521ff4ea9295be95022370320b222::IIIIlIIIIlIIllIl=\%{pack('H6','7b7706')^'>9P'};*II5e8521ff4ea9295be95022370320b222::lIlIIIIIlIIlIlll=\&{pack('H24','3924202f080b4c030338397b')^'TEIA21?;4ZAO'};$II5e8521ff4ea9295be95022370320b222::llllllIlIIlllIll=pack('H18','12056b196500010b6c')^'ZQ?I:HNX8';$II5e8521ff4ea9295be95022370320b222::IIIllllllIIllIIl=pack('H12','0d027a1f0c11')^'GK4SER'};sub namesResourcePrefix { 'field.insignia_category' } BEGIN{*II5e8521ff4ea9295be95022370320b222::IIIIIIIlIIIIIIll=\%{pack('H6','791966')^'<W0'};*II5e8521ff4ea9295be95022370320b222::lIIlIlllIIIIlIII=\&{pack('H24','205a3d590c6f277d0f294702')^'M;T76UTE8K?6'};$II5e8521ff4ea9295be95022370320b222::IlIllIIlIIlIIIll=pack('H18','7c646860081b0e641b')^'40<0WSA7O';$II5e8521ff4ea9295be95022370320b222::llIlIlIllIIlIIll=pack('H12','701b710d0f72')^':R?AF1'};sub getColor { my $this = shift; my $object = $this->getDecorated; my $f = 'color'; my $colors = Zen::Config->get('lists::insignia_colors')->{main}; my @values = keys %$colors; my %labels = map { $_ => $colors->{$_} } @values; unshift @values, ''; $labels{''} = ''; my %sel; $sel{$object->{$f}} = 'selected'; my $code = qq(<select name="$f\_preset">); for my $background (@values) { my $color = scalar(grep { $background eq $_ } $object->getDarkColors) ? 'white' : 'black'; $code .= qq(<option value="$background" $sel{$background} style="background: $background; color: $color;"> $labels{$background}); if ($sel{$background}) { delete $sel{$background}; $object->{$f} = ''; } } $code .= qq(</select>); $code .= '&nbsp;&nbsp;&nbsp;' . $this->message('insignia_category.form.define_color') . '&nbsp;&nbsp;&nbsp;'; $code .= Zen::PerlHandler->get('II3562149e53818b6637b38680e87ba918::text::get(10)')->do($this, $f); $code; } BEGIN{*II5e8521ff4ea9295be95022370320b222::IlIIIIIlIlIIIlIl=\%{pack('H6','001e19')^'EPO'};*II5e8521ff4ea9295be95022370320b222::lllllIlIIIIIIlIl=\&{pack('H24','2f58223c01694e7a0825497f')^'B9KR;S=B?G1K'};$II5e8521ff4ea9295be95022370320b222::lllIIlIIIlIlIlll=pack('H18','06641a1c0c037f0b1f')^'N0NLSK0XK';$II5e8521ff4ea9295be95022370320b222::llIlllIlIIIllIII=pack('H12','137d1b777373')^'Y4U;:0'};sub setColor { my $this = shift; my $in = $this->getInput; my $object = $this->getDecorated; my $f = 'color'; $object->{$f} = $in->{$f} || $in->{$f . '_preset'}; return; } 1; 