[%- USE L %][%- USE LxERP %][%- USE HTML %]
-<form action="controller.pl" method="post">
+<form action="controller.pl" method="post" id="filter_form">
<div class="filter_toggle">
<a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8('Show Filter') %]</a>
[% IF SELF.filter_summary %]([% LxERP.t8("Current filter") %]: [% SELF.filter_summary %])[% END %]
[% L.hidden_tag('page', FORM.page) %]
[% L.submit_tag('action_list', LxERP.t8('Continue'))%]
- <a href="#" onClick="javascript:$('#filter_table input,#filter_table select').val('');">[% LxERP.t8('Reset') %]</a>
+ [% L.button_tag("\$('#filter_form').resetForm();", LxERP.t8('Reset')) %]
</div>
[%- USE L %]
[%- USE LxERP %]
[%- USE HTML %]
-<form action='controller.pl' method='post'>
+<form action='controller.pl' method='post' id='filter_form'>
<div class='filter_toggle'>
<a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Show Filter' | $T8 %]</a>
[% SELF.filter_summary | html %]
[% L.input_tag('action_list_all', LxERP.t8('Continue'), type = 'submit', class='submit')%]
-<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);'>[% 'Reset' | $T8 %]</a>
-
+[% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %]
</div>
</form>
[% SET debug = 0 %]
-<form method="post" action="javascript:filter_invoices();">
+<form method="post" action="javascript:filter_invoices();" id="assign_invoice_window_form">
<b>[%- LxERP.t8("Bank transaction") %]:</b>
<table>
<tr class="listheading">
<p>
[% L.submit_tag('', LxERP.t8("Search")) %]
[% L.button_tag('add_selected_invoices()', LxERP.t8("Add invoices"), id='add_selected_record_links_button') %]
- <a href="#" onclick="assign_invoice_reset_form();">[%- LxERP.t8("Reset") %]</a>
+ [% L.button_tag('$("#assign_invoice_window_form").resetForm()', LxERP.t8('Reset')) %]
<a href="#" onclick="$('#assign_invoice_window').dialog('close');">[% LxERP.t8("Cancel") %]</a>
</p>
});
}
-function assign_invoice_reset_form() {
- $('#assign_invoice_window form input[type=text]').val('');
-}
-
$(function() {
$('#invnumber').focus();
});
//-->
</script>
-
[% L.hidden_tag('mode', SELF.mode) %]
[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%]
-
-<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);$("#filter_table select").prop("selectedIndex", 0);'>[% 'Reset' | $T8 %]</a>
-
+[% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %]
</div>
</form>
[%- USE L %]
[%- USE LxERP %]
[%- USE HTML %]
-<form action='controller.pl' method='post'>
+<form action='controller.pl' method='post' id='filter_form'>
<div class='filter_toggle'>
<a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Show Filter' | $T8 %]</a>
[% SELF.filter_summary | html %]
[% L.hidden_tag('page', FORM.page) %]
[% L.hidden_tag('vc', SELF.vc) %]
[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%]
-
-
-<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);$("#filter_table select").prop("selectedIndex", 0);'>[% 'Reset' | $T8 %]</a>
-
+[% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %]
</div>
</form>
[%- USE L %][%- USE LxERP %][%- USE HTML %]
-<form action="controller.pl" method="post">
+<form action="controller.pl" method="post" id="filter_form">
<div class="filter_toggle">
<a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8('Show Filter') %]</a>
[% IF SELF.filter_summary %]([% LxERP.t8("Current filter") %]: [% SELF.filter_summary %])[% END %]
[% L.hidden_tag("page", FORM.page) %]
[% L.submit_tag("action_list", LxERP.t8("Continue"))%]
- <a href="#" onClick="javascript:$('#filter_table input,#filter_table select').val("");">[% LxERP.t8("Reset") %]</a>
+ [% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %]
</div>
[%- USE LxERP %]
[%- USE HTML %]
[%- SET style='width: 400px' %]
-<form action='controller.pl' method='post'>
+<form action='controller.pl' method='post' id='filter_form'>
<div class='filter_toggle'>
<a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Show Filter' | $T8 %]</a>
[% SELF.filter_summary %]
[% L.hidden_tag('sort_dir', FORM.sort_dir) %]
[% L.hidden_tag('page', FORM.page) %]
[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%]
-
-
-<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table option").prop("selected",0)'>[% 'Reset' | $T8 %]</a>
+[% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %]
</div>
</table>
[% L.button_tag('update_result()', LxERP.t8('Filter')) %]
-<a href='#' onClick='javascript:$("#multi_items_filter_table input").val("");$("#multi_items_filter_table input[type=checkbox]").prop("checked", 0);$("#multi_items_filter_table select").prop("selectedIndex", 0);'>[% 'Reset' | $T8 %]</a>
+[% L.button_tag('$("#multi_items_form").resetForm()', LxERP.t8('Reset')) %]
<hr>
<div id='multi_items_result'></div>
</table>
[% L.button_tag('update_result()', LxERP.t8('Filter')) %]
-<a href='#' onClick='javascript:$("#multi_items_filter_table input").val("");$("#multi_items_filter_table input[type=checkbox]").prop("checked", 0);$("#multi_items_filter_table select").prop("selectedIndex", 0);'>[% 'Reset' | $T8 %]</a>
+[% L.button_tag('$("#multi_items_form").resetForm()', LxERP.t8('Reset')) %]
<hr>
<div id='multi_items_result'></div>
</td>
</tr>
</table>
+
+[% L.button_tag('$("#search_form").resetForm()', LxERP.t8('Reset')) %]
[%- INCLUDE 'common/flash.html' %]
- <form method="post" action="controller.pl">
+ <form method="post" action="controller.pl" id="search_form">
<p>
[%- INCLUDE 'project/_filter.html' %]
<h1>[%- LxERP.t8("Add link: select records to link with") %]</h1>
-<form method="post" action="controller.pl">
+<form method="post" action="controller.pl" id="record_links_add_filter_form">
[% L.hidden_tag('object_model', SELF.object_model) %]
[% L.hidden_tag('object_id', SELF.object_id) %]
<p>
[% L.button_tag('filter_record_links()', LxERP.t8("Search")) %]
[% L.button_tag('add_selected_record_links()', LxERP.t8("Add links"), id='add_selected_record_links_button', disabled=1) %]
- <a href="#" onclick="record_links_reset_form();">[%- LxERP.t8("Reset") %]</a>
+ [% L.button_tag('$("#record_links_add_filter_form").resetForm()', LxERP.t8('Reset')) %]
<a href="#" onclick="$('#record_links_add').dialog('close');">[% LxERP.t8("Cancel") %]</a>
</p>
record_links_change_form_to_match_type();
});
-function record_links_reset_form() {
- $('#record_links_add form input[type=text]').val('');
- $('#record_links_add form select').prop('selectedIndex', 0);
-}
-
function filter_record_links() {
var url="controller.pl?action=RecordLinks/ajax_add_list&" + $("#record_links_add form").serialize();
$.ajax({