X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=3b37dab5ea5800b456fd19e9c63ee8542fc5f3dc;hb=036fe04d0f9d0ccfc7ef563530d3c118986ef0ca;hp=f0b1c2d78c6e0ba3dd663aad85d22f097627bea2;hpb=77122e512a74c88bf51e401a18f3cae8da25f227;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index f0b1c2d78..3b37dab5e 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -239,7 +239,7 @@ sub list_users { if (/^(name=|company=|templates=|dbuser=|dbdriver=|dbname=|dbhost=)/) { chop($var = $&); - ($null, $member{$login}{$var}) = split /=/, $_, 2; + ($null, $member{$login}{$var}) = split(/=/, $_, 2); } } @@ -440,11 +440,12 @@ sub form_header { } opendir TEMPLATEDIR, "$templates/." or $form->error("$templates : $!"); - @all = grep !/^\.\.?$/, readdir TEMPLATEDIR; + my @all = readdir(TEMPLATEDIR); + my @alldir = sort(grep({ -d "$templates/$_" && !/^\.\.?$/ } @all)); + my @allhtml = sort(grep({ -f "$templates/$_" && /\.html$/ } @all)); closedir TEMPLATEDIR; - @allhtml = sort grep /\.html/, @all; - @alldir = grep !/\.(html|tex|sty|odt)$/, @all; + @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir; @alldir = grep !/^(webpages|\.svn)$/, @alldir; @allhtml = reverse grep !/Default/, @allhtml; @@ -472,9 +473,13 @@ sub form_header { } } - opendir CSS, "css/."; - @all = grep /.*\.css$/, readdir CSS; - closedir CSS; +# opendir CSS, "css/."; +# @all = grep /.*\.css$/, readdir CSS; +# closedir CSS; + +# css dir has styles that are not intended as general layouts. +# reverting to hardcoded list + @all = qw(lx-office-erp.css Win2000.css); foreach $item (@all) { if ($item eq $myconfig->{stylesheet}) { @@ -483,12 +488,16 @@ sub form_header { $selectstylesheet .= qq|$item\n|; } } - $selectstylesheet .= "\n"; $form->header; - if ($myconfig->{menustyle} eq "neu") { $neu = "checked"; } - else { $old = "checked"; } + if ($myconfig->{menustyle} eq "v3") { + $menustyle_v3 = "checked"; + } elsif ($myconfig->{menustyle} eq "neu") { + $menustyle_neu = "checked"; + } else { + $menustyle_old = "checked"; + } print qq| @@ -503,16 +512,16 @@ sub form_header { | . $locale->text('Login') . qq| - + | . $locale->text('Password') . qq| - {password}> - {password}> + + | . $locale->text('Name') . qq| - + | . $locale->text('E-mail') . qq| @@ -539,8 +548,8 @@ sub form_header { $myconfig->{address} - | . $locale->text('Steuernummer') . qq| - + | . $locale->text('Tax number') . qq| + | . $locale->text('Ust-IDNr') . qq| @@ -596,8 +605,13 @@ sub form_header { | . $locale->text('Setup Menu') . qq| - New - Old + | . + $locale->text("Top (CSS)") . qq| + | . + $locale->text("Top (Javascript)") . qq| + | . + $locale->text("Old (on the side)") . qq| + {templates}> @@ -625,24 +639,25 @@ sub form_header { print qq| | . $locale->text('Driver') . qq| - $item + $item | . $locale->text('Host') . qq| - {"${item}_dbhost"}> + |; if ($item eq 'Pg') { + print qq| | . $locale->text('Dataset') . qq| - {Pg_dbname}> + | . $locale->text('Port') . qq| - {Pg_dbport}> + | . $locale->text('User') . qq| - {"${item}_dbuser"}> + | . $locale->text('Password') . qq| - {"${item}_dbpasswd"}> + |; } @@ -658,13 +673,13 @@ sub form_header { | . $locale->text('Dataset') . qq| {"${item}_dbuser"}> | . $locale->text('Password') . qq| - {"${item}_dbpasswd"}> + |; } print qq| - {dbpasswd}> + @@ -728,7 +743,7 @@ sub form_header { |; - foreach $item (split /;/, $myconfig->{acs}) { + foreach $item (split(/;/, $myconfig->{acs})) { ($key, $value) = split /--/, $item, 2; $excl{$key}{$value} = 1; } @@ -863,7 +878,7 @@ sub save { $myconfig = new User "$memberfile", "$form->{login}"; # redo acs variable and delete all the acs codes - @acs = split /;/, $form->{acs}; + @acs = split(/;/, $form->{acs}); $form->{acs} = ""; foreach $item (@acs) { @@ -969,7 +984,7 @@ sub save { # copy templates to the directory opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!"); - @templates = grep /$form->{mastertemplates}.*?\.(html|tex|sty)$/, + @templates = grep /$form->{mastertemplates}.*?\.(html|tex|sty|xml|txb)$/, readdir TEMPLATEDIR; closedir TEMPLATEDIR; @@ -1121,9 +1136,16 @@ sub change_admin_password { {script}> -| - . $locale->text('Password') - . qq| + + + | . $locale->text('Password') . qq| + + + + | . $locale->text('Repeat the password') . qq| + + + {path}> {rpw}> @@ -1141,6 +1163,24 @@ sub change_admin_password { } sub change_password { + if ($form->{"password"} ne $form->{"password_again"}) { + $form->{title} = + qq|Lx-Office ERP | + . $locale->text('Administration') . " / " + . $locale->text('Change Admin Password'); + + $form->header; + + print qq| + + + +| . $locale->text('Change Admin Password') . qq| + +| . $locale->text("The passwords do not match.") . qq| +|; + return; + } $root->{password} = $form->{password}; @@ -1251,9 +1291,9 @@ sub dbselect_source { | . $locale->text('User') . qq| - {dbuser}> + | . $locale->text('Password') . qq| - + @@ -1276,10 +1316,11 @@ sub dbselect_source { - -|; +# Vorübergehend Deaktiviert +# +print qq| @@ -1343,12 +1384,12 @@ sub update_dataset { {script}> -{dbdriver}> -{dbhost}> -{dbport}> -{dbuser}> -{dbpasswd}> -{dbdefault}> + + + + + + | . $locale->text('The following Datasets need to be updated') . qq| @@ -1398,10 +1439,29 @@ $upd } sub dbupdate { + $form->{"stylesheet"} = "lx-office-erp.css"; + $form->{"title"} = $main::locale->text("Dataset upgrade"); + $form->header(); + my $dbname = + join(" ", + map({ s/\s//g; s/^db//; $_; } + grep({ $form->{$_} } + split(/\s+/, $form->{"dbupdate"})))); + print($form->parse_html_template("dbupgrade/header", + { "dbname" => $dbname })); User->dbupdate(\%$form); - $form->redirect($locale->text('Dataset updated!')); + print qq| + + +| . $locale->text('Dataset updated!') . qq| + + + +escape($form->{$_}); } qw(path rpw))) . +qq|">| . $locale->text("Continue") . qq||; } @@ -1412,7 +1472,7 @@ sub create_dataset { } opendir SQLDIR, "sql/." or $form - error($!); - foreach $item (sort grep /-chart\.sql/, readdir SQLDIR) { + foreach $item (sort grep /-chart\.sql\z/, readdir SQLDIR) { next if ($item eq 'Default-chart.sql'); $item =~ s/-chart\.sql//; push @charts, @@ -1421,21 +1481,22 @@ sub create_dataset { closedir SQLDIR; $selectencoding = qq| - ASCII - Japanese Extended UNIX Code - Chinese Extended UNIX Code - Korean Extended UNIX Code - Taiwan Extended UNIX Code - UTF-8 Unicode - Mule internal type - ISO 8859-1 - ISO 8859-2 - ISO 8859-3 - ISO 8859-4 - ISO 8859-5 - KOI8-R - Windows CP1251 - Windows CP866 + ASCII + Japanese Extended UNIX Code + Chinese Extended UNIX Code + Korean Extended UNIX Code + Taiwan Extended UNIX Code + UTF-8 Unicode + Mule internal type + ISO 8859-1 + ISO 8859-2 + ISO 8859-3 + ISO 8859-4 + ISO 8859-5 + ISO 8859-15 + KOI8-R + Windows CP1251 + Windows CP866 |; $form->{title} = @@ -1490,12 +1551,12 @@ sub create_dataset { -{dbdriver}> -{dbuser}> -{dbhost}> -{dbport}> -{dbpasswd}> -{dbdefault}> + + + + + + @@ -1606,12 +1667,12 @@ sub delete_dataset { -{dbdriver}> -{dbuser}> -{dbhost}> -{dbport}> -{dbpasswd}> -{dbdefault}> + + + + + +
| . $locale->text("The passwords do not match.") . qq| +|; + return; + } $root->{password} = $form->{password}; @@ -1251,9 +1291,9 @@ sub dbselect_source {
-{dbdriver}> -{dbuser}> -{dbhost}> -{dbport}> -{dbpasswd}> -{dbdefault}> + + + + + + @@ -1606,12 +1667,12 @@ sub delete_dataset {
-{dbdriver}> -{dbuser}> -{dbhost}> -{dbport}> -{dbpasswd}> -{dbdefault}> + + + + + +