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;
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;
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;
}
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) = @_;
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 {
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
#
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
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;
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};
}
--- /dev/null
+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;
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.")) ;
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;
}
} else {
while (<$fh>) {
last if !/^--/;
- next if !/^--\s*\@charset:\s*(.+)/;
+ next if !/^--\s*\@(?:charset|encoding):\s*(.+)/;
$file_charset = $1;
last;
}
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
use List::Util qw(first);
use POSIX;
use SL::Auth;
+use SL::Dispatcher::AuthHandler;
use SL::LXDebug;
use SL::LxOfficeConf;
use SL::Locale;
my $self = bless {}, $class;
$self->{interface} = lc($interface || 'cgi');
+ $self->{auth_handler} = SL::Dispatcher::AuthHandler->new;
return $self;
}
::run();
::end_of_request();
} else {
- show_error('login/auth_db_unreachable');
+ show_error('login_screen/auth_db_unreachable');
}
}
}
$::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();
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;
}
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});
$::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};
$::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';
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();
}
--- /dev/null
+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;
--- /dev/null
+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;
--- /dev/null
+package SL::Dispatcher::AuthHandler::None;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+sub handle {
+ %::myconfig = ();
+}
+
+1;
--- /dev/null
+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;
$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();
}
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};
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();
$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__
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,
\r
.DHTMLSuite_menuItem_textContent\r
{\r
- border-bottom-style: none !important;\r
- background-color: inherit !important;\r
color: inherit !important;\r
}\r
<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>
'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',
'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',
'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',
no_todo_list=1
[Program--Logout]
-module=login.pl
-action=logout
+module=controller.pl
+action=LoginScreen/logout
target=_top
-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}
}
[%- 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>
<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">
<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">
<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>
</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> </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>
[%- 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">
[%- 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 %]');
<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 %]');
[%- 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 %]: </b></td></tr>"
- + "<tr><td>[% 'from (time)' | $T8 %]: "
- + "<input name=\"fromdate\" id=\"fromdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(fromdate) %]\">"
- + "<input type=\"button\" name=\"fromdate\" id=\"trigger1\" value=\"?\">"
- + " </td><td>[% 'to (time)' | $T8 %]: "
- + "<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> </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> <input type="text" name="mitarbeiter" id="mitarbeiter">
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="selectDate" style="display:none;">
+ <b>[% 'Period' | $T8 %]: </b>
+ [% 'from (time)' | $T8 %]: [% L.date_tag('fromdate', todate) %]
+ [% 'to (time)' | $T8 %]: [% 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>
<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>
<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); }
<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>
[%- 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 %]
[% 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>
[%- 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>
<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>
[%- 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>
<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>
[%- 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();
}
-->
<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>
[%- 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>
[%- 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 %]">
[%- USE T8 %]
[%- USE LxERP %]
+[%- USE L %]
<tr>
<td>
<table width="100%">
<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>
-[%- USE LxERP %][% USE T8 %]
+[%- USE LxERP %]
+[%- USE T8 %]
+[%- USE L %]
<tr>
<td>
<table width="100%">
<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>
+++ /dev/null
-[%- 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>
+++ /dev/null
-[%- 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>
+++ /dev/null
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <p>[% 'The authentication configuration file "config/lx_office.conf" 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 "doc/UPGRADE" 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>
+++ /dev/null
-[%- 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>
+++ /dev/null
-[% 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>
+++ /dev/null
-[%- 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>
--- /dev/null
+[%- 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>
--- /dev/null
+[%- 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>
--- /dev/null
+[% 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>
--- /dev/null
+[%- 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>
[% 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>]
<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>
</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>
</td>
</tr>
</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>
</td>
</tr>
</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>
</span>
</div>
<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 %]');
[%- 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>
<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) %]">
[%- 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>
[%- USE T8 %]
[% USE HTML %]
[% USE LxERP %]
+[%- USE L %]
[% IF vc == 'vendor' %]
[% SET is_vendor = 1 %]
[% SET arap = 'ap' %]
[%- IF show_post_payments_button %]
<th class="listheading" colspan="3"> </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"> </th>
[%- 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>
[%- 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>
[%- 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 %]');
[%- 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>
<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>
[%- 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>
[%- 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>
[%- 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>