X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=6ac2a514404e660364e1d6dda425c9cb2816d2b3;hb=3de3c10083058df01ea675e9db04b1a67f9713d0;hp=c1fbb7c6c2968ff0c12607294494a04161390340;hpb=0d9ac875bf41d614388e6cf3864806de4c04c0e9;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index c1fbb7c6c..6ac2a5144 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) ? "

{script}> -| - . $locale->text('Password') - . qq| + + + + + + + + + +
| . $locale->text('Password') . qq|
| . $locale->text('Repeat the password') . qq|
- {path}> {rpw}> @@ -1127,6 +1148,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}; @@ -1134,20 +1173,17 @@ sub change_password { $root->save_member($memberfile); $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}"; + "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; $form->redirect($locale->text('Password changed!')); } sub check_password { - $root = new User "$memberfile", $form->{root}; - if ($root->{password}) { - if ($root->{password} ne $form->{rpw}) { - $form->error($locale->text('Incorrect Password!')); - } + if (!defined($root->{password}) || ($root->{password} ne $form->{rpw})) { + $form->error($locale->text('Incorrect Password!')); } } @@ -1193,9 +1229,12 @@ sub dbselect_source { &dbdriver_defaults; $msg{Pg} = - $locale->text('Leave host and port field empty unless you want to make a remote connection.'); + $locale->text( + 'Leave host and port field empty unless you want to make a remote connection.' + ); $msg{Oracle} = - $locale->text('You must enter a host and port for local and remote connections!'); + $locale->text( + 'You must enter a host and port for local and remote connections!'); $form->{title} = "Lx-Office ERP / " . $locale->text('Database Administration'); @@ -1255,18 +1294,18 @@ sub dbselect_source { - - + {path}> {rpw}>
- -|; +# Vorübergehend Deaktiviert +# +print qq|

@@ -1275,7 +1314,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 +1352,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++; } } @@ -1349,9 +1391,8 @@ $upd - + - {path}> {rpw}> @@ -1383,10 +1424,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| + +
+ +| . $locale->text("Continue") . qq||; } @@ -1468,8 +1528,7 @@ sub create_dataset { | - . $locale->text('Create Chart of Accounts') - . qq| + . $locale->text('Create Chart of Accounts') . qq| @charts @@ -1483,9 +1542,8 @@ sub create_dataset { {dbpasswd}> {dbdefault}> - + - {path}> {rpw}> @@ -1537,7 +1595,6 @@ sub dbcreate { . qq| - @@ -1601,9 +1658,8 @@ sub delete_dataset { {dbpasswd}> {dbdefault}> - + - @@ -1654,7 +1710,6 @@ $form->{db} | . $locale->text('successfully deleted!') . qq| - @@ -1676,7 +1731,7 @@ sub unlock_system { unlink "$userspath/nologin"; $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}"; + "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; $form->redirect($locale->text('Lockfile removed!')); @@ -1689,7 +1744,7 @@ sub lock_system { close(FH); $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}"; + "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; $form->redirect($locale->text('Lockfile created!'));