# extra code is currently only used by menuv3 and menuv4 to set their css.
# it is strongly deprecated, and will be changed in a future version.
- my ($self, $extra_code) = @_;
+ my ($self, %params) = @_;
my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
my @header;
</script>|;
}
+ my %doctypes = (
+ strict => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">|,
+ transitional => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">|,
+ frameset => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">|,
+ );
+
# output
print $self->create_http_response(content_type => 'text/html', charset => $db_charset);
- print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>\n"
- if $ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/; # Other browsers may choke on menu scripts with DOCTYPE.
+ print $doctypes{$params{doctype} || 'transitional'}, $/;
print <<EOT;
<html>
<head>
EOT
print " $_\n" for @header;
print <<EOT;
- <link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" />
- <meta name="robots" content="noindex,nofollow" />
- <link rel="stylesheet" type="text/css" href="css/tabcontent.css" />
+ <link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css">
+ <meta name="robots" content="noindex,nofollow">
+ <link rel="stylesheet" type="text/css" href="css/tabcontent.css">
<script type="text/javascript" src="js/tabcontent.js">
/***********************************************
***********************************************/
</script>
- $extra_code
+ $params{extra_code}
$title_hack
</head>
{ name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg' },
{ name => "Email::Address", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-address-perl' },
{ name => "FCGI", url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' },
+ { name => "JSON", url => "http://search.cpan.org/~makamaka", debian => 'libjson-perl' },
{ name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/", debian => 'liblist-moreutils-perl' },
{ name => "Params::Validate", url => "http://search.cpan.org/~drolsky/", debian => 'libparams-validate-perl' },
{ name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/", debian => 'libpdf-api2-perl' },
my ($self, $tag, $content, @slurp) = @_;
my $attributes = $self->attributes(@slurp);
- return "<${tag}${attributes}/>" unless defined($content);
+ return "<${tag}${attributes}>" unless defined($content);
return "<${tag}${attributes}>${content}</${tag}>";
}
my %attributes = _hashify(@slurp);
$attributes{id} ||= $self->name_to_id($name);
+ $attributes{rows} *= 1; # required by standard
+ $attributes{cols} *= 1; # required by standard
$content = $content ? _H($content) : '';
return $self->html_tag('textarea', $content, %attributes, name => $name);
my ($self, $onclick, $value, @slurp) = @_;
my %attributes = _hashify(@slurp);
- return $self->input_tag(undef, $value, %attributes, type => 'button', onclick => $onclick);
+ $attributes{id} ||= $self->name_to_id($attributes{name}) if $attributes{name};
+ $attributes{type} ||= 'button';
+
+ return $self->html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
}
sub options_for_select {
s/y+/\%Y/gi;
} $::myconfig{"dateformat"};
- $params{cal_align} ||= 'BR';
-
+ my $cal_align = delete $params{cal_align} || 'BR';
my $str_value = blessed $value ? $value->to_lxoffice : $value;
$self->input_tag($name, $str_value,
) . ((!$params{no_cal}) ?
$self->html_tag('img', undef,
src => 'image/calendar.png',
+ alt => $::locale->text('Calendar'),
id => "trigger$seq",
title => _H($::myconfig{dateformat}),
%params,
) .
$self->javascript(
- "Calendar.setup({ inputField: '$name_e', ifFormat: '$datefmt', align: '$params{cal_align}', button: 'trigger$seq' });"
+ "Calendar.setup({ inputField: '$name_e', ifFormat: '$datefmt', align: '$cal_align', button: 'trigger$seq' });"
) : '');
}
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
my $framesize = _calc_framesize();
- $::form->header;
+ $::form->header(doctype => 'frameset');
print qq|
<frameset rows="28px,*" cols="*" framespacing="0" frameborder="0">
sub display {
my $form = $main::form;
- $form->header(qq|<link rel="stylesheet" href="css/menuv3.css?id=" type="text/css">|);
+ $form->header(extra_code => qq|<link rel="stylesheet" href="css/menuv3.css?id=" type="text/css">|);
$form->{date} = clock_line();
$form->{menu} = acc_menu();
sub display {
my $form = $main::form;
- $form->header(qq|<link rel="stylesheet" href="css/menuv4.css?id=" type="text/css">|);
+ $form->header(extra_code => qq|<link rel="stylesheet" href="css/menuv4.css?id=" type="text/css">|);
$form->{date} = clock_line();
$form->{menu} = acc_menu();
my $introws = max 2, $form->numtextrows($form->{intnotes}, 35, 8);
$rows = max $rows, $introws;
- $TMPL_VAR{notes} = qq|<textarea name=notes rows=$rows cols=25 wrap=soft>| . H($form->{notes}) . qq|</textarea>|;
- $TMPL_VAR{intnotes} = qq|<textarea name=intnotes rows=$introws cols=35 wrap=soft>| . H($form->{intnotes}) . qq|</textarea>|;
+ $TMPL_VAR{notes} = qq|<textarea name=notes rows="$rows" cols="25">| . H($form->{notes}) . qq|</textarea>|;
+ $TMPL_VAR{intnotes} = qq|<textarea name=intnotes rows="$introws" cols="35">| . H($form->{intnotes}) . qq|</textarea>|;
if (!$form->{taxincluded}) {
'CSV import: parts and services' => 'CSV-Import: Waren und Dienstleistungen',
'CSV import: shipping addresses' => 'CSV-Import: Lieferadressen',
'Calculate' => 'Berechnen',
+ 'Calendar' => 'Kalender',
'Can not create that quantity with current stock' => 'Diese Anzahl kann mit dem gegenwärtigen Lagerbestand nicht hergestellt werden.',
'Cancel' => 'Abbrechen',
'Cancel Accounts Payables Transaction' => 'Kreditorenbuchung stornieren',
'Copies' => 'Kopien',
'Correct taxkey' => 'Richtiger Steuerschlüssel',
'Corrections' => 'Korrekturen',
- 'Cost Center' => 'Kostenstelle',
'Costs' => 'Kosten',
'Could not copy %s to %s. Reason: %s' => 'Die Datei "%s" konnte nicht nach "%s" kopiert werden. Grund: %s',
'Could not open the file users/members.' => 'Die Datei "users/members" konnte nicht geöffnet werden.',
'Problem' => 'Problem',
'Produce Assembly' => 'Erzeugnis fertigen',
'Productivity' => 'Produktivität',
- 'Profit Center' => 'Erfolgsbereich',
'Profit determination' => 'Gewinnermittlung',
'Proforma Invoice' => 'Proformarechnung',
'Program' => 'Programm',
'as at' => 'zum Stand',
'assembly_list' => 'erzeugnisliste',
'back' => 'zurück',
- 'balance' => 'Betriebsvermögensvergleich/Bilanzierung',
'bank_collection_payment_list_#1' => 'bankeinzugszahlungsliste_#1',
'bank_transfer_payment_list_#1' => 'ueberweisungszahlungsliste_#1',
'bankaccounts' => 'Bankkonten',
'history' => 'Historie',
'history search engine' => 'Historien Suchmaschine',
'inactive' => 'inaktiv',
- 'income' => 'Einnahmen-Überschuss-Rechnung',
'invoice' => 'Rechnung',
'invoice_list' => 'debitorenbuchungsliste',
'lead deleted!' => 'Kundenquelle gelöscht',
'our vendor number at customer' => 'Unsere Lieferanten-Nr. beim Kunden',
'part_list' => 'Warenliste',
'percental' => 'prozentual',
- 'periodic' => 'Aufwandsmethode',
- 'perpetual' => 'Bestandsmethode',
'pick_list' => 'Sammelliste',
'plural first char' => 'P',
'pos_bilanz' => 'Bilanz',
-- @charset: utf-8
-- @ignore: 0
--- verwaiste Zahlungsbedingungen vorher entfernen:
-update customer set payment_id = NULL where payment_id not in (select id from payment_terms);
+-- verwaiste Einträge vorher entfernen
+UPDATE customer SET payment_id = NULL WHERE payment_id NOT IN (SELECT id FROM payment_terms);
+UPDATE customer SET language_id = NULL WHERE language_id NOT IN (SELECT id FROM language);
+UPDATE customer SET business_id = NULL WHERE business_id NOT IN (SELECT id FROM business);
ALTER TABLE customer ADD FOREIGN KEY (payment_id) REFERENCES payment_terms (id);
ALTER TABLE customer ADD FOREIGN KEY (language_id) REFERENCES language (id);
-- @charset: utf-8
-- @ignore: 0
--- verwaiste Zahlungsbedingungen vorher entfernen
-update vendor set payment_id = NULL where payment_id not in (select id from payment_terms);
-
+-- verwaiste Einträge vorher entfernen
+UPDATE vendor SET payment_id = NULL WHERE payment_id NOT IN (SELECT id FROM payment_terms);
+UPDATE vendor SET language_id = NULL WHERE language_id NOT IN (SELECT id FROM language);
+UPDATE vendor SET business_id = NULL WHERE business_id NOT IN (SELECT id FROM business);
ALTER TABLE vendor ADD FOREIGN KEY (payment_id) REFERENCES payment_terms (id);
ALTER TABLE vendor ADD FOREIGN KEY (language_id) REFERENCES language (id);
[%- ELSIF cvar.var.type == 'bool' %]
<input type="checkbox" name="[% PROCESS cvar_name %]" value="1"[% IF cvar.value %] checked[% END %]>
[%- ELSIF cvar.var.type == 'textfield' %]
-<textarea name="[% PROCESS cvar_name %]" cols="[% HTML.escape(cvar.var.width) %]" rows="[% HTML.escape(cvar.var.height) %]">[% HTML.escape(cvar.value) %]</textarea>
+[% L.textarea_tag(render_input_blocks__cvar_name, cvar.value, cols=cvar.var.width, rows=cvar.var.height) %]
[%- ELSIF cvar.var.type == 'date' %]
[%- L.date_tag(render_input_blocks__cvar_name, cvar.value) %]
[%- END %]
[%- IF label.$type.chknumber %]
<tr>
- <th align=right nowrap>[% 'Reference Number' | $T8 %]</th>
+ <th align=right nowrap>[% 'Reference' | $T8 %]</th>
<td colspan=3>[% L.input_tag('chknumber', '', size=20) %]</td>
</tr>
[%- END %]
[%-
Multibox__limit = limit != '' ? limit : vclimit != '' ? vclimit : 200
Multibox__show_text = allow_textbox and DATA.size and Multibox__limit < DATA.size ? 1 : 0
- Multibox__id = id != '' ? id : name
+ Multibox__id = id != '' && id * 1 != id ? id : name
Multibox__default = default != '' ? default : $name
Multibox__name = (select_name != '' and ! Multibox__show_text) ? select_name : name
-%]
<tr>
<th align="left">[% 'Ertrag' | $T8 %]</th>
- <td align="right">[% LxERP.format_amount(marge_total, 2) %]</td>
+ <td align="right">
+ [% LxERP.format_amount(marge_total, 2) %]
+ <input type="hidden" name="marge_total" value="[% HTML.escape(marge_total) %]">
+ </td>
</tr>
<tr>
<th align="left">[% 'Ertrag prozentual' | $T8 %]</th>
- <td align="right">[% LxERP.format_amount(marge_percent, 2) %]</td>
+ <td align="right">
+ [% LxERP.format_amount(marge_percent, 2) %]
+ <input type="hidden" name="marge_percent" value="[% HTML.escape(marge_percent) %]">
+ </td>
<td>%</td>
</tr>
-
- <input type="hidden" name="marge_total" value="[% HTML.escape(marge_total) %]">
- <input type="hidden" name="marge_percent" value="[% HTML.escape(marge_percent) %]">
</table>
</td>
[%- END %]
[% tax %]
<tr>
<th align="right">[% 'Total' | $T8 %]</th>
- <td align="right">[% LxERP.format_amount(invtotal, 2) %]</td>
+ <td align="right">[% LxERP.format_amount(invtotal, 2) %]
+ <input type="hidden" name="oldinvtotal" value="[% HTML.escape(oldinvtotal) %]">
+ <input type="hidden" name="oldtotalpaid" value="[% HTML.escape(totalpaid) %]">
+ </td>
</tr>
</table>
</td>
</table>
</td>
</tr>
- <input type="hidden" name="oldinvtotal" value="[% HTML.escape(oldinvtotal) %]">
- <input type="hidden" name="oldtotalpaid" value="[% HTML.escape(totalpaid) %]">
<tr>
<td><hr size="3" noshade></td>
</tr>
<input type="hidden" name="action" value="dispatcher">
<input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]">
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
-<input type="hidden" name="callback" value="[% callback %]">
+<input type="hidden" name="callback" value="[% callback | html %]">
[% IF vc == 'customer' %]
<input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
[% ELSE %]
</form>
+
+ <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 %]');
+ });
+ //-->
+ </script>
</body>
</html>
<input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
<input type="hidden" name="follow_up_rowcount" value="1">
- <div class="listtop">[% title %]</div>
+ <h1>[% title %]</h1>
[%- INCLUDE 'common/flash.html' %]
<table width="100%">
- <tr height="5"></tr>
<tr>
<td>
<table width="100%">
</td>
</tr>
[%- END %]
- <tr>
[%- IF currencies %]
<tr>
<th align="right">[% 'Currency' | $T8 %]</th>
</table>
</td>
</tr>
-
- <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 %]');
- });
- //-->
- </script>
<td>
<input type="button" id="cb_show_details" name="show_details" value='[% 'Show details' | $T8 %]'>
<script type="text/javascript">
- $('#cb_show_details').click(function(){ $('[id$="row2"]').toggle() });
+ $('#cb_show_details').click(function(){ $('[id^="row2"]').toggle() });
</script>
<table id='display_row' width="100%">
<tr class="listheading">
[%- FOREACH row = ROWS %]
<tr valign="top" class="[% IF row.error %]error_message[% ELSE %]listrow[% loop.count % 2 %][% END %]">
[%- FOREACH row1 = row.ROW1 %]
- <td align="[% row1.align %]"[% IF row1.nowrap %] nowrap[% END %]>[% row1.value %]</td>
+ <td[% IF row1.align %] align="[% row1.align %]"[% END %][% IF row1.nowrap %] nowrap[% END %]>[% row1.value %]</td>
[%- END %]
</tr>
+ <tr style='display:none'>
+ <td>
[%- FOREACH hidden = row.HIDDENS %]
- [% hidden.value %]
+ [% hidden.value %]
[%- END %]
- <tr class="listrow[% loop.count % 2 %]" id="[% loop.count %].row2" [% UNLESS show_details %]style="display:none;"[% END %]>
+ </td>
+ </tr>
+ <tr class="listrow[% loop.count % 2 %]" id="row2.[% loop.count %]" [% UNLESS show_details %]style="display:none;"[% END %]>
<td colspan="[% row.colspan %]">
[%- FOREACH row2 = row.ROW2 %]
- [%- IF row2.line_break %]<br/>[%- END %]
+ [%- IF row2.line_break %]<br>[%- END %]
[%- IF row2.cvar %]
[% row2.description %]
[% PROCESS cvar_inputs cvar = row2.render_options %]
</table>
</td>
</tr>
+<tr style='display:none'>
+ <td>
<script type='text/javascript'>
$(document).ready( function(){ $('#display_row tr:gt(1) input[name*="description"]').focus() });
</script>
+ </td>
+</tr>