package II3562149e53818b6637b38680e87ba918::time; use strict; use base qw/II720d6e18aa34327713eb014408fc9144/; use IIa67e09caf104f2e50322b7bc59b766fb; sub get { my ($form, $f) = @_; my (undef, $default_now) = split ',', Zen::PerlHandler->getStatList; my $addon = qq(class="form-control"); my $code; my $value = $form->getDecorated->{$f} || ($default_now ? II982446f8950cc3dc59e487adba22df54::IIllllIlIIllIIII($IIb39071a48a82a07eeb9256f406abebc5::lIIIIlIlIlllIIlI{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IllIIlIlIlIlIIIl},1010,$IIb39071a48a82a07eeb9256f406abebc5::lIIIIlIlIlllIIlI{$II982446f8950cc3dc59e487adba22df54::IlIllIlIlIIlIlll})->new->time : ''); my $pfxf = $form->pfx . $f; qq(<input $addon type="text" name="$pfxf" value="$value" size="9">); } sub set { my ($form, $f, $value) = @_; my (undef, $default_now) = split ',', Zen::PerlHandler->getStatList; $value =~ s/\s+//g; if ($value) { my ($h, $m, $s) = $value =~ /^(\d{2})\:(\d{2})(?:\:(\d{2}))?$/; $form->addError(__PACKAGE__->message('InvalidTime', $value)) if ! $h || ! $m || $h > 23 || $m > 59 || ($s && $s > 59); } $form->getDecorated->{$f} = $value || undef; return; } 1; 