Merge branch 'GewichtinVerkaufsbericht'
authorNiclas Zimmermann <niclas@lx-office-hosting.de>
Tue, 21 Aug 2012 11:15:15 +0000 (13:15 +0200)
committerNiclas Zimmermann <niclas@lx-office-hosting.de>
Tue, 21 Aug 2012 11:15:15 +0000 (13:15 +0200)
65 files changed:
SL/Auth.pm
SL/Controller/Base.pm
SL/Controller/CsvImport/Part.pm
SL/Controller/LoginScreen.pm [new file with mode: 0644]
SL/DBUpgrade2.pm
SL/Dispatcher.pm
SL/Dispatcher/AuthHandler.pm [new file with mode: 0644]
SL/Dispatcher/AuthHandler/Admin.pm [new file with mode: 0644]
SL/Dispatcher/AuthHandler/None.pm [new file with mode: 0644]
SL/Dispatcher/AuthHandler/User.pm [new file with mode: 0644]
bin/mozilla/admin.pl
bin/mozilla/login.pl
bin/mozilla/menujs.pl
css/lx-office-erp/dhtmlsuite/menu-item.css
index.html
locale/de/all
locale/de_DE/all
menu.ini
scripts/csv-import-from-shell.sh
templates/webpages/acctranscorrections/analyze_filter.html
templates/webpages/admin/adminlogin.html
templates/webpages/admin/list_users.html
templates/webpages/amcvar/search_filter.html
templates/webpages/ap/search.html
templates/webpages/ar/search.html
templates/webpages/common/search_history.html
templates/webpages/csv_import/_form_parts.html
templates/webpages/ct/form_footer.html
templates/webpages/ct/form_header.html
templates/webpages/dbupgrade/warning.html
templates/webpages/do/form_header.html
templates/webpages/do/search.html
templates/webpages/do/stock_in_form.html
templates/webpages/dunning/search.html
templates/webpages/fu/add_edit.html
templates/webpages/fu/search.html
templates/webpages/ic/search.html
templates/webpages/ir/_payments.html
templates/webpages/is/_payments.html
templates/webpages/login/auth_db_needs_update.html [deleted file]
templates/webpages/login/auth_db_unreachable.html [deleted file]
templates/webpages/login/authentication_pl_missing.html [deleted file]
templates/webpages/login/login_screen.html [deleted file]
templates/webpages/login/old_configuration_files.html [deleted file]
templates/webpages/login/password_error.html [deleted file]
templates/webpages/login_screen/auth_db_needs_update.html [new file with mode: 0644]
templates/webpages/login_screen/auth_db_unreachable.html [new file with mode: 0644]
templates/webpages/login_screen/old_configuration_files.html [new file with mode: 0644]
templates/webpages/login_screen/user_login.html [new file with mode: 0644]
templates/webpages/menu/header.html
templates/webpages/menu/menunew.html
templates/webpages/menu/menuv3.html
templates/webpages/menu/menuv4.html
templates/webpages/oe/form_footer.html
templates/webpages/oe/form_header.html
templates/webpages/oe/search.html
templates/webpages/sepa/bank_transfer_create.html
templates/webpages/sepa/bank_transfer_edit.html
templates/webpages/sepa/bank_transfer_search.html
templates/webpages/vk/search_invoice.html
templates/webpages/wh/journal_filter.html
templates/webpages/wh/report_filter.html
templates/webpages/wh/warehouse_selection.html
templates/webpages/wh/warehouse_selection_assembly.html
templates/webpages/wh/warehouse_selection_stock.html

index 4c50ddf..ed5c845 100644 (file)
@@ -149,7 +149,7 @@ sub authenticate_root {
 
   my ($self, $password) = @_;
 
-  my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH);
+  my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH());
   if (defined $session_root_auth && $session_root_auth == OK) {
     $::lxdebug->leave_sub;
     return OK;
@@ -164,9 +164,7 @@ sub authenticate_root {
   my $admin_password    = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}->());
 
   my $result = $password eq $admin_password ? OK : ERR_PASSWORD;
-  $self->set_session_value(SESSION_KEY_ROOT_AUTH ,=> $result);
-
-  sleep 5 if $result != OK;
+  $self->set_session_value(SESSION_KEY_ROOT_AUTH() => $result);
 
   $::lxdebug->leave_sub;
   return $result;
@@ -177,7 +175,7 @@ sub authenticate {
 
   my ($self, $login, $password) = @_;
 
-  my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH);
+  my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH());
   if (defined $session_auth && $session_auth == OK) {
     $::lxdebug->leave_sub;
     return OK;
@@ -189,14 +187,16 @@ sub authenticate {
   }
 
   my $result = $login ? $self->{authenticator}->authenticate($login, $password) : ERR_USER;
-  $self->set_session_value(SESSION_KEY_USER_AUTH ,=> $result, login => $login);
-
-  sleep 5 if $result != OK;
+  $self->set_session_value(SESSION_KEY_USER_AUTH() => $result, login => $login);
 
   $::lxdebug->leave_sub;
   return $result;
 }
 
+sub punish_wrong_login {
+  sleep 5;
+}
+
 sub get_stored_password {
   my ($self, $login) = @_;
 
index ac09057..f99b1e7 100644 (file)
@@ -21,11 +21,20 @@ sub url_for {
 
   my %params      = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_;
   my $controller  = delete($params{controller}) || $self->_controller_name;
-  my $action      = delete($params{action})     || 'dispatch';
-  $params{action} = "${controller}/${action}";
+  my $action      = $params{action}             || 'dispatch';
+
+  my $script;
+  if ($controller =~ m/\.pl$/) {
+    # Old-style controller
+    $script = $controller;
+  } else {
+    $params{action} = "${controller}/${action}";
+    $script         = "controller.pl";
+  }
+
   my $query       = join '&', map { uri_encode($_->[0]) . '=' . uri_encode($_->[1]) } @{ flatten(\%params) };
 
-  return "controller.pl?${query}";
+  return "${script}?${query}";
 }
 
 sub redirect_to {
@@ -167,6 +176,15 @@ sub delay_flash_on_redirect {
   0;
 }
 
+sub get_auth_level {
+  # Ignore the 'action' parameter.
+  return 'user';
+}
+
+sub keep_auth_vars_in_form {
+  return 0;
+}
+
 #
 # private functions -- for use in Base only
 #
@@ -497,12 +515,28 @@ action.
 
 The hook's return values are discarded.
 
-=item delay_flash_on_redirect
+=item C<delay_flash_on_redirect>
 
 May be overridden by a controller. If this method returns true, redirect_to
 will delay all flash messages for the current request. Defaults to false for
 compatibility reasons.
 
+=item C<get_auth_level $action>
+
+May be overridden by a controller. Determines what kind of
+authentication is required for a particular action. Must return either
+C<admin> (which means that authentication as an admin is required),
+C<user> (authentication as a normal user suffices) with a possible
+future value C<none> (which would require no authentication but is not
+yet implemented).
+
+=item C<keep_auth_vars_in_form>
+
+May be overridden by a controller. If falsish (the default) all form
+variables whose name starts with C<{AUTH}> are removed before the
+request is routed. Only controllers that handle login requests
+themselves should return trueish for this function.
+
 =back
 
 =head2 PRIVATE FUNCTIONS
index 3be6f2a..3a2bdbe 100644 (file)
@@ -201,7 +201,7 @@ sub check_existing {
 
   if ($self->settings->{article_number_policy} eq 'update_prices') {
     if ($entry->{part}) {
-      map { $entry->{part}->$_( $object->$_ ) if defined $object->$_ } qw(sellprice listprice lastcost);   
+      map { $entry->{part}->$_( $object->$_ ) if defined $object->$_ } qw(sellprice listprice lastcost);
 
       # merge prices
       my %prices_by_pricegroup_id = map { $_->pricegroup->id => $_ } $entry->{part}->prices, $object->prices;
@@ -210,7 +210,8 @@ sub check_existing {
       push @{ $entry->{information} }, $::locale->text('Updating prices of existing entry in database');
       $entry->{object_to_save} = $entry->{part};
     }
-
+  } elsif ( $self->settings->{article_number_policy} eq 'skip' ) {
+    push(@{$entry->{errors}}, $::locale->text('Skipping due to existing entry in database')) if ( $entry->{part} );
   } else {
     $object->partnumber('####') if $entry->{part};
   }
diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm
new file mode 100644 (file)
index 0000000..f561a39
--- /dev/null
@@ -0,0 +1,82 @@
+package SL::Controller::LoginScreen;
+
+use strict;
+
+use parent qw(SL::Controller::Base);
+
+use SL::Dispatcher::AuthHandler::User;
+use SL::User;
+
+#
+# actions
+#
+
+sub action_user_login {
+  my ($self) = @_;
+
+  $self->render('login_screen/user_login');
+}
+
+sub action_logout {
+  my ($self) = @_;
+
+  $::auth->destroy_session;
+  $::auth->create_or_refresh_session;
+  $self->render('login_screen/user_login', error => $::locale->text('You are logged out!'));
+}
+
+sub action_login {
+  my ($self) = @_;
+
+  %::myconfig      = $::form->{'{AUTH}login'} ? $::auth->read_user(login => $::form->{'{AUTH}login'}) : ();
+  %::myconfig      = SL::Dispatcher::AuthHandler::User->new->handle(countrycode => $::myconfig{countrycode});
+  $::form->{login} = $::myconfig{login};
+  $::locale        = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
+  my $user         = User->new(login => $::myconfig{login});
+
+  # if we get an error back, bale out
+  my $result = $user->login($::form);
+
+  # Database update available?
+  ::end_of_request() if -2 == $result;
+
+  # Auth DB needs update? If so log the user out forcefully.
+  if (-3 == $result) {
+    $::auth->destroy_session;
+    return $self->render('login_screen/auth_db_needs_update');
+  }
+
+  # Other login errors.
+  if (0 > $result) {
+    $::auth->punish_wrong_login;
+    return $self->render('login_screen/user_login', error => $::locale->text('Incorrect username or password!'));
+  }
+
+  # Everything is fine.
+  $::auth->set_cookie_environment_variable();
+
+  return $self->redirect_to($::form->{callback}) if $::form->{callback};
+
+  my %style_to_script_map = (
+    v3  => 'v3',
+    neu => 'new',
+    v4  => 'v4',
+  );
+
+  my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
+
+  $self->redirect_to(controller => "menu${menu_script}.pl", action => 'display');
+}
+
+#
+# settings
+#
+sub get_auth_level {
+  return 'none';
+}
+
+sub keep_auth_vars_in_form {
+  return 1;
+}
+
+1;
index dfd5536..be7c54f 100644 (file)
@@ -74,7 +74,7 @@ sub parse_dbupdate_controls {
 
     next if ($control->{ignore});
 
-    $control->{charset} ||= Common::DEFAULT_CHARSET;
+    $control->{charset} = $control->{charset} || $control->{encoding} || Common::DEFAULT_CHARSET;
 
     if (!$control->{"tag"}) {
       _control_error($form, $file_name, $locale->text("Missing 'tag' field.")) ;
@@ -136,7 +136,7 @@ sub process_query {
   my $file_charset = Common::DEFAULT_CHARSET;
   while (<$fh>) {
     last if !/^--/;
-    next if !/^--\s*\@charset:\s*(.+)/;
+    next if !/^--\s*\@(?:charset|encoding):\s*(.+)/;
     $file_charset = $1;
     last;
   }
@@ -233,7 +233,7 @@ sub process_perl_script {
   } else {
     while (<$fh>) {
       last if !/^--/;
-      next if !/^--\s*\@charset:\s*(.+)/;
+      next if !/^--\s*\@(?:charset|encoding):\s*(.+)/;
       $file_charset = $1;
       last;
     }
@@ -547,8 +547,10 @@ depends on. All other upgrades listed in C<depends> will be applied
 before the current one is applied.
 
 =item charset
+=item encoding
 
-The charset this file uses. Defaults to C<ISO-8859-15> if missing.
+The charset this file uses. Defaults to C<ISO-8859-15> if
+missing. Both terms are recognized.
 
 =item priority
 
index 21398cc..9083b8d 100644 (file)
@@ -17,6 +17,7 @@ use List::MoreUtils qw(all);
 use List::Util qw(first);
 use POSIX;
 use SL::Auth;
+use SL::Dispatcher::AuthHandler;
 use SL::LXDebug;
 use SL::LxOfficeConf;
 use SL::Locale;
@@ -37,6 +38,7 @@ sub new {
 
   my $self           = bless {}, $class;
   $self->{interface} = lc($interface || 'cgi');
+  $self->{auth_handler} = SL::Dispatcher::AuthHandler->new;
 
   return $self;
 }
@@ -54,7 +56,7 @@ sub pre_request_checks {
       ::run();
       ::end_of_request();
     } else {
-      show_error('login/auth_db_unreachable');
+      show_error('login_screen/auth_db_unreachable');
     }
   }
 }
@@ -63,14 +65,15 @@ sub show_error {
   $::lxdebug->enter_sub;
   my $template             = shift;
   my $error_type           = shift || '';
+  my %params               = @_;
 
-  $::locale                = Locale->new($::lx_office_conf{system}->{language});
+  $::myconfig{countrycode} = delete($params{countrycode}) || $::lx_office_conf{system}->{language};
+  $::locale                = Locale->new($::myconfig{countrycode});
   $::form->{error}         = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session');
-  $::form->{error}         = $::locale->text('Incorrect password!.')                   if ($error_type eq 'password');
-  $::myconfig{countrycode} = $::lx_office_conf{system}->{language};
+  $::form->{error}         = $::locale->text('Incorrect password!')                    if ($error_type eq 'password');
 
   $::form->header;
-  print $::form->parse_html_template($template);
+  print $::form->parse_html_template($template, \%params);
   $::lxdebug->leave_sub;
 
   ::end_of_request();
@@ -143,10 +146,11 @@ sub require_main_code {
 sub _require_controller {
   my $controller =  shift;
   $controller    =~ s|[^A-Za-z0-9_]||g;
+  $controller    =  "SL/Controller/${controller}";
 
   eval {
     package main;
-    require "SL/Controller/${controller}.pm";
+    require "${controller}.pm";
   } or die $EVAL_ERROR;
 }
 
@@ -163,8 +167,6 @@ sub handle_request {
 
   my ($script, $path, $suffix, $script_name, $action, $routing_type);
 
-  $script_name = $ENV{SCRIPT_NAME};
-
   $self->unrequire_bin_mozilla;
 
   $::locale        = Locale->new($::lx_office_conf{system}->{language});
@@ -177,7 +179,7 @@ sub handle_request {
 
   $::form->read_cgi_input;
 
-  eval { ($routing_type, $script_name, $action) = _route_request($script_name); 1; } or return;
+  eval { ($routing_type, $script_name, $action) = _route_request($ENV{SCRIPT_NAME}); 1; } or return;
 
   if ($routing_type eq 'old') {
     $::form->{action}  =  lc $::form->{action};
@@ -198,30 +200,35 @@ sub handle_request {
 
     $::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin';
 
-    if ($script eq 'login' or $script eq 'admin') {
-      $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}";
-      ::run($session_result);
-
-    } else {
-      show_error('login/password_error', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
-
-      my $login = $::auth->get_session_value('login');
-      show_error('login/password_error', 'password') if not defined $login;
+    # For compatibility with a lot of database upgrade scripts etc:
+    # Re-write request to old 'login.pl?action=login' to new
+    # 'LoginScreen' controller. Make sure to load its code!
+    if (($script eq 'login') && ($action eq 'login')) {
+      ($routing_type, $script, $script_name, $action) = qw(controller controller LoginScreen login);
+      _require_controller('LoginScreen');
+    }
 
-      %::myconfig = $::auth->read_user(login => $login);
+    if (($script eq 'login') && !$action) {
+      print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login');
 
-      show_error('login/password_error', 'password') unless $::myconfig{login};
+    } elsif ($script eq 'admin') {
+      $::form->{titlebar} = "kivitendo " . $::locale->text('Version') . " $::form->{version}";
+      ::run($session_result);
 
-      $::locale = Locale->new($::myconfig{countrycode});
+    } else {
+      show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
 
-      show_error('login/password_error', 'password') if SL::Auth::OK != $::auth->authenticate($login, undef);
+      my %auth_result = $self->{auth_handler}->handle(
+        routing_type => $routing_type,
+        script       => $script,
+        controller   => $script_name,
+        action       => $action,
+      );
 
-      $::auth->create_or_refresh_session;
-      $::auth->delete_session_value('FLASH');
-      delete $::form->{password};
+      delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars};
 
       if ($action) {
-        $::instance_conf->init;
+        $::instance_conf->init if $auth_result{auth_level} eq 'user';
 
         map { $::form->{$_} = $::myconfig{$_} } qw(charset)
           unless $action eq 'save' && $::form->{type} eq 'preferences';
@@ -375,9 +382,9 @@ sub _check_for_old_config_files {
   my @old_files = grep { -f "config/${_}" } qw(authentication.pl console.conf lx-erp.conf lx-erp-local.conf);
   return unless @old_files;
 
-  $::form->{title}      = $::locale->text('Old configuration files');
+  $::form->{title} = $::locale->text('Old configuration files');
   $::form->header;
-  print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files });
+  print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files });
 
   ::end_of_request();
 }
diff --git a/SL/Dispatcher/AuthHandler.pm b/SL/Dispatcher/AuthHandler.pm
new file mode 100644 (file)
index 0000000..22b2be4
--- /dev/null
@@ -0,0 +1,44 @@
+package SL::Dispatcher::AuthHandler;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+use SL::Dispatcher::AuthHandler::Admin;
+use SL::Dispatcher::AuthHandler::None;
+use SL::Dispatcher::AuthHandler::User;
+
+my %valid_auth_levels = map { ($_ => 1) } qw(user admin none);
+
+sub handle {
+  my ($self, %param) = @_;
+
+  my $auth_level                       = $self->get_auth_level(%param);
+  my $handler_name                     = "SL::Dispatcher::AuthHandler::" . ucfirst($auth_level);
+  $self->{handlers}                  ||= {};
+  $self->{handlers}->{$handler_name} ||= $handler_name->new;
+  $self->{handlers}->{$handler_name}->handle;
+
+  return (
+    auth_level     => $auth_level,
+    keep_auth_vars => $self->get_keep_auth_vars(%param),
+  );
+}
+
+sub get_auth_level {
+  my ($self, %param) = @_;
+
+  my $auth_level = $param{routing_type} eq 'old'        ? ($param{script} eq 'admin' ? 'admin' : 'user')
+                 : $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->get_auth_level($param{action})
+                 :                                        'user';
+
+  return $valid_auth_levels{$auth_level} ? $auth_level : 'user';
+}
+
+sub get_keep_auth_vars {
+  my ($self, %param) = @_;
+
+  return $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->keep_auth_vars_in_form : 0;
+}
+
+1;
diff --git a/SL/Dispatcher/AuthHandler/Admin.pm b/SL/Dispatcher/AuthHandler/Admin.pm
new file mode 100644 (file)
index 0000000..77202e8
--- /dev/null
@@ -0,0 +1,18 @@
+package SL::Dispatcher::AuthHandler::Admin;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+sub handle {
+  %::myconfig = ();
+
+  return if  $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'})            == $::auth->OK());
+  return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK());
+
+  $::auth->punish_wrong_login;
+  $::auth->delete_session_value('admin_password');
+  SL::Dispatcher::show_error('admin/adminlogin', 'password');
+}
+
+1;
diff --git a/SL/Dispatcher/AuthHandler/None.pm b/SL/Dispatcher/AuthHandler/None.pm
new file mode 100644 (file)
index 0000000..0ce88a6
--- /dev/null
@@ -0,0 +1,11 @@
+package SL::Dispatcher::AuthHandler::None;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+sub handle {
+  %::myconfig = ();
+}
+
+1;
diff --git a/SL/Dispatcher/AuthHandler/User.pm b/SL/Dispatcher/AuthHandler/User.pm
new file mode 100644 (file)
index 0000000..150245c
--- /dev/null
@@ -0,0 +1,37 @@
+package SL::Dispatcher::AuthHandler::User;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+sub handle {
+  my ($self, %param) = @_;
+
+  my $login = $::form->{'{AUTH}login'} || $::auth->get_session_value('login');
+  $self->_error(%param) if !defined $login;
+
+  %::myconfig = $::auth->read_user(login => $login);
+
+  $self->_error(%param) unless $::myconfig{login};
+
+  $::locale = Locale->new($::myconfig{countrycode});
+
+  my $ok   =  $::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, $::form->{'{AUTH}password'}));
+  $ok    ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, undef));
+
+  $self->_error(%param) if !$ok;
+
+  $::auth->create_or_refresh_session;
+  $::auth->delete_session_value('FLASH');
+
+  return %::myconfig;
+}
+
+sub _error {
+  my $self = shift;
+
+  $::auth->punish_wrong_login;
+  SL::Dispatcher::show_error('login_screen/user_login', 'password', @_);
+}
+
+1;
index 23fe978..4409505 100755 (executable)
@@ -95,13 +95,14 @@ sub run {
   $form->{favicon}    = "favicon.ico";
 
   if ($form->{action}) {
-    if ($auth->authenticate_root($form->{rpw}) != $auth->OK()) {
+    if ($auth->authenticate_root($form->{'{AUTH}admin_password'}) != $auth->OK()) {
+      $auth->punish_wrong_login;
       $form->{error_message} = $locale->text('Incorrect Password!');
-      $auth->delete_session_value('rpw');
+      $auth->delete_session_value('admin_password');
       adminlogin();
     } else {
       if ($auth->session_tables_present()) {
-        delete $::form->{rpw};
+        delete $::form->{'{AUTH}admin_password'};
         _apply_dbupgrade_scripts();
       }
 
@@ -194,7 +195,7 @@ sub create_auth_tables {
   my $locale = $main::locale;
 
   $main::auth->create_tables();
-  $main::auth->set_session_value('rpw', $form->{rpw});
+  $main::auth->set_session_value('admin_password', $form->{'{AUTH}admin_password'});
   $main::auth->create_or_refresh_session();
 
   my $memberfile = $::lx_office_conf{paths}->{memberfile};
index 0bfd39c..e79b6af 100644 (file)
@@ -41,125 +41,6 @@ our $cgi;
 our $form;
 our $auth;
 
-sub run {
-  $::lxdebug->enter_sub;
-  my $session_result = shift;
-
-  $form   = $::form;
-  $auth   = $::auth;
-
-  $form->{stylesheet} = "lx-office-erp.css";
-  $form->{favicon}    = "favicon.ico";
-
-  if (SL::Auth::SESSION_EXPIRED == $session_result) {
-    $form->{error_message} = $::locale->text('The session is invalid or has expired.');
-    login_screen();
-    ::end_of_request();
-  }
-  my $action = $form->{action};
-  if (!$action && $auth->{SESSION}->{login}) {
-    $action = 'login';
-  }
-  if ($action) {
-    %::myconfig = $auth->read_user(login => $form->{login}) if ($form->{login});
-    $::locale   = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
-
-    if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{password})) {
-      $form->{error_message} = $::locale->text('Incorrect username or password!');
-      login_screen();
-    } else {
-      $auth->create_or_refresh_session();
-      delete $form->{password};
-
-      $form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}";
-      call_sub($::locale->findsub($action));
-    }
-  } else {
-    login_screen();
-  }
-
-  $::lxdebug->leave_sub;
-}
-
-sub login_screen {
-  $main::lxdebug->enter_sub();
-  my ($msg) = @_;
-
-  if (-f "css/lx-office-erp.css") {
-    $form->{stylesheet} = "lx-office-erp.css";
-  }
-
-  $form->{msg} = $msg;
-  $form->header();
-
-  print $form->parse_html_template('login/login_screen');
-
-  $main::lxdebug->leave_sub();
-}
-
-sub login {
-  $main::lxdebug->enter_sub();
-
-  unless ($form->{login}) {
-    login_screen($::locale->text('You did not enter a name!'));
-    ::end_of_request();
-  }
-
-  my $user = User->new(login => $form->{login});
-
-  # if we get an error back, bale out
-  my $result;
-  if (($result = $user->login($form)) <= -1) {
-    if ($result == -3) {
-      show_error('login/auth_db_needs_update');
-      $::auth->destroy_session;
-      ::end_of_request();
-    }
-
-    ::end_of_request() if $result == -2;
-    login_screen($::locale->text('Incorrect username or password!'));
-    ::end_of_request();
-  }
-
-  my %style_to_script_map = (
-    v3  => 'v3',
-    neu => 'new',
-    v4  => 'v4',
-  );
-
-  my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
-
-  # made it this far, execute the menu
-  # standard redirect does not seem to work for this invocation, (infinite loops?)
-  # do a manual invocation instead
-#  $form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display', "callback=" . $form->escape($form->{callback}));
-
-  $main::auth->set_cookie_environment_variable();
-
-  $::form->{script}   = "menu${menu_script}.pl";
-  $::form->{action}   = 'display';
-  $::form->{callback} = $::form->escape($::form->{callback});
-
-  require "bin/mozilla/$::form->{script}";
-  display();
-
-#  $form->redirect();
-
-  $main::lxdebug->leave_sub();
-}
-
-sub logout {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->destroy_session();
-
-  # remove the callback to display the message
-  $form->{callback} = "login.pl?action=";
-  $form->redirect($::locale->text('You are logged out!'));
-
-  $main::lxdebug->leave_sub();
-}
-
 sub company_logo {
   $main::lxdebug->enter_sub();
 
@@ -178,22 +59,6 @@ sub company_logo {
   $main::lxdebug->leave_sub();
 }
 
-sub show_error {
-  my $template           = shift;
-  my %myconfig           = %main::myconfig;
-  $myconfig{countrycode} = $::lx_office_conf{system}->{language};
-  $form->{stylesheet}    = 'css/lx-office-erp.css';
-
-  $form->header();
-  print $form->parse_html_template($template);
-
-  # $form->parse_html_template('login/auth_db_unreachable');
-  # $form->parse_html_template('login/auth_db_needs_update');
-  # $form->parse_html_template('login/authentication_pl_missing');
-
-  ::end_of_request();
-}
-
 1;
 
 __END__
index 5463721..202f75c 100644 (file)
@@ -79,7 +79,7 @@ sub clock_line {
 
   my $login = "[Nutzer "
     . $form->{login}
-    . " - <a href=\"login.pl?action=logout\" target=\"_top\">"
+    . " - <a href=\"controller.pl?action=LoginScreen/logout\" target=\"_top\">"
     . $::locale->text('Logout')
     . "</a>] ";
   my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
index 992a60d..7b159f7 100644 (file)
 \r
 .DHTMLSuite_menuItem_textContent\r
 {\r
-  border-bottom-style: none !important;\r
-  background-color: inherit !important;\r
   color: inherit !important;\r
 }\r
index 27b0f6a..d785dd2 100644 (file)
@@ -1,8 +1,8 @@
 <html>
  <head>
-  <meta http-equiv="refresh" content="0;URL=login.pl">
+  <meta http-equiv="refresh" content="0;URL=controller.pl?action=LoginScreen/user_login">
  </head>
  <body>
-  <a href="login.pl">Lx-Office-Login</a>
+  <a href="controller.pl?action=LoginScreen/user_login">kivitendo-Login</a>
  </body>
 </html>
index 077f23e..394de32 100644 (file)
@@ -969,7 +969,6 @@ $self->{texts} = {
   'Incoming Payments'           => 'Zahlungseingänge',
   'Incoming invoice number'     => 'Eingangsrechnungsnummer',
   'Incorrect Password!'         => 'Ungültiges Passwort!',
-  'Incorrect password!.'        => 'Ungültiges Passwort!.',
   'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
   'Increase'                    => 'Erhöhen',
   'Individual Items'            => 'Einzelteile',
@@ -1676,6 +1675,8 @@ $self->{texts} = {
   'Single quotes'               => 'Einfache Anführungszeichen',
   'Single values in item mode, cumulated values in invoice mode' => 'Einzelwerte im Artikelmodus, kumulierte Werte im Rechnungsmodus',
   'Skip'                        => 'Ãœberspringen',
+  'Skip entry'                  => 'Eintrag Ã¼berspringen',
+  'Skipping due to existing entry in database' => 'Ãœbersprungen, wegen existierender Artikelnummer',
   'Skonto'                      => 'Skonto',
   'Skonto Terms'                => 'Zahlungsziel Skonto',
   'Sold'                        => 'Verkauft',
index 8d090b8..eb83e18 100644 (file)
@@ -954,7 +954,6 @@ $self->{texts} = {
   'Incoming Payments'           => 'Zahlungseingänge',
   'Incoming invoice number'     => 'Eingangsrechnungsnummer',
   'Incorrect Password!'         => 'Passwort falsch!',
-  'Incorrect password!.'        => 'Ungültiges Passwort!.',
   'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
   'Increase'                    => 'Erhöhen',
   'Individual Items'            => 'Einzelteile',
index ac8f9b9..587376b 100644 (file)
--- a/menu.ini
+++ b/menu.ini
@@ -823,6 +823,6 @@ action=company_logo
 no_todo_list=1
 
 [Program--Logout]
-module=login.pl
-action=logout
+module=controller.pl
+action=LoginScreen/logout
 target=_top
index c0e8890..1503dae 100644 (file)
@@ -107,8 +107,8 @@ function do_curl {
     -F 'settings.sellprice_adjustment_type=percent' \
     -F 'settings.sellprice_places=2' \
     -F 'settings.shoparticle_if_missing=0' \
-    -F "login=${login}" \
-    -F "password=${password}" \
+    -F "{AUTH}login=${login}" \
+    -F "{AUTH}password=${password}" \
     -F "file=@${file}" \
     ${url}
 }
index 1d81d0f..2aa769d 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE T8 %]
 [% USE HTML %]
+[%- USE L %]
 <body>
  <p><div class="listheading">[% title %]</div></p>
 
      <td>
       [% 'Period:' | $T8 %]
       [% 'from (time)' | $T8 %]
-      <input name="transdate_from" id="transdate_from" size="10">
-      <input type="button" name="transdate_from_trigger" id="transdate_from_trigger" value="?">
+      [% L.date_tag('transdate_from') %]
       [% 'to (time)' | $T8 %]
-      <input name="transdate_to" id="transdate_to" size="10">
-      <input type="button" name="transdate_to_trigger" id="transdate_to_trigger" value="?">
+      [% L.date_tag('transdate_to') %]
      </td>
     </tr>
    </table>
 
   <input type="hidden" name="action" value="analyze">
  </form>
-
- <script type="text/javascript">
-  <!--
-    Calendar.setup({ inputField : "transdate_from", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdate_from_trigger" });
-    Calendar.setup({ inputField : "transdate_to",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdate_to_trigger" });
-  //-->
- </script>
 </body>
 </html>
index 22e07fc..876cb4e 100644 (file)
@@ -10,8 +10,8 @@
 
   <h2>[% 'Administration' | $T8 %]</h2>
 
-  [% IF error_message %]
-  <p><span class="message_error_login">[% error_message %]</span></p>
+  [% IF error %]
+  <p><span class="message_error_login">[% error %]</span></p>
   [% END %]
 
   <form method="post" action="admin.pl">
@@ -19,7 +19,7 @@
    <table>
     <tr>
      <th>[% 'Password' | $T8 %]</th>
-     <td><input type="password" name="rpw" id="rpw"></td>
+     <td><input type="password" name="{AUTH}admin_password" id="rpw"></td>
      <td><input type="submit" class="submit" name="action" value="[% 'Login' | $T8 %]"></td>
     </tr>
     <input type="hidden" name="action" value="login">
@@ -29,7 +29,7 @@
 
   <p>[% 'kivitendo Homepage' | $T8 %]: <a href="http://kivitendo.de" target="_blank" title="[% 'kivitendo Homepage' | $T8 %]">http://kivitendo.de</a></p>
 
-  <p><a href="login.pl" target="_top">[%- LxERP.t8('Back to the login page') %]</a></p>
+  <p><a href="controller.pl?action=LoginScreen/user_login" target="_top">[%- LxERP.t8('Back to the login page') %]</a></p>
 
  </div>
 
index 17778c2..39883d1 100644 (file)
   </div>
  </form>
 
- <form method="post" action="login.pl">
+ <form method="post" action="controller.pl">
+  <input type="hidden" name="action" value="LoginScreen/login">
 
   <div class="listheading">[% 'User Login' | $T8 %]</div>
 
   <table border="0">
    <tr>
     <th align="right">[% 'Login Name' | $T8 %]</th>
-    <td><input class="login" name="login"></td>
+    <td><input class="login" name="{AUTH}login"></td>
     <td>&nbsp;</td>
    </tr>
    <tr>
     <th align="right">[% 'Password' | $T8 %]</th>
-    <td><input class="login" type="password" name="password"></td>
-    <td><input type="submit" name="action" value="[% 'Login' | $T8 %]"></td>
+    <td><input class="login" type="password" name="{AUTH}password"></td>
+    <td><input type="submit" value="[% 'Login' | $T8 %]"></td>
    </tr>
   </table>
 
index 37f722b..f97c4ec 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %]
 
    [%- FOREACH var = variables %]
 
      [%- ELSIF var.type == 'date' %]
      [% 'from (time)' | $T8 %]
-     <input name="[% filter_prefix %]cvar_[% HTML.escape(var.name) %]_from" id="cvar_[% HTML.escape(var.name) %]_from" size="12">
-     <input type="button" name="cvar_[% HTML.escape(var.name) %]_from_button" id="cvar_[% HTML.escape(var.name) %]_from_trigger" value="?">
-     [% 'to (time)' | $T8 %]
-     <input name="[% filter_prefix %]cvar_[% HTML.escape(var.name) %]_to" id="cvar_[% HTML.escape(var.name) %]_to" size="12">
-     <input type="button" name="cvar_[% HTML.escape(var.name) %]_to_button" id="cvar_[% HTML.escape(var.name) %]_to_trigger" value="?">
+     [% L.date_tag(filter_prefix _'cvar_'_ HTML.escape(var.name) _'_from') %]
 
-     <script type="text/javascript">
-      <!--
-          Calendar.setup({ inputField : "cvar_[% HTML.escape(var.name) %]_from",
-                           ifFormat   :"[% myconfig_jsc_dateformat %]",
-                           align      : "BR",
-                           button     : "cvar_[% HTML.escape(var.name) %]_from_trigger" });
-          Calendar.setup({ inputField : "cvar_[% HTML.escape(var.name) %]_to",
-                           ifFormat   :"[% myconfig_jsc_dateformat %]",
-                           align      : "BR",
-                           button     : "cvar_[% HTML.escape(var.name) %]_to_trigger" });
-        -->
-     </script>
+     [% 'to (time)' | $T8 %]
+     [% L.date_tag(filter_prefix _'cvar_'_ HTML.escape(var.name) _'_to') %]
 
      [%- ELSIF var.type == 'number' %]
      <select name="[% filter_prefix %]cvar_[% HTML.escape(var.name) %]_qtyop">
index f9e497d..fb29079 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 <body>
 
  <form method=post name="search" action=[% script %]>
      <tr>
       <th align=right nowrap>[% 'From' | $T8 %]</th>
       <td>
-       <input name=transdatefrom id=transdatefrom size=11 title="dateformat | html %]" onBlur=\"check_right_date_format(this)\">
-       <input type=button name=transdatefrom id="trigger1" value=[% 'button' | $T8 %]>
+       [% L.date_tag('transdatefrom') %]
       </td>
      <th align=right>[% 'Bis' | $T8 %]</th>
      <td>
-      <input name=transdateto id=transdateto size=11 title="[% dateformat | html %]" onBlur=\"check_right_date_format(this)\">
-      <input type=button name=transdateto name=transdateto id="trigger2" value=[% 'button' | $T8 %]>
+      [% L.date_tag('transdateto') %]
      </td>
     </tr>
    <input type=hidden name=sort value=transdate>
  </body>
  <script type="text/javascript">
  <!--
-   Calendar.setup( { inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger1" });
-   Calendar.setup( { inputField : "transdateto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
    $(document).ready(function(){
     focus();
     setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
index d0f529d..5bfada3 100644 (file)
      <tr>
       <th align=right nowrap>[% 'From' | $T8 %]</th>
       <td>
-       <input name=transdatefrom id=transdatefrom size=11 title="[% dateformat | html %]" onBlur="check_right_date_format(this)">
-       <input type=button name=transdatefrom id="trigger1" value=[% 'button' | $T8 %]>
+       [% L.date_tag('transdatefrom') %]
       </td>
      <th align=right>[% 'Bis' | $T8 %]</th>
      <td>
-      <input name=transdateto id=transdateto size=11 title="[% dateformat | html %]" onBlur="check_right_date_format(this)">
-      <input type=button name=transdateto name=transdateto id="trigger2" value=[% 'button' | $T8 %]>
+      [% L.date_tag('transdateto') %]
      </td>
     </tr>
    <input type=hidden name=sort value=transdate>
   </form>
  <script type="text/javascript">
  <!--
-   Calendar.setup( { inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger1" });
-   Calendar.setup( { inputField : "transdateto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
    $(document).ready(function(){
     $('customer').focus();
     setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
index bacb711..cc8074d 100644 (file)
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %]<style type="text/css">@import url(js/jscalendar/calendar-win2k-1.css);</style>
 <script type="text/javascript" src="js/jscalendar/calendar.js"></script>
 <script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>
 <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>
 
+<h1>[% 'history search engine' | $T8 %]</h1>
+
 <form method="post" action="am.pl">
 
 <input type="hidden" name="action" value="show_am_history">
 
-  <table>
-    <tr>
-      <th class ="listtop">[% 'history search engine' | $T8 %]</th>
-      </th>
-    </tr>
-    <tr>
-      <td>
-        <script type="text/javascript">
-          <!--
-                    function uncheckOther(id) {
-            if(!(
-                (document.getElementById('non-deleted').checked == false)
-                &&
-                (document.getElementById('both').checked == false)
-                &&
-                (document.getElementById('deleted').checked == false)
-              )) {
-                if(id == "deleted") {
-                  document.getElementById('non-deleted').checked = false;
-                  document.getElementById('both').checked = false;
-                }
-                if(id == "non-deleted") {
-                  document.getElementById('deleted').checked = false;
-                  document.getElementById('both').checked = false;
-                }
-                if(id == "both") {
-                  document.getElementById('non-deleted').checked = false;
-                  document.getElementById('deleted').checked = false;
-                }
-            }
-          }
-
-          var defaults = new Array('SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED', 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED');
-          var translated = new Object();
-          translated['SAVED'] = '[% 'SAVED' | $T8 %]';
-          translated['DELETED'] = '[% 'DELETED' | $T8 %]';
-          translated['ADDED'] = '[% 'ADDED' | $T8 %]';
-          translated['PAYMENT POSTED'] = '[% 'PAYMENT POSTED' | $T8 %]';
-          translated['POSTED'] = '[% 'POSTED' | $T8 %]';
-          translated['POSTED AS NEW'] = '[% 'POSTED AS NEW' | $T8 %]'
-          translated['SAVED FOR DUNNING'] = '[% 'SAVED FOR DUNNING' | $T8 %]';
-          translated['DUNNING STARTED'] = '[% 'DUNNING STARTED' | $T8 %]';
-          translated['PRINTED'] = '[% 'PRINTED' | $T8 %]';
-
-          var jscalender = "<table valign=\"top\">"
-                  + "<tr><td colspan=\"2\"><b>[% 'Period' | $T8 %]:&nbsp;</b></td></tr>"
-                  + "<tr><td>[% 'from (time)' | $T8 %]:&nbsp;"
-                  + "<input name=\"fromdate\" id=\"fromdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(fromdate) %]\">"
-                  + "<input type=\"button\" name=\"fromdate\" id=\"trigger1\" value=\"?\">"
-                  + "&nbsp;</td><td>[% 'to (time)' | $T8 %]:&nbsp;"
-                  + "<input name=\"todate\" id=\"todate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(todate) %]\">"
-                  + "<input type=\"button\" name=\"todate\" id=\"trigger2\" value=\"?\"></td></tr></table>";
-          var mitarbeiter = "<table valign=\"top\">"
-                  + "<tr><td><b>Mitarbeiter:</b>&nbsp;</td>"
-                  + "<td><input type='text' name='mitarbeiter' id='mitarbeiter'></td>"
-                  + "</tr></table>";
-
-          var tempString = "";
-          function addForm(last, remove) {
-            if(last == "INIT") {
-              tempString = "<select id='selectForm'><option></option>";
-              for(i=0;i<defaults.length;i++) {
-                tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n";
-              }
-              tempString += "</select>";
-              document.getElementById('selectEmployee').innerHTML = mitarbeiter;
-              document.getElementById('selectDate').innerHTML = jscalender;
-              document.getElementById('selectTable').innerHTML = tempString;
-
-              Calendar.setup(
-                    {
-                          inputField : "fromdate",
-                          ifFormat :"%d.%m.%Y",
-                          align : "BL",
-                          button : "trigger1"
-                      });
-
-                    Calendar.setup(
-                    {
-                          inputField : "todate",
-                          ifFormat :"%d.%m.%Y",
-                          align : "BL",
-                          button : "trigger2"
-                    });
-            }
-            else {
-              defaults.splice(remove,1);
-              document.getElementById('inputText').innerHTML += ((document.getElementById('inputText').innerHTML == "") ? ("<b>[%- 'You\'ve already chosen the following limitations:' | $T8 %]</b><br>") : ("<br>")) + translated[last];
-              if(defaults.length > 0) {
-                document.getElementById('einschraenkungen').value += ((document.getElementById('einschraenkungen').value == "") ? ("") : (",")) + last;
-                tempString = "<select id='selectForm'><option></option>";
-                for(i=0;i<defaults.length;i++) {
-                  tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n";
-                }
-                tempString += "</select>";
-                document.getElementById('selectTable').innerHTML = tempString;
-              }
-              else {
-                document.getElementById('selectTable').innerHTML = "";
-              }
-            }
-          }
-
-          function resetAll() {
-            document.getElementById('selectTable').innerHTML = "<a href=\"javascript:addForm('INIT')\">[% 'Yes' | $T8 %]";
-            document.getElementById('inputText').innerHTML = "";
-          }
-          //-->
-        </script>
-        <table>
-          <tr>
-            <td>
-              [% '<b>What</b> do you want to look for?' | $T8 %]:
-            </td>
-            <td>
-              <select name="what2search" id="what2search">
-                <option name="Artikelnummer" value="Artikelnummer" id="Artikelnummer">[% 'Part Number' | $T8 %]</option>
-                <option name="Kundennummer" value="Kundennummer" id="Kundennummer">[% 'Customer Number' | $T8 %]</option>
-                <option name="Lieferantennummer" value="Lieferantennummer" id="Lieferantennummer">[% 'Vendor Number' | $T8 %]</option>
-                <option name="Projektnummer" value="Projektnummer" id="Projektnummer">[% 'Project Number' | $T8 %]</option>
-                <option name="Buchungsnummer" value="Buchungsnummer" id="Buchungsnummer">[% 'ID' | $T8 %]</option>
-                <option name="Eingangsrechnungnummer" value="Eingangsrechnungnummer" id="Eingangsrechnungnummer">[% 'Incoming invoice number' | $T8 %]</option>
-                <option name="Ausgangsrechnungnummer" value="Ausgangsrechnungnummer" id="Ausgangsrechnungnummer">[% 'Sales invoice number' | $T8 %]</option>
-                <option name="Mahnungsnummer" value="Mahnungsnummer" id="Mahnungsnummer">[% 'Dunning number' | $T8 %]</option>
+<table>
+  <tr>
+    <td>[% '<b>What</b> do you want to look for?' | $T8 %]:</td>
+    <td>
+      <select name="what2search" id="what2search">
+        <option name="Artikelnummer" value="Artikelnummer" id="Artikelnummer">[% 'Part Number' | $T8 %]</option>
+        <option name="Kundennummer" value="Kundennummer" id="Kundennummer">[% 'Customer Number' | $T8 %]</option>
+        <option name="Lieferantennummer" value="Lieferantennummer" id="Lieferantennummer">[% 'Vendor Number' | $T8 %]</option>
+        <option name="Projektnummer" value="Projektnummer" id="Projektnummer">[% 'Project Number' | $T8 %]</option>
+        <option name="Buchungsnummer" value="Buchungsnummer" id="Buchungsnummer">[% 'ID' | $T8 %]</option>
+        <option name="Eingangsrechnungnummer" value="Eingangsrechnungnummer" id="Eingangsrechnungnummer">[% 'Incoming invoice number' | $T8 %]</option>
+        <option name="Ausgangsrechnungnummer" value="Ausgangsrechnungnummer" id="Ausgangsrechnungnummer">[% 'Sales invoice number' | $T8 %]</option>
+        <option name="Mahnungsnummer" value="Mahnungsnummer" id="Mahnungsnummer">[% 'Dunning number' | $T8 %]</option>
+      </select>
+    </td>
+  </tr>
+  <tr>
+    <td>[% 'What <b>term</b> you are looking for?' | $T8 %]</td>
+    <td><input type="text" name="searchid" id="searchid" value="[% searchid  | html %]"></td>
+  </tr>
+  <tr>
+    <td valign="top">[% 'Do you want to <b>limit</b> your search?' | $T8 %]</td>
+    <td>
+      <table>
+        <tr>
+          <td>
+            <div id="initForm">
+              <a id='show_extended_options' href='#'>[% 'Yes' | $T8 %]</a>
+            </div>
+            <div id="selectTable" style="display:none;">
+              <select id='selectForm'>
               </select>
-            </td>
-          </tr>
-          <tr>
-            <td>
-             [% 'What <b>term</b> you are looking for?' | $T8 %]
-            </td>
-            <td>
-              <input type="text" name="searchid" id="searchid" value="[% HTML.escape(searchid) %]">
-            </td>
-          </tr>
-          <tr>
-            <td valign="top">
-             [% 'Do you want to <b>limit</b> your search?' | $T8 %]
-            </td>
-            <td>
-              <table valign="top" cellpadding="0" marginheight="0" marginwidth="0" cellspacing="0" topmargin="0" leftmargin="0">
-                <tr>
-                  <td>
-                    <div id="selectTable"><a href="javascript:addForm('INIT')">[% 'Yes' | $T8 %]</a></div>
-                    <div id="inputText"></div>
-                  </td>
-                </tr>
-                <tr>
-                  <td>
-                    <div id="selectEmployee"></div>
-                  </td>
-                </tr>
-                <tr>
-                  <td>
-                    <div id="selectDate"></div>
-                  </td>
-                </tr>
-              </table>
-              <input type="hidden" name="einschraenkungen" id="einschraenkungen" value="">
-            </td>
-          </tr>
-          </tr>
-          <tr>
-            <td colspan="6">
-              <input type="submit" class="submit" value="[% 'submit' | $T8 %]">
-              <input type="reset" class="submit" value="[% 'reset' | $T8 %]" onClick="javascript:resetAll();">
-            </td>
-            <td>
-            </td>
-          </tr>
-        </table>
-      </td>
-    </tr>
-  </table>
+            </div>
+            <div id="inputHead" style="display:none;"><b>[% 'You\'ve already chosen the following limitations:' | $T8 %]</b></div>
+            <div id="inputText" style="display:none;"></div>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            <div id="selectEmployee" style="display:none;">
+              <b>Mitarbeiter:</b>&nbsp; <input type="text" name="mitarbeiter" id="mitarbeiter">
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            <div id="selectDate" style="display:none;">
+                  <b>[% 'Period' | $T8 %]:&nbsp;</b>
+                     [% 'from (time)' | $T8 %]:&nbsp; [% L.date_tag('fromdate', todate) %]
+                     [% 'to (time)' | $T8 %]:&nbsp; [% L.date_tag('todate', todate) %]
+            </div>
+          </td>
+        </tr>
+      </table>
+      <input type="hidden" name="einschraenkungen" id="einschraenkungen" value="">
+    </td>
+  </tr>
+</table>
+
+<hr>
+<input type="submit" class="submit" value="[% 'submit' | $T8 %]">
+<input type="reset" class="submit" value="[% 'reset' | $T8 %]" id='reset_button'>
+
 </form>
+
+<script type="text/javascript">
+  <!--
+  var defaults = ['SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED', 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED'];
+  var available;
+  var selected;
+  var translated = {
+    'SAVED'             : '[% 'SAVED' | $T8 %]',
+    'DELETED'           : '[% 'DELETED' | $T8 %]',
+    'ADDED'             : '[% 'ADDED' | $T8 %]',
+    'PAYMENT POSTED'    : '[% 'PAYMENT POSTED' | $T8 %]',
+    'POSTED'            : '[% 'POSTED' | $T8 %]',
+    'POSTED AS NEW'     : '[% 'POSTED AS NEW' | $T8 %]',
+    'SAVED FOR DUNNING' : '[% 'SAVED FOR DUNNING' | $T8 %]',
+    'DUNNING STARTED'   : '[% 'DUNNING STARTED' | $T8 %]',
+    'PRINTED'           : '[% 'PRINTED' | $T8 %]',
+  };
+
+  function addForm(index) {
+    $('#inputHead').show();
+    selected.push(available.splice(index, 1));
+    $('#inputText').html($(selected).map(function(){ return translated[this]; }).get().join('<br>'));
+    $('#einschraenkungen').val(selected.join(','));
+
+    showForm();
+  }
+
+  function showForm() {
+    $('#selectForm').empty();
+    $('<option/>').appendTo('#selectForm');
+    $(available).map(function(){
+      $('<option/>').val(this).text(translated[this]).click(function(){ addForm(this) }).appendTo('#selectForm');
+    });
+  }
+
+  function resetAll() {
+    available = defaults.slice(0);
+    selected  = [];
+    initForm();
+
+    $('#inputForm').empty();
+    $('#inputText').html('');
+    $('#selectTable, #inputHead, #inputText, #selectEmployee, #selectDate').hide();
+    $('#initForm').show();
+  }
+
+  function initForm() {
+    showForm();
+
+    $('#selectTable, #inputText, #selectEmployee, #selectDate').show();
+    $('#initForm').hide();
+  }
+
+  $(function(){
+    resetAll();
+    $('#show_extended_options').click(initForm);
+    $('#reset_button').click(resetAll);
+  });
+  //-->
+</script>
+
+</body>
+</html>
index 4962981..0eea2d1 100644 (file)
@@ -3,7 +3,7 @@
 <tr>
  <th align="right">[%- LxERP.t8('Parts with existing part numbers') %]:</th>
  <td colspan="10">
-  [% opts = [ [ 'update_prices', LxERP.t8('Update prices of existing entries') ], [ 'insert_new', LxERP.t8('Insert with new part number') ] ] %]
+  [% opts = [ [ 'update_prices', LxERP.t8('Update prices of existing entries') ], [ 'insert_new', LxERP.t8('Insert with new part number') ], [ 'skip', LxERP.t8('Skip entry') ] ] %]
   [% L.select_tag('settings.article_number_policy', L.options_for_select(opts, default => SELF.profile.get('article_number_policy')), style => 'width: 300px') %]
  </td>
 </tr>
index 0291b80..cab0f8e 100644 (file)
 
  <script type="text/javascript">
   <!--
-      Calendar.setup({ inputField : "from",    ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_from" });
-      Calendar.setup({ inputField : "to",      ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
-      Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
-
       function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
       function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
 
index bdf22df..5e5480a 100644 (file)
      <tr>
       <th align="right" nowrap>[% 'From' | $T8 %]</th>
       <td>
-       <input id="from" name="from" size="10" maxlength="10" onChange="get_delivery(['shipto_id__' + delivery_id.value, 'from__' + this.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])" value="[% HTML.escape(from) %]">
-       <input type="button" name="fromB" id="trigger_from" value="?">
+        [% L.date_tag('from',
+                      from,
+                      onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
+        %]
       </td>
       <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
       <td>
-       <input id="to" name="to" size="10" maxlength="10" onChange="get_delivery(['shipto_id__' + delivery_id.value, 'from__' + from.value, 'to__' + this.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])" value="[% HTML.escape(to) %]">
-       <input type="button" name="toB" id="trigger_to" value="?">
+       [% L.date_tag('to',
+                      to,
+                      onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
+       %]
       </td>
      </tr>
 
       <tr>
        <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
        <td>
-        <input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12">
-        <input type="button" name="FU_date_button" id="FU_date_trigger" value="?">
+        [% L.date_tag('FU_date', FU_date) %]
         [% 'for' | $T8 %]
         [% L.select_tag('FU_created_for_user', L.options_for_select(ALL_EMPLOYEES, default=(FU_created_for_user ? FU_created_for_user : USER.id), title='safe_name')) %]
        </td>
index 9de5e9e..3a4ea59 100644 (file)
@@ -1,9 +1,9 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<form name="Form" method="post" action="login.pl">
+<form name="Form" method="post" action="controller.pl">
 
- <input type="hidden" name="action" value="login">
+ <input type="hidden" name="action" value="LoginScreen/login">
  <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
  <p class="message_hint">
   [% LxERP.t8('kivitendo is about to update the database [ #1 ].', dbname) | html %]
index 000811e..891ee38 100644 (file)
         [% IF onload %][% onload %];[% END %]
         setupDateFormat('[% myconfig_dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
         setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
-
-        [%- UNLESS delivered %]
-        Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdate_trigger" });
-        [%- END %]
       }
     -->
  </script>
@@ -47,7 +43,6 @@
  [%- SET is_customer = '0' %]
  [%- END %]
  [%- IF delivered %]
- [%- SET RO = ' readonly' %]
  [%- SET DISABLED = ' disabled' %]
  [%- END %]
 
        <tr>
         <th align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th>
         <td nowrap>
-         <input name="transdate" id="transdate" size="11" title="[% HTML.escape(myconfig_dateformat) %]" value="[% HTML.escape(transdate) %]"
-                onBlur="check_right_date_format(this)"[% RO %]>
-         [% UNLESS delivered %]<input type="button" name="b_transdate" id="transdate_trigger" value="?">[% END %]
+         [% L.date_tag('transdate', transdate, readonly => delivered) %]
         </td>
        </tr>
 
index b2ad170..7d750d0 100644 (file)
@@ -11,8 +11,6 @@
  <script type="text/javascript">
   <!--
       function on_load() {
-        Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdatefrom_trigger" });
-        Calendar.setup({ inputField : "transdateto",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdateto_trigger" });
         document.Form.donumber.focus();
       }
     -->
     <tr>
      <th align="right">[% 'From' | $T8 %]</th>
      <td>
-      <input name="transdatefrom" id="transdatefrom" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
-      <input type="button" name="transdatefrom_button" id="transdatefrom_trigger" value="?">
+      [% L.date_tag('transdatefrom') %]
      </td>
      <th align="right">[% 'Bis' | $T8 %]</th>
      <td>
-      <input name="transdateto" id="transdateto" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
-      <input type="button" name="transdateto_button" id="transdateto_trigger" value="?">
+      [% L.date_tag('transdateto') %]
      </td>
     </tr>
 
index 0d5ea68..57bfc93 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %][% USE LxERP %][% USE JavaScript %]<body[% UNLESS delivered %] onload="on_load();"[% END %]>
 
  [%- UNLESS delivered %]
      <td><input name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"></td>
      [% IF conf_show_best_before %]
      <td>
-       <input name="bestbefore_[% loop.count %]" id="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]" size="11" title="[% myconfig_dateformat %]">
-       <input type="button" name="b_bestbefore_[% loop.count %]" id="bestbefore_trigger_[% loop.count %]" value="?">
+       [% L.date_tag('bestbefore_'_ loop.count, row.bestbefore) %]
      </td>
      [% END %]
      <td><input name="qty_[% loop.count %]" size="12" value="[% HTML.escape(LxERP.format_amount(row.qty)) %]"></td>
    [%- END %]
   </p>
  </form>
-
- [%- IF NOT delivered %]
- [% IF conf_show_best_before %]
-  <script type="text/javascript">
-    <!--
-    [%- FOREACH row = STOCK_INFO %]
-    Calendar.setup( {
-      inputField : "bestbefore_[% loop.count %]",
-      ifFormat :"[% myconfig_jsc_dateformat %]",
-      align : "BR",
-      button : "bestbefore_trigger_[% loop.count %]"
-    });
-    [%- END %]
-    //-->
-  </script>
-  [% END %]
-  [%- END %]
-
 </body>
 </html>
 
index c95829c..2e6105a 100644 (file)
       <tr>
        <th align="right" nowrap>[% 'Invdate from' | $T8 %]</th>
        <td>
-        <input name="transdatefrom" id="transdatefrom" size="11" title="[% HTML.escape(myconfig_dateformat) %]" onBlur="check_right_date_format(this)">
-        <input type="button" name="transdatefrom" id="trigger1" value="?">
+         [% L.date_tag('transdatefrom') %]
        </td>
        <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
        <td>
-        <input name="transdateto" id="transdateto" size="11" title="[% HTML.escape(myconfig_dateformat) %]" onBlur="check_right_date_format(this)">
-        <input type="button" name="transdateto" id="trigger2" value="?">
+         [% L.date_tag('transdateto') %]
        </td>
       </tr>
 
       <tr>
        <th align="right" nowrap>[% 'Dunning Date from' | $T8 %]</th>
        <td>
-        <input name="dunningfrom" id="dunningfrom" size="11" title="[% HTML.escape(myconfig_dateformat) %]" onBlur="check_right_date_format(this)">
-        <input type="button" name="dunningfrom" id="trigger3" value="?">
+        [% L.date_tag('dunningfrom') %]
        </td>
        <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
        <td>
-        <input name="dunningto" id="dunningto" size="11" title="[% HTML.escape(myconfig_dateformat) %]" onBlur="check_right_date_format(this)">
-        <input type="button" name="dunningto" id="trigger4" value="?">
+        [% L.date_tag('dunningto') %]
        </td>
       </tr>
       <tr>
   <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
 
  </form>
-
- <script type="text/javascript">
-  <!--
-      Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger1" });
-      Calendar.setup({ inputField : "transdateto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger2" });
-      Calendar.setup({ inputField : "dunningfrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger3" });
-      Calendar.setup({ inputField : "dunningto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger4" });
-    -->
- </script>
-
 </body>
 
 </html>
index d32f3fc..4beb3d6 100644 (file)
@@ -1,10 +1,10 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %]<body onload="on_load();">
 
  <script type="text/javascript">
   <!--
       function on_load() {
-        Calendar.setup({ inputField : "follow_up_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "follow_up_date_trigger" });
         document.Form.subject.focus();
       }
     -->
@@ -41,8 +41,7 @@
     <tr>
      <td valign="right">[% 'Follow-Up Date' | $T8 %]</td>
      <td>
-      <input name="follow_up_date" id="follow_up_date" value="[% HTML.escape(follow_up_date) %]" size="12">
-      <input type="button" name="follow_up_date_button" id="follow_up_date_trigger" value="?">
+       [% L.date_tag('follow_up_date', follow_up_date) %]
     </tr>
 
     <tr>
index 63d8c0a..576bfdf 100644 (file)
@@ -1,14 +1,11 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %]
 <body onload="on_load()">
 
  <script type="text/javascript">
   <!--
       function on_load() {
-        Calendar.setup({ inputField : "follow_up_date_from", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "follow_up_date_from_trigger" });
-        Calendar.setup({ inputField : "follow_up_date_to",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "follow_up_date_to_trigger" });
-        Calendar.setup({ inputField : "itime_from",          ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "itime_from_trigger" });
-        Calendar.setup({ inputField : "itime_to",            ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "itime_to_trigger" });
         document.Form.subject.focus();
       }
     -->
      <td align="right">[% 'Follow-Up Date' | $T8 %]</td>
      <td>
       [% 'From' | $T8 %]
-      <input name="follow_up_date_from" id="follow_up_date_from" size="12">
-      <input type="button" name="follow_up_date_from_button" id="follow_up_date_from_trigger" value="?">
+      [% L.date_tag('follow_up_date_from') %]
       [% 'To (time)' | $T8 %]
-      <input name="follow_up_date_to" id="follow_up_date_to" size="12">
-      <input type="button" name="follow_up_date_to_button" id="follow_up_date_to_trigger" value="?">
+      [% L.date_tag('follow_up_date_to') %]
      </td>
     </tr>
 
      <td align="right">[% 'Created on' | $T8 %]</td>
      <td>
       [% 'From' | $T8 %]
-      <input name="itime_from" id="itime_from" size="12">
-      <input type="button" name="itime_from_button" id="itime_from_trigger" value="?">
+      [% L.date_tag('itime_from') %]
       [% 'To (time)' | $T8 %]
-      <input name="itime_to" id="itime_to" size="12">
-      <input type="button" name="itime_to_button" id="itime_to_trigger" value="?">
+      [% L.date_tag('itime_to') %]
      </td>
     </tr>
 
index 4d32924..be2528c 100644 (file)
@@ -1,6 +1,7 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
+[%- USE L %]
 <body>
 
  <form method="post" action="ic.pl">
            <table>
             <tr>
              <th>[% 'From' | $T8 %]</th>
-             <td><input name="transdatefrom" id="transdatefrom" size="11" title="[% HTML.escape(dateformat) %]"></td>
-             <td><input type="button" name="transdatefrom" id="trigger1" value="[% 'button' | $T8 %]"></td>
+             <td>[% L.date_tag('transdatefrom') %]</td>
              <th>[% 'To (time)' | $T8 %]</th>
-             <td><input name="transdateto" id="transdateto" size="11" title="[% HTML.escape(dateformat) %]"></td>
-             <td><input type="button" name="transdateto" name="transdateto" id="trigger2" value="[% 'button' | $T8 %]"></td>
+             <td>[% L.date_tag('transdateto') %]</td>
             </tr>
            </table>
           </td>
    <tr><td colspan="4"><hr size="3" noshade></td></tr>
   </table>
 
-  <script type="text/javascript">
-   <!--
-       Calendar.setup({ inputField : "transdatefrom",  ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
-       Calendar.setup({ inputField : "transdateto",    ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
-       //-->
-  </script>
-
   <p>
    <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
    <input class="submit" type="submit" name="action" value="[% 'TOP100' | $T8 %]">
index 51a1fdd..1677219 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
+[%- USE L %]
   <tr>
    <td>
     <table width="100%">
@@ -42,8 +43,7 @@
 
     <td align="center">
     [% IF $changeable %]
-      <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="[% dateformat %]" value="[% $datepaid %]">
-      <input type="button" name="datepaid_[% i %]" id="trigger_datepaid_[% i %]" value="?">
+      [% L.date_tag('datepaid_'_ i, $datepaid) %]
     [% ELSE %]
       <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
     [% END %]
     </tr>
   [% IF $changeable %]
     <script type='text/javascript'>
-     Calendar.setup({ inputField : "datepaid_[% i %]", ifFormat :"[% myconfig_jsc_dateformat %]", align : "TR", button : "trigger_datepaid_[% i %]" });
      $('input[name="paid_[% i %]"]').blur(function(){ check_right_number_format(this) });
      $('#datepaid_[% i %]').blur(function(){ check_right_date_format(this) });
     </script>
index 01413ab..a872215 100644 (file)
@@ -1,4 +1,6 @@
-[%- USE LxERP %][% USE T8 %]
+[%- USE LxERP %]
+[%- USE T8 %]
+[%- USE L %]
   <tr>
    <td>
     <table width="100%">
@@ -43,8 +45,7 @@
      <tr>
      <td align="center">
      [% IF $changeable %]
-       <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="[% dateformat %]" value="[% $datepaid %]">
-       <input type="button" name="datepaid_[% i %]" id="trigger_datepaid_[% i %]" value="?">
+       [% L.date_tag('datepaid_'_ i, $datepaid) %]
      [% ELSE %]
        <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]"> [% $datepaid %]
      [% END %]
     <tr style='display:none'>
      <td>
     <script type='text/javascript'>
-     Calendar.setup({ inputField : "datepaid_[% i %]", ifFormat :"[% myconfig_jsc_dateformat %]", align : "TR", button : "trigger_datepaid_[% i %]" });
      $('input[name="paid_[% i %]"]').blur(function(){ check_right_number_format(this) });
      $('#datepaid_[% i %]').blur(function(){ check_right_date_format(this) });
     </script>
diff --git a/templates/webpages/login/auth_db_needs_update.html b/templates/webpages/login/auth_db_needs_update.html
deleted file mode 100644 (file)
index fb01cbf..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-[%- USE LxERP %]
-<body>
-
- <p><b>[% LxERP.t8('Error!') %]</b></p>
-
- <p>
-  [% LxERP.t8('Kivitendo needs to update the authentication database before you can proceed.') %]
-  [% LxERP.t8('Please log in to the administration panel.') %]
-  [% LxERP.t8('Kivitendo will then update the database automatically.') %]
- </p>
-
- <hr>
- <p>
-  [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Kivitendo Installation</a><br>
-  [% LxERP.t8('Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ') %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a>
- </p>
-
- <hr>
-
- <p>
-  <a href="login.pl" target="_top">[% LxERP.t8('Login') %]</a> |
-  <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
- </p>
-
-</body>
-</html>
diff --git a/templates/webpages/login/auth_db_unreachable.html b/templates/webpages/login/auth_db_unreachable.html
deleted file mode 100644 (file)
index 5ca592b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <p>[%- 'The authentication database is not reachable at the moment. Either it hasn\'t been set up yet or the database server might be down. Please contact your administrator.' | $T8 %]</p>
-
- <p>[% 'If you want to set up the authentication database yourself then log in to the administration panel. kivitendo will then create the database and tables for you.' | $T8 %]</p>
- <hr>
- <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">kivitendo Installation</a><br>
- [% 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' | $T8 %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a></p>
-
- <hr>
-
- <p>
-  <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
-  <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
- </p>
-
-</body>
-</html>
diff --git a/templates/webpages/login/authentication_pl_missing.html b/templates/webpages/login/authentication_pl_missing.html
deleted file mode 100644 (file)
index 8f158cf..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <p>[% 'The authentication configuration file &quot;config/lx_office.conf&quot; does not exist. This kivitendo installation has probably not been updated correctly yet. Please contact your administrator.' | $T8 %]</p>
-
- <p>[% 'If you yourself want to upgrade the installation then please read the file &quot;doc/UPGRADE&quot; and follow the steps outlined in this file.' | $T8 %]</p>
-
- <p>
-  <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
-  <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
- </p>
-
-</body>
-</html>
diff --git a/templates/webpages/login/login_screen.html b/templates/webpages/login/login_screen.html
deleted file mode 100644 (file)
index e0bdb87..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-[%- USE T8 %]
-[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
-
- <center>
-  <table class="login" border="3" cellpadding="20">
-   <tr>
-    <td class="login" align="center">
-     <a href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0"></a>
-     <h3 class="login" align="center">[% 'kivitendo' | $T8 %] [% version %]</h3>
-
-     [% IF error_message %]
-     <p><span class="message_error_login">[% error_message %]</span></p>
-     [% END %]
-
-     <p>
-
-      <form method="post" name="loginscreen" action="login.pl" target="_top">
-
-       <input type="hidden" name="show_dbupdate_warning" value="1">
-
-       <table width="100%">
-        <tr>
-         <td align="center">
-          <table>
-           <tr>
-            <th align="right">[% 'Login Name' | $T8 %]</th>
-            <td><input class="login" name="login" size="30" tabindex="1"></td>
-           </tr>
-           <tr>
-            <th align="right">[% 'Password' | $T8 %]</th>
-            <td><input class="login" type="password" name="password" size="30" tabindex="2"></td>
-           </tr>
-          </table>
-
-          <br>
-          <input type="hidden" name="action" value="login">
-          <input type="submit" value="[% 'Login' | $T8 %]" tabindex="3">
-
-         </td>
-        </tr>
-       </table>
-
-      </form>
-
-    </td>
-   </tr>
-  </table>
-
-</body>
-</html>
diff --git a/templates/webpages/login/old_configuration_files.html b/templates/webpages/login/old_configuration_files.html
deleted file mode 100644 (file)
index a7f80a4..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-[% USE LxERP %][% USE HTML %]
-<body>
- <div class="listtop">[% title %]</div>
-
- <p>
-  [%- LxERP.t8('Starting with version 2.6.3 the configuration files in "config" have been consolidated.') %]
-  [%- LxERP.t8('The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:') %]
- </p>
-
- <ul>
-  [%- FOREACH file = FILES %]
-   <li><code>config/[%- HTML.escape(file) %]</code></li>
-  [%- END %]
- </ul>
-
- <p>
-  [%- LxERP.t8('Due to security concerns these files have to be deleted or moved after the migration before you can continue using kivitendo.') %]
- </p>
-
- <p>
-  [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
- </p>
-  <p>
-
-  [%- LxERP.t8('Which is located at doc/Kivitendo-Dokumentation.pdf. Click here: ') %] <a href ="doc/Kivitendo-Dokumentation.pdf">doc/Kivitendo-Dokumentation.pdf</a>
-</p>
-
- <p>
-  <a href="login.pl">[%- LxERP.t8('Back to login') %]</a>
- </p>
-</body>
-</html>
diff --git a/templates/webpages/login/password_error.html b/templates/webpages/login/password_error.html
deleted file mode 100644 (file)
index e1060a0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <p>[% error %]</p>
-
- <p><a href="login.pl" target="_top">[% 'Login' | $T8 %]</a></p>
-
-</body>
-</html>
diff --git a/templates/webpages/login_screen/auth_db_needs_update.html b/templates/webpages/login_screen/auth_db_needs_update.html
new file mode 100644 (file)
index 0000000..a15da6b
--- /dev/null
@@ -0,0 +1,26 @@
+[%- USE LxERP %]
+<body>
+
+ <p><b>[% LxERP.t8('Error!') %]</b></p>
+
+ <p>
+  [% LxERP.t8('Kivitendo needs to update the authentication database before you can proceed.') %]
+  [% LxERP.t8('Please log in to the administration panel.') %]
+  [% LxERP.t8('Kivitendo will then update the database automatically.') %]
+ </p>
+
+ <hr>
+ <p>
+  [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Kivitendo Installation</a><br>
+  [% LxERP.t8('Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ') %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a>
+ </p>
+
+ <hr>
+
+ <p>
+  <a href="controller.pl?action=show" target="_top">[% LxERP.t8('Login') %]</a> |
+  <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
+ </p>
+
+</body>
+</html>
diff --git a/templates/webpages/login_screen/auth_db_unreachable.html b/templates/webpages/login_screen/auth_db_unreachable.html
new file mode 100644 (file)
index 0000000..c756e5c
--- /dev/null
@@ -0,0 +1,21 @@
+[%- USE T8 %]
+<body>
+
+ <p><b>[% 'Error!' | $T8 %]</b></p>
+
+ <p>[%- 'The authentication database is not reachable at the moment. Either it hasn\'t been set up yet or the database server might be down. Please contact your administrator.' | $T8 %]</p>
+
+ <p>[% 'If you want to set up the authentication database yourself then log in to the administration panel. kivitendo will then create the database and tables for you.' | $T8 %]</p>
+ <hr>
+ <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">kivitendo Installation</a><br>
+ [% 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' | $T8 %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a></p>
+
+ <hr>
+
+ <p>
+  <a href="controller.pl?action=LoginScreen/user_login" target="_top">[% 'Login' | $T8 %]</a> |
+  <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
+ </p>
+
+</body>
+</html>
diff --git a/templates/webpages/login_screen/old_configuration_files.html b/templates/webpages/login_screen/old_configuration_files.html
new file mode 100644 (file)
index 0000000..e477a42
--- /dev/null
@@ -0,0 +1,32 @@
+[% USE LxERP %][% USE HTML %]
+<body>
+ <div class="listtop">[% title %]</div>
+
+ <p>
+  [%- LxERP.t8('Starting with version 2.6.3 the configuration files in "config" have been consolidated.') %]
+  [%- LxERP.t8('The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:') %]
+ </p>
+
+ <ul>
+  [%- FOREACH file = FILES %]
+   <li><code>config/[%- HTML.escape(file) %]</code></li>
+  [%- END %]
+ </ul>
+
+ <p>
+  [%- LxERP.t8('Due to security concerns these files have to be deleted or moved after the migration before you can continue using kivitendo.') %]
+ </p>
+
+ <p>
+  [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
+ </p>
+  <p>
+
+  [%- LxERP.t8('Which is located at doc/Kivitendo-Dokumentation.pdf. Click here: ') %] <a href ="doc/Kivitendo-Dokumentation.pdf">doc/Kivitendo-Dokumentation.pdf</a>
+</p>
+
+ <p>
+  <a href="controller.pl?action=LoginScreen/user_login">[%- LxERP.t8('Back to login') %]</a>
+ </p>
+</body>
+</html>
diff --git a/templates/webpages/login_screen/user_login.html b/templates/webpages/login_screen/user_login.html
new file mode 100644 (file)
index 0000000..877cc18
--- /dev/null
@@ -0,0 +1,50 @@
+[%- USE T8 %]
+[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
+
+ <center>
+  <table class="login" border="3" cellpadding="20">
+   <tr>
+    <td class="login" align="center">
+     <a href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0"></a>
+     <h3 class="login" align="center">[% 'kivitendo' | $T8 %] [% version %]</h3>
+
+     [% IF error %]
+     <p><span class="message_error_login">[% error %]</span></p>
+     [% END %]
+
+     <p>
+
+      <form method="post" name="loginscreen" action="controller.pl" target="_top">
+
+       <input type="hidden" name="show_dbupdate_warning" value="1">
+
+       <table width="100%">
+        <tr>
+         <td align="center">
+          <table>
+           <tr>
+            <th align="right">[% 'Login Name' | $T8 %]</th>
+            <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
+           </tr>
+           <tr>
+            <th align="right">[% 'Password' | $T8 %]</th>
+            <td><input class="login" type="password" name="{AUTH}password" size="30" tabindex="2"></td>
+           </tr>
+          </table>
+
+          <br>
+          <input type="hidden" name="action" value="LoginScreen/login">
+          <input type="submit" value="[% 'Login' | $T8 %]" tabindex="3">
+
+         </td>
+        </tr>
+       </table>
+
+      </form>
+
+    </td>
+   </tr>
+  </table>
+
+</body>
+</html>
index 1fb3c5e..b1a2daf 100644 (file)
@@ -4,7 +4,7 @@
 [% UNLESS is_links %]
  <span class="frame-header-element frame-header-left">
     [<a href="JavaScript:Switch_Menu();" title="[% 'Switch Menu on / off' | $T8 %]">[% 'Menu' | $T8 %]</a>]
-    [<a HREF="login.pl" target="_blank" title="[% 'Open a further kivitendo Window or Tab' | $T8 %]">[% 'New Win/Tab' | $T8 %]</a>]
+    [<a href="controller.pl?action=LoginScreen/user_login" target="_blank" title="[% 'Open a further kivitendo Window or Tab' | $T8 %]">[% 'New Win/Tab' | $T8 %]</a>]
     [<a href="JavaScript:top.main_window.print();" title="[% 'Hardcopy' | $T8 %]">[% 'Print' | $T8 %]</a>]
     [<a href="Javascript:top.main_window.history.back();" title="[% 'Go one step back' | $T8 %]">[% 'Back' | $T8 %]</a>]
     [<a href="Javascript:top.main_window.history.forward();" title="[% 'Go one step forward' | $T8 %]">[% 'Fwd' | $T8 %]</a>]
@@ -23,7 +23,7 @@
  <span class="frame-header-element frame-header-right">
   [% 'User' | $T8 %]:
   [% MYCONFIG.login %]
-  [<a href="login.pl?action=logout" target="_top" title="[% 'Logout now' | $T8 %]">[% 'Logout' | $T8 %]</a>]
+  [<a href="controller.pl?action=LoginScreen/logout" target="_top" title="[% 'Logout now' | $T8 %]">[% 'Logout' | $T8 %]</a>]
   [% now.to_lxoffice %] -
   [% now.hms %]
  </span>
index 452c43a..d552675 100644 (file)
@@ -26,7 +26,7 @@ window.onload=clockon
    </td>
    <td align="right" nowrap>
     [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
-    <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
+    <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
     [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
    </td>
   </tr>
index 6faa762..cfe50a3 100644 (file)
@@ -51,7 +51,7 @@ window.onload=clockon
    </td>
    <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
     [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
-    <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
+    <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
     [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
    </td>
   </tr>
index 0a11fe4..b0b72f4 100644 (file)
@@ -8,7 +8,7 @@
   </span>
   <span class="frame-header-element frame-header-right">
    [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
-   <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
+   <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
    [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
   </span>
  </div>
index cb449fa..19f90cd 100644 (file)
 
     <script type="text/javascript">
      <!--
-       Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
-       Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
-
        $('document').ready(function(){
          setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
          setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
index 2c5d801..9b275af 100644 (file)
                      [%- END %]
                     </th>
                     <td nowrap>
-                      <input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)">
-                      <input type=button name=transdate id="trigger1" value="[% 'button' | $T8 %]">
+                      [% L.date_tag('transdate', transdate) %]
                     </td>
                   </tr>
                   <tr>
                      [%- END %]
                     </th>
                     <td nowrap>
-                      <input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)">
-                      <input type=button name=reqdate id="trigger2" value="[% 'button' | $T8 %]">
+                      [% L.date_tag('reqdate', reqdate) %]
                     </td>
                   </tr>
                   <tr>
index 8f39ea2..3e3e5df 100644 (file)
     <tr>
      <th align="right">[% IF is_order %][% 'Order Date' | $T8 %][% ELSE %][% 'Quotation Date' | $T8 %][% END %] [% 'From' | $T8 %]</th>
      <td>
-      <input name="transdatefrom" id="transdatefrom" size="11" title="[% dateformat | html %]" onBlur="check_right_date_format(this)">
-      <input type="button" name="transdatefrom" id="trigger3" value="?">
+       [% L.date_tag('transdatefrom') %]
      </td>
      <th align="right">[% 'Bis' | $T8 %]</th>
      <td>
-      <input name="transdateto" id="transdateto" size="11" title="[% HTML.escape(dateformat) %]" onBlur="check_right_date_format(this)">
-      <input type="button" name="transdateto" name="transdateto" id="trigger4" value="?">
+      [% L.date_tag('transdateto') %]
      </td>
     </tr>
     <tr>
      <th align="right">[% IF is_order %][% 'Delivery Date' | $T8 %][% ELSE %][% 'Valid until' | $T8 %][% END %] [% 'From' | $T8 %]</th>
      <td>
-      <input name=reqdatefrom id=reqdatefrom size=11 title="[% HTML.escape(dateformat) %]" onBlur="check_right_date_format(this)">
-      <input type=button name=reqdatefrom id="trigger5" value=?>
+       [% L.date_tag('reqdatefrom') %]
      </td>
      <th align="right">[% 'Bis' | $T8 %]</th>
      <td>
-      <input name=reqdateto id=reqdateto size=11 title="[% HTML.escape(dateformat) %]" onBlur="check_right_date_format(this)">
-      <input type=button name=reqdateto name=reqdateto id="trigger6" value=?>
+       [% L.date_tag('reqdateto') %]
      </td>
     </tr>
     <tr>
  </tr>
 </table>
 
-<script type="text/javascript">
- <!--
-   Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger3" });
-   Calendar.setup({ inputField : "transdateto",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger4" });
-   Calendar.setup({ inputField : "reqdatefrom",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger5" });
-   Calendar.setup({ inputField : "reqdateto",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger6" });
- //-->
-</script>
-
 <br>
 <input type="hidden" name="nextsub" value="orders">
 <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
index 0a5059a..a2dc8c0 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %][% USE LxERP %]
 [% IF vc == 'vendor' %]
  [% SET is_vendor = 1 %]
       <td><input name="bank_transfers[].reference" value="[% HTML.escape(bank_transfer.reference) %]"></td>
       <td align="right"><input name="bank_transfers[].amount" value="[% LxERP.format_amount(bank_transfer.amount, -2) %]" style="text-align: right"></td>
       <td nowrap>
-       <input name="bank_transfers[].requested_execution_date"
-              id="requested_execution_date_[% loop.count %]"
-              value="[% HTML.escape(bank_transfer.requested_execution_date) %]"
-              size="11">
-       <input type="button" name="requested_execution_date_[% loop.count %]_trigger" id="requested_execution_date_[% loop.count %]_trigger" value="?">
+        [% L.date_tag('requested_execution_date_'_ loop.count, bank_transfer.requested_execution_date) %]
       </td>
      </tr>
     [%- END %]
   <input type="hidden" name="confirmation" value="1">
  </form>
 
- <script type="text/javascript">
-  <!--
-    [%- FOREACH row = BANK_TRANSFERS %]
-     Calendar.setup({ inputField : "requested_execution_date_[% loop.count %]",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "requested_execution_date_[% loop.count %]_trigger" });
-    [%- END %]
-    -->
- </script>
-
 </body>
 </html>
index a534d1a..3af74c9 100644 (file)
@@ -1,6 +1,7 @@
 [%- USE T8 %]
 [% USE HTML %]
 [% USE LxERP %]
+[%- USE L %]
 [% IF vc == 'vendor' %]
  [% SET is_vendor = 1 %]
  [% SET arap = 'ap' %]
@@ -46,8 +47,7 @@
      [%- IF show_post_payments_button %]
       <th class="listheading" colspan="3">&nbsp;</th>
       <th class="listheading">
-       <input name="set_all_execution_date" id="set_all_execution_date" size="11">
-       <input type="button" name="set_all_execution_date_trigger" id="set_all_execution_date_trigger" value="?">
+        [% L.date_tag('set_all_execution_date') %]
       </th>
      [%- ELSE %]
       <th class="listheading" colspan="4">&nbsp;</th>
@@ -82,9 +82,7 @@
        [%- ELSIF item.export_closed %]
         [% 'not executed' | $T8 %]
        [%- ELSE %]
-        <input name="items[].execution_date" id="execution_date_[% loop.count %]" size="11"
-               value="[% IF item.requested_execution_date %][% HTML.escape(item.requested_execution_date) %][% ELSE %][% HTML.escape(current_date) %][% END %]">
-        <input type="button" name="execution_date_[% loop.count %]_trigger" id="execution_date_[% loop.count %]_trigger" value="?">
+         [% L.date_tag('items[].execution_date', item.requested_execution_date || current_date) %]
        [%- END %]
       </td>
      </tr>
           $(this).attr('checked', checked);
         });
       });
-
-      [%- IF show_post_payments_button %]
-       Calendar.setup({ inputField : "set_all_execution_date",
-                        ifFormat   : "[% myconfig_jsc_dateformat %]",
-                        align      : "BL",
-                        button     : "set_all_execution_date_trigger",
-                        onUpdate   : set_all_execution_date_fields });
-
-       [%- FOREACH item = export.items %]
-        [%- IF !item.executed %]
-         Calendar.setup({ inputField : "execution_date_[% loop.count %]",
-                          ifFormat   : "[% myconfig_jsc_dateformat %]",
-                          align      : "BL",
-                          button     : "execution_date_[% loop.count %]_trigger" });
-        [%- END %]
-       [%- END %]
-      [%- END %]
     });
      -->
   </script>
index bc60d88..74060f5 100644 (file)
@@ -1,5 +1,7 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]
+[%- USE HTML %]
+[%- USE LxERP %]
+[%- USE L %]
 <body>
 
  <p><div class="listtop">[% title %]</div></p>
     <tr>
      <td align="right">[% 'Export date from' | $T8 %]</td>
      <td>
-      <input name="f_export_date_from" id="f_export_date_from" size="11">
-      <input type="button" name="f_export_date_from_trigger" id="f_export_date_from_trigger" value="?">
-      [% 'to (time)' | $T8 %]
-      <input name="f_export_date_to" id="f_export_date_to" size="11">
-      <input type="button" name="f_export_date_to_trigger" id="f_export_date_to_trigger" value="?">
+       [% L.date_tag('f_export_date_from') %]
+       [% 'to (time)' | $T8 %]
+       [% L.date_tag('f_export_date_to') %]
      </td>
     </tr>
 
     <tr>
      <td align="right">[% 'Requested execution date from' | $T8 %]</td>
      <td>
-      <input name="f_requested_execution_date_from" id="f_requested_execution_date_from" size="11">
-      <input type="button" name="f_requested_execution_date_from_trigger" id="f_requested_execution_date_from_trigger" value="?">
-      [% 'to (time)' | $T8 %]
-      <input name="f_requested_execution_date_to" id="f_requested_execution_date_to" size="11">
-      <input type="button" name="f_requested_execution_date_to_trigger" id="f_requested_execution_date_to_trigger" value="?">
+       [% L.date_tag('f_requested_execution_date_from') %]
+       [% 'to (time)' | $T8 %]
+       [% L.date_tag('f_requested_execution_date_to') %]
      </td>
     </tr>
 
     <tr>
      <td align="right">[% 'Execution date from' | $T8 %]</td>
      <td>
-      <input name="f_execution_date_from" id="f_execution_date_from" size="11">
-      <input type="button" name="f_execution_date_from_trigger" id="f_execution_date_from_trigger" value="?">
-      [% 'to (time)' | $T8 %]
-      <input name="f_execution_date_to" id="f_execution_date_to" size="11">
-      <input type="button" name="f_execution_date_to_trigger" id="f_execution_date_to_trigger" value="?">
+       [% L.date_tag('f_execution_date_from') %]
+       [% 'to (time)' | $T8 %]
+       [% L.date_tag('f_execution_date_to') %]
      </td>
     </tr>
 
    <input type="submit" class="submit" name="action_bank_transfer_list" value="[% 'Continue' | $T8 %]">
   </p>
  </form>
-
- <script type="text/javascript">
-  <!--
-     Calendar.setup({ inputField : "f_export_date_from",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "f_export_date_from_trigger" });
-     Calendar.setup({ inputField : "f_export_date_to",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "f_export_date_to_trigger" });
-
-     Calendar.setup({ inputField : "f_requested_execution_date_from",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "f_requested_execution_date_from_trigger" });
-     Calendar.setup({ inputField : "f_requested_execution_date_to",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "f_requested_execution_date_to_trigger" });
-
-     Calendar.setup({ inputField : "f_execution_date_from",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "f_execution_date_from_trigger" });
-     Calendar.setup({ inputField : "f_execution_date_to",
-                      ifFormat   : "[% myconfig_jsc_dateformat %]",
-                      align      : "BL",
-                      button     : "f_execution_date_to_trigger" });
-
-    -->
- </script>
-
 </body>
 </html>
index a4591ff..e1d2281 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 <body>
 
  <form method=post name="search_invoice" action=[% script %]>
      <tr>
       <th align=right nowrap>[% 'Invoice Date' | $T8 %] [% 'From' | $T8 %]</th>
       <td>
-       <input name=transdatefrom id=transdatefrom size=11 title="[% dateformat | html %]" onBlur="check_right_date_format(this)">
-       <input type=button name=transdatefrom id="trigger1" value=[% 'button' | $T8 %]>
+        [% L.date_tag('transdatefrom') %]
       </td>
      <th align=right>[% 'Bis' | $T8 %]</th>
      <td>
-      <input name=transdateto id=transdateto size=11 title="[% dateformat | html %]" onBlur="check_right_date_format(this)">
-      <input type=button name=transdateto name=transdateto id="trigger2" value=[% 'button' | $T8 %]>
+       [% L.date_tag('transdateto') %]
      </td>
     </tr>
     <tr>
   </form>
  <script type="text/javascript">
  <!--
-   Calendar.setup( { inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "trigger1" });
-   Calendar.setup( { inputField : "transdateto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
    $(document).ready(function(){
     $('customer').focus();
     setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
index 2308794..bae4770 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %][% USE JavaScript %]<body onload="on_load();">
 
  <script type="text/javascript">
        <tr>
         <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
         <td>
-         <input name="bestbefore" id="bestbefore" size="11" title="[% myconfig_dateformat %]">
-         <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
+          [% L.date_tag('bestbefore') %]
         </td>
        </tr>
        [% END %]
        <tr>
         <th align="right" nowrap>[% 'From Date' | $T8 %]</th>
         <td>
-         <input name="fromdate" id="fromdate" size="11" title="[% myconfig_dateformat %]">
-         <input type="button" name="b_fromdate" id="fromdate_trigger" value="?">
+          [% L.date_tag('fromdate') %]
         </td>
        </tr>
        <tr>
         <th align="right">[% 'To Date' | $T8 %]</th>
         <td>
-         <input name="todate" id="todate" size="11" title="[% myconfig_dateformat %]">
-         <input type="button" name="b_todate" id="todate_trigger" value="?">
+          [% L.date_tag('todate') %]
         </td>
        </tr>
       </table>
   </p>
  </form>
 
-  <script type="text/javascript">
-    <!--
-    [% IF conf_show_best_before %]
-    Calendar.setup( {
-      inputField : "bestbefore",
-      ifFormat :"[% myconfig_jsc_dateformat %]",
-      align : "BR",
-      button : "bestbefore_trigger"
-    });
-    [% END %]
-
-    Calendar.setup( {
-      inputField : "fromdate",
-      ifFormat :"[% myconfig_jsc_dateformat %]",
-      align : "BR",
-      button : "fromdate_trigger"
-    });
-
-     Calendar.setup( {
-      inputField : "todate",
-      ifFormat :"[% myconfig_jsc_dateformat %]",
-      align : "BL",
-      button : "todate_trigger"
-    });
-     //-->
-  </script>
-
 </body>
 </html>
index 53d0842..9215374 100644 (file)
        <tr>
         <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
         <td>
-         <input name="bestbefore" id="bestbefore" size="11" title="[% myconfig_dateformat %]">
-         <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
+          [% L.date_tag('bestbefore') %]
         </td>
        </tr>
        [% END %]
   </p>
  </form>
 
- [% IF conf_show_best_before %]
- <script type="text/javascript">
-   <!--
-     Calendar.setup( {
-     inputField : "bestbefore",
-     ifFormat :"[% myconfig_jsc_dateformat %]",
-     align : "BR",
-     button : "bestbefore_trigger"
-     });
-   //-->
- </script>
- [% END %]
-
 </body>
 </html>
index 0f499b2..254e854 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
+[%- USE L %]
 [% USE JavaScript %]<body onload="on_load();">
 
  <script type="text/javascript" src="js/common.js"></script>
     <tr>
      <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
      <td>
-       <input name="bestbefore" id="bestbefore" size="11" title="[% myconfig_dateformat %]">
-       <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
+       [% L.date_tag('bestbefore') %]
      </td>
     </tr>
     [% END %]
   </p>
  </form>
 
- [% IF conf_show_best_before %]
- <script type="text/javascript">
-   <!--
-     Calendar.setup( {
-     inputField : "bestbefore",
-     ifFormat :"[% myconfig_jsc_dateformat %]",
-     align : "BR",
-     button : "bestbefore_trigger"
-     });
-   //-->
- </script>
- [% END %]
-
 </body>
 </html>
index 74da21a..3999e8c 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %][% USE JavaScript %][% USE LxERP %]<body onload="on_load(); [% onload %]">
 
  <script type="text/javascript" src="js/common.js"></script>
     <tr>
      <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
      <td>
-       <input name="bestbefore" id="bestbefore" size="11" value="[% HTML.escape(bestbefore) %]" title="[% myconfig_dateformat %]">
-       <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
+      [% L.date_tag('bestbefore', bestbefore) %]
      </td>
     </tr>
     [% END %]
   </p>
  </form>
 
- [% IF conf_show_best_before %]
- <script type="text/javascript">
-   <!--
-     Calendar.setup( {
-     inputField : "bestbefore",
-     ifFormat :"[% myconfig_jsc_dateformat %]",
-     align : "BR",
-     button : "bestbefore_trigger"
-     });
-   //-->
- </script>
- [% END %]
-
 </body>
 </html>
index 4bb3c04..fef9940 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %][% USE JavaScript %][% USE LxERP %]<body onload="on_load(); [% onload %]">
 
  <script type="text/javascript" src="js/common.js"></script>
     <tr>
      <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
      <td>
-       <input name="bestbefore" id="bestbefore" size="11" value="[% HTML.escape(bestbefore) %]" title="[% myconfig_dateformat %]">
-       <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
+       [% L.date_tag('bestbefore', bestbefore) %]
      </td>
     </tr>
     [% END %]
    <input type="submit" class="submit" name="action" value="[% 'Stock' | $T8 %]">
    [%- END %]
   </p>
- </form>
-
- [% IF conf_show_best_before %]
- <script type="text/javascript">
-   <!--
-     Calendar.setup( {
-     inputField : "bestbefore",
-     ifFormat :"[% myconfig_jsc_dateformat %]",
-     align : "BR",
-     button : "bestbefore_trigger"
-     });
-   //-->
- </script>
-  [% END %]
-
+ </form> 
 </body>
 </html>