version 1.69, 2008/11/28 21:02:35
|
version 1.70, 2008/12/01 15:03:40
|
Line 697 sub print_login {
|
Line 697 sub print_login {
|
); |
); |
foreach my $item (@images) { |
foreach my $item (@images) { |
$defaults{$item} = $defaultdesign{'login.'.$item}; |
$defaults{$item} = $defaultdesign{'login.'.$item}; |
|
$defaults{'showlogo'}{$item} = 1; |
} |
} |
foreach my $item (@bgs) { |
foreach my $item (@bgs) { |
$defaults{'bgs'}{$item} = $defaultdesign{'login.'.$item}; |
$defaults{'bgs'}{$item} = $defaultdesign{'login.'.$item}; |
Line 718 sub print_login {
|
Line 719 sub print_login {
|
} |
} |
} |
} |
foreach my $item (@images) { |
foreach my $item (@images) { |
if ($settings->{$item} ne '') { |
if (defined($settings->{$item})) { |
$designs{$item} = $settings->{$item}; |
$designs{$item} = $settings->{$item}; |
$is_custom{$item} = 1; |
$is_custom{$item} = 1; |
} |
} |
|
if (defined($settings->{'showlogo'}{$item})) { |
|
$designs{'showlogo'}{$item} = $settings->{'showlogo'}{$item}; |
|
} |
} |
} |
foreach my $item (@logintext) { |
foreach my $item (@logintext) { |
if ($settings->{$item} ne '') { |
if ($settings->{$item} ne '') { |
Line 915 sub display_color_options {
|
Line 919 sub display_color_options {
|
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'>'. |
$datatable .= '<tr'.$css_class.'>'. |
'<td>'.$choices->{$img}.'</td>'; |
'<td>'.$choices->{$img}; |
my ($imgfile,$img_import,$login_hdr_pick,$logincolors); |
my ($imgfile,$img_import,$login_hdr_pick,$logincolors); |
|
if ($role eq 'login') { |
|
if ($img eq 'login') { |
|
$login_hdr_pick = |
|
&login_header_options($img,$role,$defaults,$is_custom,$choices, |
|
$loginheader); |
|
$logincolors = |
|
&login_text_colors($img,$role,$logintext,$phase,$choices, |
|
$designs); |
|
} elsif ($img ne 'domlogo') { |
|
$datatable.= &logo_display_options($img,$defaults,$designs); |
|
} |
|
} |
|
$datatable .= '</td>'; |
if ($designs->{$img} ne '') { |
if ($designs->{$img} ne '') { |
$imgfile = $designs->{$img}; |
$imgfile = $designs->{$img}; |
$img_import = ($imgfile =~ m{^/adm/}); |
$img_import = ($imgfile =~ m{^/adm/}); |
} else { |
} else { |
$imgfile = $defaults->{$img}; |
$imgfile = $defaults->{$img}; |
} |
} |
if ($img eq 'login') { |
|
$login_hdr_pick = &login_header_options($img,$role,$defaults,$is_custom,$choices, |
|
$loginheader); |
|
$logincolors = |
|
&login_text_colors($img,$role,$logintext,$phase,$choices,$designs); |
|
} |
|
if ($imgfile) { |
if ($imgfile) { |
my ($showfile,$fullsize); |
my ($showfile,$fullsize); |
if ($imgfile =~ m-^(/res/\Q$dom\E/\Q$confname\E/\Q$img\E)/([^/]+)$-) { |
if ($imgfile =~ m-^(/res/\Q$dom\E/\Q$confname\E/\Q$img\E)/([^/]+)$-) { |
Line 1017 sub display_color_options {
|
Line 1028 sub display_color_options {
|
my $bgs_def; |
my $bgs_def; |
foreach my $item (@{$bgs}) { |
foreach my $item (@{$bgs}) { |
if (!$is_custom->{$item}) { |
if (!$is_custom->{$item}) { |
$bgs_def .= '<td>'.$choices->{$item}.' <span id="css_default_'.$role.'_'.$item.'" style="background-color: '.$defaults->{'bgs'}{$item}.';"> </span><br />'.$defaults->{'bgs'}{$item}.'</td>'; |
$bgs_def .= '<td><span class="LC_nobreak">'.$choices->{$item}.'</span> <span id="css_default_'.$role.'_'.$item.'" style="background-color: '.$defaults->{'bgs'}{$item}.';"> </span><br />'.$defaults->{'bgs'}{$item}.'</td>'; |
} |
} |
} |
} |
if ($bgs_def) { |
if ($bgs_def) { |
Line 1068 sub display_color_options {
|
Line 1079 sub display_color_options {
|
return $datatable; |
return $datatable; |
} |
} |
|
|
|
sub logo_display_options { |
|
my ($img,$defaults,$designs) = @_; |
|
my $checkedon; |
|
if (ref($defaults) eq 'HASH') { |
|
if (ref($defaults->{'showlogo'}) eq 'HASH') { |
|
if ($defaults->{'showlogo'}{$img}) { |
|
$checkedon = 'checked="checked" '; |
|
} |
|
} |
|
} |
|
if (ref($designs) eq 'HASH') { |
|
if (ref($designs->{'showlogo'}) eq 'HASH') { |
|
if (defined($designs->{'showlogo'}{$img})) { |
|
if ($designs->{'showlogo'}{$img} == 0) { |
|
$checkedon = ''; |
|
} elsif ($designs->{'showlogo'}{$img} == 1) { |
|
$checkedon = 'checked="checked" '; |
|
} |
|
} |
|
} |
|
} |
|
return '<br /><label> <input type="checkbox" name="'. |
|
'login_showlogo_'.$img.'" value="1" '.$checkedon.'/>'. |
|
&mt('show').'</label>'."\n"; |
|
} |
|
|
sub login_header_options { |
sub login_header_options { |
my ($img,$role,$defaults,$is_custom,$choices,$loginheader) = @_; |
my ($img,$role,$defaults,$is_custom,$choices,$loginheader) = @_; |
my $image_checked = ' checked="checked" '; |
my $image_checked = ' checked="checked" '; |
Line 1119 sub image_changes {
|
Line 1156 sub image_changes {
|
my ($is_custom,$alt_text,$img_import,$showfile,$fullsize,$role,$img,$imgfile,$logincolors) = @_; |
my ($is_custom,$alt_text,$img_import,$showfile,$fullsize,$role,$img,$imgfile,$logincolors) = @_; |
my $output; |
my $output; |
if (!$is_custom) { |
if (!$is_custom) { |
if ($img eq 'login') { |
if ($img ne 'domlogo') { |
$output .= &mt('Default image:').'<br />'; |
$output .= &mt('Default image:').'<br />'; |
} else { |
} else { |
$output .= &mt('Default in use:').'<br />'; |
$output .= &mt('Default in use:').'<br />'; |
Line 2847 sub modify_colors {
|
Line 2884 sub modify_colors {
|
$domconfig->{$role} = {}; |
$domconfig->{$role} = {}; |
} |
} |
foreach my $img (@images) { |
foreach my $img (@images) { |
|
if (($role eq 'login') && (($img eq 'img') || ($img eq 'logo'))) { |
|
if (defined($env{'form.login_showlogo_'.$img})) { |
|
$confhash->{$role}{'showlogo'}{$img} = 1; |
|
} else { |
|
$confhash->{$role}{'showlogo'}{$img} = 0; |
|
} |
|
} |
if ( ! $env{'form.'.$role.'_'.$img.'.filename'} |
if ( ! $env{'form.'.$role.'_'.$img.'.filename'} |
&& !defined($domconfig->{$role}{$img}) |
&& !defined($domconfig->{$role}{$img}) |
&& !$env{'form.'.$role.'_del_'.$img} |
&& !$env{'form.'.$role.'_del_'.$img} |
Line 2921 sub modify_colors {
|
Line 2965 sub modify_colors {
|
$changes{$role}{'images'}{$img} = 1; |
$changes{$role}{'images'}{$img} = 1; |
} |
} |
} |
} |
} |
if (($role eq 'login') && (($img eq 'logo') || ($img eq 'img'))) { |
|
if (ref($domconfig->{'login'}{'showlogo'}) eq 'HASH') { |
|
if ($confhash->{$role}{'showlogo'}{$img} ne |
|
$domconfig->{$role}{'showlogo'}{$img}) { |
|
$changes{$role}{'showlogo'}{$img} = 1; |
|
} |
|
} else { |
|
if ($confhash->{$role}{'showlogo'}{$img} == 0) { |
|
$changes{$role}{'showlogo'}{$img} = 1; |
|
} |
|
} |
|
} |
|
} |
if ($domconfig->{$role}{'font'} ne '') { |
if ($domconfig->{$role}{'font'} ne '') { |
if ($confhash->{$role}{'font'} ne $domconfig->{$role}{'font'}) { |
if ($confhash->{$role}{'font'} ne $domconfig->{$role}{'font'}) { |
$changes{$role}{'font'} = 1; |
$changes{$role}{'font'} = 1; |
Line 3013 sub default_change_checker {
|
Line 3069 sub default_change_checker {
|
$confhash->{$role}{$img} = ''; |
$confhash->{$role}{$img} = ''; |
$changes->{$role}{'images'}{$img} = 1; |
$changes->{$role}{'images'}{$img} = 1; |
} |
} |
|
if ($role eq 'login') { |
|
if ($confhash->{$role}{'showlogo'}{$img} == 0) { |
|
$changes->{$role}{'showlogo'}{$img} = 1; |
|
} |
|
} |
} |
} |
if ($confhash->{$role}{'font'}) { |
if ($confhash->{$role}{'font'}) { |
$changes->{$role}{'font'} = 1; |
$changes->{$role}{'font'} = 1; |
Line 3044 sub display_colorchgs {
|
Line 3105 sub display_colorchgs {
|
$resulttext .= '<li>'.&mt($choices{$key}).':<ul>'; |
$resulttext .= '<li>'.&mt($choices{$key}).':<ul>'; |
} |
} |
foreach my $item (sort(keys(%{$changes->{$role}{$key}}))) { |
foreach my $item (sort(keys(%{$changes->{$role}{$key}}))) { |
if ($confhash->{$role}{$item} eq '') { |
if (($role eq 'login') && ($key eq 'showlogo')) { |
|
if ($confhash->{$role}{$key}{$item}) { |
|
$resulttext .= '<li>'.&mt("$choices{$item} set to be displayed").'</li>'; |
|
} else { |
|
$resulttext .= '<li>'.&mt("$choices{$item} set to not be displayed").'</li>'; |
|
} |
|
} elsif ($confhash->{$role}{$item} eq '') { |
$resulttext .= '<li>'.&mt("$choices{$item} set to default").'</li>'; |
$resulttext .= '<li>'.&mt("$choices{$item} set to default").'</li>'; |
} else { |
} else { |
my $newitem = $confhash->{$role}{$item}; |
my $newitem = $confhash->{$role}{$item}; |