package II3562149e53818b6637b38680e87ba918::packed; use strict; use Zen::Config; use II720d6e18aa34327713eb014408fc9144; use IIb39071a48a82a07eeb9256f406abebc5; sub get { my ($form, $f) = @_; my ($style, $controls, $titles) = split ',', Zen::PerlHandler->getStatList, 3; my $object = $form->getDecorated; my $cfg_controls = Zen::Config->get($1)->{$2} if $controls =~ /^(.+?)::(\w+)$/; die "controls list not found [$controls]" unless defined $cfg_controls; my $cfg_titles = Zen::Config->get($1)->{$2} if $titles =~ /^(.+?)::(\w+)$/; die "titles list not found [$titles]" unless defined $cfg_titles; build($form->pfx . $f, $style, { @{ II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIllIIllIlIIll($II982446f8950cc3dc59e487adba22df54::IlllIlIlllIIllIl{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IIIlIIlllIIlIlII},1004,$II982446f8950cc3dc59e487adba22df54::IlllIlIlllIIllIl{$IIb39071a48a82a07eeb9256f406abebc5::llIIllIlIIlIllII})->extrArray($object->{$f}) } }, $cfg_controls, $cfg_titles); } sub set { my ($form, $f, $v) = @_; $form->getDecorated->{$f} = exists($v->{enabled}) && ! $v->{enabled} ? '' : II720d6e18aa34327713eb014408fc9144::llllllIIIlIIlIlI($II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIlIIIIIIlIIII{$II982446f8950cc3dc59e487adba22df54::llIllIIIIIIIlIIl},1004,$II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIlIIIIIIlIIII{$IIb39071a48a82a07eeb9256f406abebc5::IIllllIIllIlIlll})->packArray([%$v]); return; } sub buildForPackedField { my ($form, $f, $style, $cfg_controls, $cfg_titles) = @_; build($form->pfx . $f, $style, { @{ IIb39071a48a82a07eeb9256f406abebc5::llllIIIIllllllIl($II720d6e18aa34327713eb014408fc9144::lIIIlllIllIIlllI{$IIb39071a48a82a07eeb9256f406abebc5::lIlIlllIIlIllIII},1004,$II720d6e18aa34327713eb014408fc9144::lIIIlllIllIIlllI{$II982446f8950cc3dc59e487adba22df54::IllIIllIIIIlIIll})->extrArray($form->getDecorated->{$f}) } }, $cfg_controls, $cfg_titles); } sub build { my ($f, $style, $values, $cfg_controls, $cfg_titles) = @_; my $subObject = IIb39071a48a82a07eeb9256f406abebc5::IIIIIIIllIlIIlll($II8dae0e141ee45f5daba6a74e4a7c3b6f::IllIlIIllllIIIlI{$II982446f8950cc3dc59e487adba22df54::llIllIIIIIIIlIIl},999,$II8dae0e141ee45f5daba6a74e4a7c3b6f::IllIlIIllllIIIlI{$IIb39071a48a82a07eeb9256f406abebc5::llIIIllIIlIIIIIl})->new->set($values); my $subForm = $subObject->getView(II720d6e18aa34327713eb014408fc9144::IIlllllIlllIIIIl($II8dae0e141ee45f5daba6a74e4a7c3b6f::lIlllIIIlIlIlIII{$IIb39071a48a82a07eeb9256f406abebc5::lIlIIllllllIllIl},990,$II8dae0e141ee45f5daba6a74e4a7c3b6f::lIlllIIIlIlIlIII{$II982446f8950cc3dc59e487adba22df54::lllIIlIlIIIIlIlI})); $subForm->setPFX($f); my @pairs; for my $sf (keys %{$cfg_controls}) { my ($scope, $statlist) = $cfg_controls->{$sf} =~ /^([\w:]+)(.*)/; my $handler = index($scope, '::') < 0 ? join('::', II720d6e18aa34327713eb014408fc9144::IllIIIIlIIlllIll($IIb39071a48a82a07eeb9256f406abebc5::IIIllllIllIlIIIl{$II720d6e18aa34327713eb014408fc9144::llIlIIIIlIllIIll},990,$IIb39071a48a82a07eeb9256f406abebc5::IIIllllIllIlIIIl{$II720d6e18aa34327713eb014408fc9144::lIIlllIllIlIllll})->standardHandlersScope, $scope, "get$statlist") : $cfg_controls->{$sf}; my $control = Zen::PerlHandler->get($handler)->do($subForm, $sf); push @pairs, [$cfg_titles->{$sf}, $control] if $control; } $style eq 'plain' ? join('', map { "<div class='form-group row'><label class='col-4 col-form-label'>$_->[0]</label><div class='col-8'>$_->[1]</div></div>" } @pairs) : $style eq 'table_right' ? '<div class="form-group row">' . join('', map { "<label class='col-4 col-form-label'>$_->[0]</label><div class='col-8'>$_->[1]</div>" } @pairs) . '</div>' : $style eq 'table_left' ? '<div class="form-group row">' . join('', map { "<label class='col-4 col-form-label'>$_->[0]</label><div class='col-8'>$_->[1]</div>" } @pairs) . '</div>' : die("unknown style [$style]"); } 1; 