X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=3b37dab5ea5800b456fd19e9c63ee8542fc5f3dc;hb=ebef09a8bde1d401fc7b0d60cfe09393e9a84c0f;hp=c1fbb7c6c2968ff0c12607294494a04161390340;hpb=0d9ac875bf41d614388e6cf3864806de4c04c0e9;p=kivitendo-erp.git
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index c1fbb7c6c..3b37dab5e 100644
--- a/bin/mozilla/admin.pl
+++ b/bin/mozilla/admin.pl
@@ -38,6 +38,7 @@ use SL::Form;
use SL::User;
$form = new Form;
+$form->{"root"} = "root login";
$locale = new Locale $language, "admin";
@@ -55,6 +56,7 @@ $form->{favicon} = "favicon.ico";
if ($form->{action}) {
+
$subroutine = $locale->findsub($form->{action});
if ($subroutine eq 'login') {
@@ -120,11 +122,9 @@ sub adminlogin {
| . $locale->text('Password') . qq|
+ . $locale->text('Login') . qq|">
-
{path}>
@@ -164,6 +164,10 @@ sub add_user {
}
$myconfig->{vclimit} = 200;
+ $myconfig->{"countrycode"} = "de";
+ $myconfig->{"numberformat"} = "1000,00";
+ $myconfig->{"dateformat"} = "dd.mm.yy";
+
&form_header;
&form_footer;
@@ -193,8 +197,7 @@ sub form_footer {
print qq|
-
-
+
{path}>
{rpw}>
@@ -236,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);
}
}
@@ -290,7 +293,7 @@ sub list_users {
foreach $key (sort keys %member) {
$href =
- "$script?action=edit&login=$key&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}";
+ "$script?action=edit&login=$key&path=$form->{path}&rpw=$form->{rpw}";
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
@@ -299,7 +302,7 @@ sub list_users {
$member{$key}{dbname} = $member{$key}{dbuser}
if ($member{$key}{dbdriver} eq 'Oracle');
- $column_data{login} = qq|$key |;
+ $column_data{login} = qq|$key |;
$column_data{name} = qq|$member{$key}{name} |;
$column_data{company} = qq|$member{$key}{company} |;
$column_data{dbdriver} = qq|$member{$key}{dbdriver} |;
@@ -310,7 +313,7 @@ sub list_users {
$i++;
$i %= 2;
print qq|
- |;
+ |;
map { print "$column_data{$_}\n" } @column_index;
@@ -329,7 +332,6 @@ sub list_users {
{path}>
{rpw}>
-
@@ -344,7 +346,9 @@ $nologin
| . $locale->text('Click on login name to edit!') . qq|
|
- . $locale->text('To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.')
+ . $locale->text(
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.'
+ )
. qq|
@@ -367,8 +371,7 @@ $nologin
| . $locale->text('Password') . qq|
+ . $locale->text('Login') . qq|">
{path}>
@@ -420,7 +423,8 @@ sub form_header {
%countrycodes = User->country_codes;
$countrycodes = "";
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
- keys %countrycodes) {
+ keys %countrycodes
+ ) {
$countrycodes .=
($myconfig->{countrycode} eq $key)
? "$countrycodes{$key}"
@@ -436,11 +440,13 @@ 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)$/, @all;
+ @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir;
+ @alldir = grep !/^(webpages|\.svn)$/, @alldir;
@allhtml = reverse grep !/Default/, @allhtml;
push @allhtml, 'Default';
@@ -461,14 +467,19 @@ sub form_header {
$item =~ s/-.*//g;
if ($item ne $lastitem) {
- $mastertemplates .= qq| $item\n|;
+ my $selected = $item eq "German" ? " selected" : "";
+ $mastertemplates .= qq| $item\n|;
$lastitem = $item;
}
}
- 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}) {
@@ -477,10 +488,17 @@ sub form_header {
$selectstylesheet .= qq| $item\n|;
}
}
- $selectstylesheet .= " \n";
$form->header;
+ if ($myconfig->{menustyle} eq "v3") {
+ $menustyle_v3 = "checked";
+ } elsif ($myconfig->{menustyle} eq "neu") {
+ $menustyle_neu = "checked";
+ } else {
+ $menustyle_old = "checked";
+ }
+
print qq|
@@ -494,16 +512,16 @@ sub form_header {
@@ -611,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"}>
+
|;
}
@@ -644,13 +673,13 @@ sub form_header {
| . $locale->text('Dataset') . qq|
{"${item}_dbuser"}>
| . $locale->text('Password') . qq|
- {"${item}_dbpasswd"}>
+
|;
}
print qq|
- {dbpasswd}>
+
@@ -714,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;
}
@@ -849,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) {
@@ -955,7 +984,7 @@ sub save {
# copy templates to the directory
opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!");
- @templates = grep /$form->{mastertemplates}.*?\.(html|tex)$/,
+ @templates = grep /$form->{mastertemplates}.*?\.(html|tex|sty|xml|txb)$/,
readdir TEMPLATEDIR;
closedir TEMPLATEDIR;
@@ -1056,6 +1085,7 @@ sub delete {
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
@@ -1106,11 +1136,17 @@ sub change_admin_password {
@@ -1275,7 +1329,9 @@ sub dbselect_source {
|
- . $locale->text('This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!')
+ . $locale->text(
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!'
+ )
. qq|
$msg{$form->{dbdriver}}
@@ -1311,11 +1367,12 @@ sub update_dataset {
$form->{title}
|;
-
+ my $field_id = 0;
foreach $key (sort keys %needsupdate) {
if ($needsupdate{$key} ne $form->{dbversion}) {
- $upd .= qq| $key\n|;
+ $upd .= qq| $key\n|;
$form->{dbupdate} .= "db$key ";
+ $field_id++;
}
}
@@ -1327,12 +1384,12 @@ sub update_dataset {