X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=3b37dab5ea5800b456fd19e9c63ee8542fc5f3dc;hb=9fd46de37d7906b7c104c17112b34bae7d534d67;hp=e55c999843027df1857508a494e4591980ef8cd1;hpb=ab56e3a45aae82289da09151f1530250d766dd20;p=kivitendo-erp.git
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index e55c99984..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') {
@@ -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,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';
@@ -462,14 +467,19 @@ 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"}> |
+ |
|;
}
@@ -653,13 +673,13 @@ sub form_header {
| . $locale->text('Dataset') . qq| |
{"${item}_dbuser"}> |
| . $locale->text('Password') . qq| |
- {"${item}_dbpasswd"}> |
+ |
|;
}
print qq|
- {dbpasswd}>
+
@@ -723,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;
}
@@ -858,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) {
@@ -964,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;
@@ -1065,6 +1085,7 @@ sub delete {
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
@@ -1115,11 +1136,17 @@ sub change_admin_password {
@@ -1325,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++;
}
}
@@ -1341,12 +1384,12 @@ sub update_dataset {