Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8487df7

Von Hans P. Schlaepfer vor etwa 5 Jahren hinzugefügt

  • ID b8487df76ac1b62207bd38dcc66730604227cf07
  • Vorgänger e17fb8ca
  • Nachfolger 5053c53e

Neues Design 2019 Standard-Code templates/webpages/generic/

Unterschiede anzeigen:

templates/webpages/generic/calculate_qty.html
[% USE T8 %]
[% USE HTML %]
<input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
<input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
<form name="CalcQtyForm" id="calc_qty_form_id">
<table width="100%">
<tr><td>[% 'Please insert object dimensions below.' | $T8 %]</td></tr>
<!-- <h1>[% #title %]</h1> --><!-- PENDENT: wieso wurde das entfernt? Braucht es hier keinen Titel? -->
<tr>
<td>
<input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
<input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
<table>
<tr class="listheading">
<table class="tbl-list">
<caption>[% 'Please insert object dimensions below.' | $T8 %]</caption>
<thead>
<tr>
[% FOREACH col = HEADER %]
<th nowrap class="listheading">[% col.column_title %]</a></th>
<th>[% col.column_title %]</a></th>
[% END %]
</tr>
[% FOREACH row = VARIABLES %]
<tr class="listrow[% loop.count % 2 %]">
<td>[% HTML.escape(row.description) %]:</td><td><input id="[% row.name %]" name="[% row.name %]" value=""></td>
</tr>
</thead>
<tbody>
[% FOREACH row = VARIABLES %]
<tr class="listrow[% loop.count % 2 %]">
<td>[% HTML.escape(row.description) %]:</td><td><input type="text" id="[% row.name %]" name="[% row.name %]" value=""></td>
<td>[% HTML.escape(row.unit) %]</td>
</tr>
[% END %]
</table>
</td>
</tr>
</table>
<button type="button" onclick="calculate_qty()">[% 'Calculate' | $T8 %]</button>
</form>
<script type="text/javascript">
function calculate_qty() {
[%- FOREACH row = VARIABLES %]
var [% row.name %] = kivi.parse_amount($('#calc_qty_form_id #[% row.name %]').val());
[%- END %]
var result = [% formel %];
result = kivi.format_amount(result, 2);
if (document.CalcQtyForm.input_id.value) {
document.getElementById(document.CalcQtyForm.input_id.value).value = result;
} else {
document.getElementsByName(document.CalcQtyForm.input_name.value)[0].value = result;
}
$('#calc_qty_dialog').dialog('close');
}
</script>
</tr>
[% END %]
</tbody>
</table>
<div class="buttons">
<button type="button" onclick="calculate_qty()">[% 'Calculate' | $T8 %]</button>
</div>
</form>
<script type="text/javascript">
function calculate_qty() {
[%- FOREACH row = VARIABLES %]
var [% row.name %] = kivi.parse_amount($('#calc_qty_form_id #[% row.name %]').val());
[%- END %]
var result = [% formel %];
result = kivi.format_amount(result, 2);
/* Every Element should be assigned by ID and not with NAME, modern Browsers handle that since 2006 or a bit later */
if (document.CalcQtyForm.input_id.value) {
document.getElementById(document.CalcQtyForm.input_id.value).value = result;
} else {
document.getElementsByName(document.CalcQtyForm.input_name.value)[0].value = result;
}
$('#calc_qty_dialog').dialog('close');
}
</script>
templates/webpages/generic/error.html
[% USE T8 %]
[% USE HTML %]
<div class="message_error">[% IF title_error %][% title_error %][% ELSE %][% 'Error!' | $T8 %][% END %]
<p class="message_error_label">[% label_error %]</p>
</div>
<div class="message message_error">
<h4>[% IF title_error %][% title_error %][% ELSE %][% 'Error!' | $T8 %][% END %]</h4>
<p>[% label_error %]</p>
</div>
templates/webpages/generic/exception.html
[% USE LxERP %]
[% USE HTML %]
<h1 class="message_error">[%- LxERP.t8('Error!') %]</h1>
<div class="message message_error">[% LxERP.t8('Error!') %]</div>
<p>
[%- LxERP.t8('An exception occurred during execution.') %]
</p>
<div class="wrapper">
<div>
<table>
<tr>
<td valign="top">[%- LxERP.t8('Type') %]:</td>
<td valign="top">[%- HTML.escape(error.type) %]</td>
</tr>
<p>[% LxERP.t8('An exception occurred during execution.') %]</p>
<table class="tbl-horizontal">
<tr>
<td>[% LxERP.t8('Type') %]:</td>
<td>[% HTML.escape(error.type) %]</td>
</tr>
<tr>
<td>[% LxERP.t8('Information') %]:</td>
<td><code>[% HTML.escape(error.info) %]</code></td>
</tr>
</table>
</div><!-- /.wrapper -->
<tr>
<td valign="top">[%- LxERP.t8('Information') %]:</td>
<td valign="top"><pre>[%- HTML.escape(error.info) %]</pre></td>
</tr>
</table>
</div>
templates/webpages/generic/form_info.html
<div class="message_ok">
<b>[% P.simple_format(message) %]</b>
</div>
[% USE P %]
<script type="text/javascript">
<!--
<div class="message message_ok">[% P.simple_format(message) %]</div>
<script type="text/javascript"><!--
// If JavaScript is enabled, the whole thing will be reloaded.
// The reason is: When one changes his menu setup (HTML / CSS ...)
// it now loads the correct code into the browser instead of do nothing.
setTimeout("top.frames.location.href='login.pl?action=company_logo'",500);
-->
</script>
--></script>
templates/webpages/generic/information.html
<div class="message_ok">[% IF title_information %][% title_information %][% ELSE %][% 'Information' | $T8 %][% END %]</div>
<p>[% label_information %]</p>
[% USE T8 %]
<div class="message message_info">
<h4>[% IF title_information %][% title_information %][% ELSE %][% 'Information' | $T8 %][% END %]</h4>
<p>[% label_information %]</p>
</div>
templates/webpages/generic/new_item.html
[%- IF is_wrong_pclass == NOTFORSALE %]
<h4 class="error">[% 'searched part not for sale' | $T8 %]</h4>
[%- ELSE %]
[%- IF is_wrong_pclass == NOTFORPURCHASE %]
<h4 class="error">[% 'searched part not for purchase' | $T8 %]</h4>
[%- ELSE %]
<h4 class="error">[% 'Item does not exists in the database' | $T8 %]
[% IF INSTANCE_CONF.get_create_part_if_not_found %]
<p>[% 'What type of item is this?' | $T8 %]</h4>
[% USE T8 %]
[% USE HTML %]
<form method="post" action="controller.pl">
<form method="post" action="controller.pl">
<div class="wrapper">
[% IF is_wrong_pclass == NOTFORSALE %]
<p class="message message_error">[% 'searched part not for sale' | $T8 %]</p>
[% ELSE %]
[% IF is_wrong_pclass == NOTFORPURCHASE %]
<p class="message message_error">[% 'searched part not for purchase' | $T8 %]</p>
[% ELSE %]
<p class="message message_error">[% 'Item does not exists in the database' | $T8 %]</p>
[% IF INSTANCE_CONF.get_create_part_if_not_found %]
<p>[% 'What type of item is this?' | $T8 %]</p>
<p>
<input type="radio" name="part.part_type" value="part" checked> [% 'Part' | $T8 %]<br>
<input type="radio" name="part.part_type" value="assembly"> [% 'Assembly' | $T8 %]<br>
<input type="radio" name="part.part_type" value="service"> [% 'Service' | $T8 %]<br>
<input type="radio" name="part.part_type" value="assortment"> [% 'Assortment' | $T8 %]
</p>
[% FOREACH var = HIDDENS %]
<input type="hidden" name="[% HTML.escape(var.name) %]" value="[% HTML.escape(var.value) %]">
[% END %]
<input type="hidden" name="action" value="Part/dispatch">
<div class="buttons">
<input type="submit" name="action_add_from_record" value="[% 'Continue' | $T8 %]">
</div>
[% END %]<!-- /IF INSTANCE_CONF.get_create_part_if_not_found -->
[% END %]<!-- /ELSE -> IF is_wrong_pclass == NOTFORPURCHASE -->
[% END %]<!-- /ELSE -> IF is_wrong_pclass == NOTFORSALE -->
<div class="buttons"><input id='back_button' type='button' class="neutral" value="[% 'Back' | $T8 %]"></div>
</div><!-- /.wrapper -->
</form>
<p>
<input class="radio" type="radio" name="part.part_type" value="part" checked>&nbsp;[% 'Part' | $T8 %]<br>
<input class="radio" type="radio" name="part.part_type" value="assembly"> &nbsp;[% 'Assembly' | $T8 %]<br>
<input class="radio" type="radio" name="part.part_type" value="service"> &nbsp;[% 'Service' | $T8 %]<br>
<input class="radio" type="radio" name="part.part_type" value="assortment"> &nbsp;[% 'Assortment' | $T8 %]
<p>
[%- FOREACH var = HIDDENS %]
<input type="hidden" name="[% HTML.escape(var.name) %]" value="[% HTML.escape(var.value) %]">
[%- END %]
</p>
<input type="hidden" name="action" value="Part/dispatch">
<input class="submit" type="submit" name="action_add_from_record" value="[% 'Continue' | $T8 %]">
[%- ELSE %]
</h4>
[%- END %]
[%- END %]
[%- END %]
<input id='back_button' type='button' class="submit" value="[% 'Back' | $T8 %]">
</p>
</form>
<script type='text/javascript'>
$(function(){ $('#back_button').click(function(){ window.history.back(-1) }) })
</script>
templates/webpages/generic/print_options.html
[% USE T8 %]
[% USE HTML %]
<!--
PENDENT: Was soll diese Form des Dialogs?
Show_Headers sollte hier sowieso auf TRUE gestellt sein,
und der Dialog könnte vertikal statt horizontal ausgerichtet sein.
-->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<table>
[%- IF show_headers %]
<tr>
[%- FOREACH row = SELECTS %]
[%- IF row.show %]
<th align="left" id="print_options_header_[% row.sname %]">[%- row.hname %]</th>
[%- END %]
[%- END %]
[%- IF display_copies %]
<th align="left" id="print_options_header_copies">[% 'Copies' | $T8 %]</th>
[%- END %]
[%- IF display_groupitems %]
<th align="left" id="print_options_header_groupitems">[% 'Group Items' | $T8 %]</th>
[%- END %]
[%- IF display_bothsided %]
<th align="left" id="print_options_header_bothsided">[% 'Both-sided' | $T8 %]</th>
[%- END %]
[%- IF display_remove_draft %]
<th align="left" id="print_options_header_remove_draft">[% 'Remove Draft' | $T8 %]</th>
[%- END %]
</tr>
[%- END %]
<tr>
[%- FOREACH row = SELECTS %]
[%- IF row.show %]
<td id="print_options_input_[% row.sname %]">
<select name="[%- name_prefix %][%- row.sname %]" id="[%- id_prefix %][%- row.sname %]">
[%- FOREACH data = row.DATA %]
<option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
[%- END %]
</select>
</td>
[%- END %]
[%- END %]
[%- IF display_copies %]
<td id="print_options_input_copies">[%- IF !show_headers %][%- 'Copies' | $T8 %][%- END %]<input name="[%- name_prefix %]copies" id="[% id_prefix %]copies" size="2" value="[% HTML.escape(copies) %]"></td>
[%- END %]
[%- IF display_groupitems %]
<td id="print_options_input_groupitems">[%- IF !show_headers %][% 'Group Items' | $T8 %][%- END %]
<input name="[%- name_prefix %]groupitems" id="[% id_prefix %]groupitems" type="checkbox" class="checkbox" [% groupitems_checked %]>
</td>
[%- END %]
[%- IF display_bothsided %]
<td id="print_options_input_bothsided">[%- IF !show_headers %][% 'Both-sided' | $T8 %][%- END %]
<input name="[%- name_prefix %]bothsided" id="[% id_prefix %]bothsided" type="checkbox" class="checkbox" [% bothsided_checked %]>
</td>
[%- END %]
[%- IF display_remove_draft %]
<td id="print_options_input_remove_draft">[%- IF !show_headers %][% 'Remove Draft' | $T8 %][%- END %]
<input name="[%- name_prefix %]remove_draft" id="[% id_prefix %]remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]>
</td>
[%- END %]
</tr>
</table>
</td>
<td align=right>
<table><tr><th>[% status_msg %]</th></tr></table>
</td>
</tr>
<table class="tbl-horizontal">
<colgroup> <col class="wi-small"><col class="wi-lightwide"> </colgroup>
[% # IF show_headers %]
<body>
[% FOREACH row = SELECTS %]
[% IF row.show %]
<tr>
<th id="print_options_header_[% row.sname %]">[% row.hname %]</th>
<td id="print_options_input_[% row.sname %]">
<select name="[% name_prefix %][% row.sname %]" id="[% id_prefix %][% row.sname %]" class="wi-lightwide">
[% FOREACH data = row.DATA %]
<option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
[% END %]
</select>
</td>
</tr>
[% END %]
[% END %]
[% IF display_copies %]
<tr>
<th id="print_options_header_copies">[% 'Copies' | $T8 %]</th>
<td id="print_options_input_copies">
<input type="text" name="[% name_prefix %]copies" id="[% id_prefix %]copies" size="2" value="[% HTML.escape(copies) %]" class="wi-small">
</td>
</tr>
[% END %]
[% IF display_groupitems %]
<tr>
<th id="print_options_header_groupitems">[% 'Group Items' | $T8 %]</th>
<td id="print_options_input_groupitems">
<input name="[% name_prefix %]groupitems" id="[% id_prefix %]groupitems" type="checkbox" [% groupitems_checked %]>
</td>
</tr>
[% END %]
[% IF display_bothsided %]
<tr>
<th id="print_options_header_bothsided">[% 'Both-sided' | $T8 %]</th>
<td id="print_options_input_bothsided">
<input name="[% name_prefix %]bothsided" id="[% id_prefix %]bothsided" type="checkbox" [% bothsided_checked %]>
</td>
</tr>
[% END %]
[% IF display_remove_draft %]
<tr>
<th id="print_options_header_remove_draft">[% 'Remove Draft' | $T8 %]</th>
<td id="print_options_input_remove_draft">
<input name="[% name_prefix %]remove_draft" id="[% id_prefix %]remove_draft" type="checkbox" [% remove_draft_checked %]>
</td>
</tr>
[% END %]
</body>
[% # END %]
</table>
[% IF status_msg %]
<div class="message message_hint">[% status_msg %]</div>
[% END %]
templates/webpages/generic/select_delivery_customer.html
<h1>[% title %]</h1>
<form name="Form">
<input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
<input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
<table width="100%">
<tr><td>[% 'Please select a customer from the list below.' | $T8 %]</td></tr>
<tr>
<td>
[% USE T8 %]
[% USE HTML %]
<table>
<tr class="listheading">
<th class="listheading">&nbsp;</th>
[%- FOREACH col = HEADER %]
<th nowrap class="listheading"><a href="[% HTML.escape(col.callback) %]">[% col.column_title %]</a></th>
[%- END %]
</tr>
<h1>[% title %]</h1>
[%- FOREACH row = DELIVERY %]
<tr class="listrow[% loop.count % 2 %]">
<td><button type="button" onclick="customer_selected('[% loop.count %]')">Auswahl</button></td>
<form name="Form">
<input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
<input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
<p>[% 'Please select a customer from the list below.' | $T8 %]</p>
<table class="tbl-list">
<thead>
<tr>
<th>&nbsp;</th>
[% FOREACH col = HEADER %]
<th><a href="[% HTML.escape(col.callback) %]">[% col.column_title %]</a></th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH row = DELIVERY %]
<tr class="listrow[% loop.count % 2 %]">
<td><button type="button" onclick="customer_selected('[% loop.count %]')" class="neutral">Auswahl</button></td>
<td> <input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
<input type="hidden" id="name_[% loop.count %]" name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
[% HTML.escape(row.name) %] </td>
<td>[% HTML.escape(row.customernumber) %]</td>
<td>[% HTML.escape(row.address) %]</td>
<!--
<td>
<input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
<input type="hidden" id="name_[% loop.count %]" name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
[% HTML.escape(row.name) %]
<input type="hidden" id="description_[% loop.count %]" name="description_[% loop.count %]" value="[% HTML.escape(row.description) %]">
[% HTML.escape(row.description) %]
</td>
<td>[% HTML.escape(row.customernumber) %]</td>
<td>[% HTML.escape(row.address) %]</td>
<!-- <td> -->
<!-- <input type="hidden" id="description_[% loop.count %]" name="description_[% loop.count %]" value="[% HTML.escape(row.description) %]"> -->
<!-- [% HTML.escape(row.description) %] -->
<!-- </td> -->
</tr>
[%- END %]
</table>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
-->
</tr>
[% END %]
</tbody>
</table>
</form>
......
self.close();
}
//-->
</script>
</script>
templates/webpages/generic/select_vendor.html
[% USE HTML %]
<h1>[% title %]</h1>
<form name="Form">
<input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
<input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
<table width="100%">
<tr><td>[% 'Please select a vendor from the list below.' | $T8 %]</td></tr>
<tr>
<td>
<table>
<tr class="listheading">
<th class="listheading">&nbsp;</th>
[%- FOREACH col = HEADER %]
<th nowrap class="listheading"><a href="[% HTML.escape(col.callback) %]">[% col.column_title %]</a></th>
[%- END %]
</tr>
[%- FOREACH row = VENDOR %]
<form name="Form">
<input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
<input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
<p>[% 'Please select a vendor from the list below.' | $T8 %]</p>
<table class="tbl-list">
<thead>
<tr>
<th>&nbsp;</th>
[% FOREACH col = HEADER %]
<th><a href="[% HTML.escape(col.callback) %]">[% col.column_title %]</a></th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH row = VENDOR %]
<tr class="listrow[% loop.count % 2 %]">
<td><button type="button" onclick="vendor_selected('[% loop.count %]')">Auswahl</button></td>
<td>
<input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
<input type="hidden" id="name_[% loop.count %]" name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
[% HTML.escape(name) %]
</td>
<td>[% HTML.escape(row.customernumber) %]</td>
<td>[% HTML.escape(row.address) %]</td>
<!-- <td> -->
<!-- <input type="hidden" id="description_[% loop.count %]" name="description_[% loop.count %]" value="[% HTML.escape(row.description) %]"> -->
<!-- [% HTML.escape(row.description) %] -->
<!-- </td> -->
<td><button type="button" onclick="vendor_selected('[% loop.count %]')">Auswahl</button></td>
<td>[% HTML.escape(name) %]
<input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
<input type="hidden" id="name_[% loop.count %]" name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
</td>
<td>[% HTML.escape(row.customernumber) %]</td>
<td>[% HTML.escape(row.address) %]</td>
<!-- <td> -->
<!-- <input type="hidden" id="description_[% loop.count %]" name="description_[% loop.count %]" value="[% HTML.escape(row.description) %]"> -->
<!-- [% HTML.escape(row.description) %] -->
<!-- </td> -->
</tr>
[%- END %]
</table>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
<!--
function vendor_selected(selected) {
var name = document.getElementsByName("name_" + selected)[0].value
var id = document.getElementsByName("id_" + selected)[0].value
window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = name;
if (document.Form.input_id.value != "") {
window.opener.document.getElementsByName(document.Form.input_id.value)[0].value = id;
}
self.close();
[% END %]
</tbody>
</table>
</form>
<script type="text/javascript"><!--
function vendor_selected(selected) {
var name = document.getElementsByName("name_" + selected)[0].value
var id = document.getElementsByName("id_" + selected)[0].value
window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = name;
if (document.Form.input_id.value != "") {
window.opener.document.getElementsByName(document.Form.input_id.value)[0].value = id;
}
//-->
</script>
self.close();
}
--></script>
templates/webpages/generic/set_longdescription.html
[% USE L %]
[% USE LxERP %]
<div id="edit_longdescription_dialog" style="display: none">
<p>
<table>
<tr>
<th align="right">[% LxERP.t8("Row") %]:</th>
<td id="popup_edit_longdescription_runningnumber"></td>
</tr>
<div id="edit_longdescription_dialog" class="wrapper" style="display: none">
<!--
PENDENT:
Eigentlich gibt es hier kein Formular, sollte es aber,
damit wir nicht zuletzt das ganze im CSS-Namensraum FORM
designen können. Es werden sonst nur die Standard-Elemente angezeigt.
-->
<tr>
<th align="right">[% LxERP.t8("Part Number") %]:</th>
<td id="popup_edit_longdescription_partnumber"></td>
</tr>
<table class="tbl-horizontal checkered" style="clear:left;">
<colgroup> <col class="wi-small"><col class="wi-lightwide"> </colgroup>
<tbody>
<tr>
<th>[% LxERP.t8("Row") %]:</th>
<td id="popup_edit_longdescription_runningnumber"></td>
</tr>
<tr>
<th>[% LxERP.t8("Part Number") %]:</th>
<td id="popup_edit_longdescription_partnumber"></td>
</tr>
<tr>
<th>[% LxERP.t8("Description") %]:</th>
<td id="popup_edit_longdescription_description"></td>
</tr>
</tbody>
</table>
<tr>
<th align="right">[% LxERP.t8("Description") %]:</th>
<td id="popup_edit_longdescription_description"></td>
</tr>
</table>
</p>
<p class="spacer">&nbsp;</p>
<p id="popup_edit_longdescription_input_container"></p>
<p id="popup_edit_longdescription_input_container" style="clear:left;"></p>
<p>
[% L.button_tag("kivi.SalesPurchase.set_longdescription()", LxERP.t8("Assign")) %]
<a onclick="$('#edit_longdescription_dialog').dialog('close');" href="#">[% LxERP.t8("Abort") %]</a>
</p>
<div class="buttons">
[% L.button_tag("kivi.SalesPurchase.set_longdescription()", LxERP.t8("Assign"), class="button neutral") %]
<a onclick="$('#edit_longdescription_dialog').dialog('close');" href="#" class="button neutral">[% LxERP.t8("Abort") %]</a>
</div>
</div><!-- /#edit_longdescription_dialog -->

Auch abrufbar als: Unified diff