package II32e4187eb23e5ea8d9380dae30cfda36; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; use II661a28aacaa6830f99dea1bc5f86cfb5; BEGIN{*II32e4187eb23e5ea8d9380dae30cfda36::IllIIlIlllllllIl=\%{pack('H6','0c726c')^'I<:'};*II32e4187eb23e5ea8d9380dae30cfda36::lIllIIIIlllIlIlI=\&{pack('H24','24585423067a38776e5a3863')^'I9=M<@KOY8@W'};$II32e4187eb23e5ea8d9380dae30cfda36::lllllllIlllIIlll=pack('H18','73156f050b7c1e1d01')^';A;UT4QNU';$II32e4187eb23e5ea8d9380dae30cfda36::lIllIIIIIIIllIII=pack('H12','7b0a71787515')^'1C?4<V'};sub getFormElement { my ($form, $f, $tmpl_code, $related_f) = @_; my $object = $form->getDecorated; my $theme = "package$object->{id}"; my ($tmpl_type, $tmpl_name) = split '/', $tmpl_code, 2; my $dsimple_mode = $ENV{JIN_TMPL} =~ m!/ds/!; my $code = ''; my (@values, %titles); for my $theme (II661a28aacaa6830f99dea1bc5f86cfb5::lIIlllIlllllllIl($II661a28aacaa6830f99dea1bc5f86cfb5::lllllIIlllllIIIl{$II32e4187eb23e5ea8d9380dae30cfda36::lIlllIIllIllIIlI},24,$II661a28aacaa6830f99dea1bc5f86cfb5::lllllIIlllllIIIl{$II32e4187eb23e5ea8d9380dae30cfda36::IIIIlIIlIlIlIlIl})->listGlobalThemes($tmpl_type)) { next if $dsimple_mode && $theme eq 'delavord'; push @values, $theme; $titles{$theme} = II32e4187eb23e5ea8d9380dae30cfda36::lIllIIIIlllIlIlI($II32e4187eb23e5ea8d9380dae30cfda36::IIlIlIIlIllllIII{$II32e4187eb23e5ea8d9380dae30cfda36::lllllllIlllIIlll},24,$II32e4187eb23e5ea8d9380dae30cfda36::IIlIlIIlIllllIII{$II661a28aacaa6830f99dea1bc5f86cfb5::lllIllIIIlllIlll})->getThemeTitle($tmpl_type, $theme); } my ($customized, $selected); if (my $t = II661a28aacaa6830f99dea1bc5f86cfb5::IIIIIIIIllIIlIll($II661a28aacaa6830f99dea1bc5f86cfb5::IIlIlIlIllllllIl{$II661a28aacaa6830f99dea1bc5f86cfb5::llIllIIlIlIIIIIl},24,$II661a28aacaa6830f99dea1bc5f86cfb5::IIlIlIlIllllllIl{$II661a28aacaa6830f99dea1bc5f86cfb5::llllIlllllllIlII})->get($tmpl_code, $theme)) { $customized = 1; $selected = $t->{orig_theme}; } else { $selected = $object->dbc->getValue("select real_theme from jin_theme_compiled where tmpl_code=? and theme=? limit 1", [$tmpl_code, $theme]); } my $empty_value = $dsimple_mode ? '' : '=' . $form->message('msg.use_system_wide_settings'); my $sel_disabled = $customized ? 'disabled' : ''; my $switch_related_code = $related_f && ! $sel_disabled ? join('; ', map { qq(var rel_sel = document.getElementById('Sel$_'); if (! rel_sel.disabled) rel_sel.selectedIndex = this.selectedIndex ) } @$related_f) : ''; $code .= II3562149e53818b6637b38680e87ba918::perllist::buildList('select', "$f\_sel", $selected, \@values, \%titles, $empty_value, qq(id="Sel$f" $sel_disabled onChange="$switch_related_code")); my $cb_checked = $customized ? 'checked' : ''; my $cb_msg = $form->message('msg.customize'); $code .= qq(<div class="custom-control custom-checkbox"><input id="$f\_cb" class="custom-control-input" type="checkbox" name="$f\_cb" value="1" onClick="document.getElementById('Div$f').style.display = this.checked ? 'inline' : 'none'; document.getElementById('Sel$f').disabled = this.checked" $cb_checked><label for="$f\_cb" class="custom-control-label">$cb_msg</label>); my $btn_msg = $form->message('msg.edit_template'); my $display = $customized ? 'inline' : 'none'; $code .= <<END_HTML;
&nbsp;<a id="Div$f" style="display:$display" href="javascript:var sel = document.getElementById('Sel$f'); jinPopWin('/master/tools/themes/edit_template.html?tmpl_type=$tmpl_type&tmpl_name=$tmpl_name&theme=$theme&orig_theme=' + sel.options[sel.selectedIndex].value, 850, 700);">$btn_msg</a></div>
END_HTML
$code; } BEGIN{*II32e4187eb23e5ea8d9380dae30cfda36::IIlIlIIlIllllIII=\%{pack('H6','761463')^'3Z5'};*II32e4187eb23e5ea8d9380dae30cfda36::lllllIIIllIllllI=\&{pack('H24','38212f2169794c72672e376d')^'U@FOSC?JPLOY'};$II32e4187eb23e5ea8d9380dae30cfda36::lIlllIIllIllIIlI=pack('H18','090c05136d761d6c03')^'AXQC2>R?W';$II32e4187eb23e5ea8d9380dae30cfda36::IIIIlIIlIlIlIlIl=pack('H12','187c0c1a7a0e')^'R5BV3M'};sub setFormElement { my ($form, $f, $v, $tmpl_code) = @_; my $object = $form->getDecorated; my $theme = "package$object->{id}"; if (! $v->{cb}) { if (my $o = II32e4187eb23e5ea8d9380dae30cfda36::lllllIIIllIllllI($II720d6e18aa34327713eb014408fc9144::lIIIIIllIIIlllll{$II32e4187eb23e5ea8d9380dae30cfda36::lIlllIIllIllIIlI},24,$II720d6e18aa34327713eb014408fc9144::lIIIIIllIIIlllll{$II32e4187eb23e5ea8d9380dae30cfda36::IIIIlIIlIlIlIlIl})->get($tmpl_code, $theme)) { $o->delete; } II32e4187eb23e5ea8d9380dae30cfda36::lllllIIIllIllllI($II32e4187eb23e5ea8d9380dae30cfda36::IllIIlIlllllllIl{$II661a28aacaa6830f99dea1bc5f86cfb5::lIIIIIllIlIlIlll},24,$II32e4187eb23e5ea8d9380dae30cfda36::IllIIlIlllllllIl{$II661a28aacaa6830f99dea1bc5f86cfb5::llIIlllllIIlIIlI})->compileTheme($tmpl_code, $theme, $v->{sel}); } return } 1; 