X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=c2db1384dc5f9ec0c0504d03c53c0d63cb2ddb9c;hb=d3287e3265b566f110eb9734c8ab26b8036d22f4;hp=64dc2495028b4de07a1a861837e5ab628dfd8606;hpb=8c13a44401f79c4960ff28db1aa0dddda9e5413f;p=kivitendo-erp.git
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index 64dc24950..c2db1384d 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') {
@@ -123,7 +125,6 @@ sub adminlogin {
. $locale->text('Login') . qq|">
-
{path}>
@@ -163,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;
@@ -192,8 +197,7 @@ sub form_footer {
print qq|
-
-
+
{path}>
{rpw}>
@@ -235,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);
}
}
@@ -289,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\///;
@@ -298,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} | |;
@@ -309,7 +313,7 @@ sub list_users {
$i++;
$i %= 2;
print qq|
- |;
+
|;
map { print "$column_data{$_}\n" } @column_index;
@@ -328,7 +332,6 @@ sub list_users {
{path}>
{rpw}>
-
@@ -437,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)$/, @all;
+ @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir;
@alldir = grep !/^(webpages|\.svn)$/, @alldir;
@allhtml = reverse grep !/Default/, @allhtml;
@@ -463,13 +467,14 @@ sub form_header {
$item =~ s/-.*//g;
if ($item ne $lastitem) {
- $mastertemplates .= qq|
|;
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"}> |
+ |
|;
}
@@ -654,13 +669,13 @@ sub form_header {
| . $locale->text('Dataset') . qq| |
{"${item}_dbuser"}> |
| . $locale->text('Password') . qq| |
- {"${item}_dbpasswd"}> |
+ |
|;
}
print qq|
- {dbpasswd}>
+
@@ -724,7 +739,7 @@ sub form_header {
|;
- foreach $item (split /;/, $myconfig->{acs}) {
+ foreach $item (split(/;/, $myconfig->{acs})) {
($key, $value) = split /--/, $item, 2;
$excl{$key}{$value} = 1;
}
@@ -859,7 +874,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) {
@@ -965,7 +980,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;
@@ -1066,6 +1081,7 @@ sub delete {
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
@@ -1116,11 +1132,17 @@ sub change_admin_password {
@@ -1326,11 +1363,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++;
}
}
@@ -1342,12 +1380,12 @@ sub update_dataset {