X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=c2db1384dc5f9ec0c0504d03c53c0d63cb2ddb9c;hb=864b73ffb0964215f287a393ea37ec2eef6eb8eb;hp=c1fbb7c6c2968ff0c12607294494a04161390340;hpb=0d9ac875bf41d614388e6cf3864806de4c04c0e9;p=kivitendo-erp.git
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index c1fbb7c6c..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') {
@@ -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,13 +467,14 @@ 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;
+ @all = sort(grep({ /\.css$/ && ($_ ne "tabcontent.css") } readdir(CSS)));
closedir CSS;
foreach $item (@all) {
@@ -477,10 +484,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 +508,16 @@ sub form_header {
@@ -611,24 +635,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 +669,13 @@ sub form_header {
| . $locale->text('Dataset') . qq|
{"${item}_dbuser"}>
| . $locale->text('Password') . qq|
- {"${item}_dbpasswd"}>
+
|;
}
print qq|
- {dbpasswd}>
+
@@ -714,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;
}
@@ -849,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) {
@@ -955,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;
@@ -1056,6 +1081,7 @@ sub delete {
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
@@ -1106,11 +1132,17 @@ sub change_admin_password {
@@ -1275,7 +1325,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 +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++;
}
}
@@ -1327,12 +1380,12 @@ sub update_dataset {