action =>
[ t8('Update'),
submit => [ '#form', { action => "update" } ],
+ id => 'update_button',
accesskey => 'enter',
],
<tr>
<th align="right" nowrap>[% 'Vendor' | $T8 %]</th>
<td colspan="3">
- [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 300px") %]
+ [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 300px", onchange="\$('#update_button').click()") %]
[% L.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)')) %]
[% L.hidden_tag("previous_vendor_id", vendor_id) %]
</td>
<tr>
<th align="right" nowrap>[% 'Customer' | $T8 %]</th>
<td colspan=3>
- [% P.customer_vendor_picker("customer_id", customer_id, type="customer", style="width: 300px", class=(initial_focus == 'customer_id' ? "initial_focus" : "")) %]
+ [% P.customer_vendor_picker("customer_id", customer_id, type="customer", style="width: 300px", class=(initial_focus == 'customer_id' ? "initial_focus" : ""), onchange="\$('#update_button').click()") %]
[% L.button_tag("show_vc_details('customer')", LxERP.t8('Details (one letter abbreviation)')) %]
[% L.hidden_tag("previous_customer_id", customer_id) %]
[% L.hidden_tag('terms', terms) %]
[% P.hidden_tag(vc_id, $vc_id) %]
[% HTML.escape(VC_OBJ.name) %]
[% ELSE %]
- [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width") %]
+ [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %]
[% END %]
[% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
[% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %]
<tr>
<th align="right">[% 'Vendor' | $T8 %]</th>
<td>
- [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus") %]
+ [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
[% P.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)')) %]
[% P.hidden_tag("previous_vendor_id", vendor_id) %]
</td>
<tr>
<th align="right">[% 'Customer' | $T8 %]</th>
<td>
- [% P.customer_vendor_picker("customer_id", customer_id, type="customer", style="width: 250px", class="initial_focus") %]
+ [% P.customer_vendor_picker("customer_id", customer_id, type="customer", style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
[% L.button_tag("show_vc_details('customer')", LxERP.t8('Details (one letter abbreviation)')) %]
[% L.hidden_tag("previous_customer_id", customer_id) %]
[% L.hidden_tag("customer_pricegroup_id", customer_pricegroup_id) %]
<th align="right">[% IF vc == 'customer' %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
<td>
[%- SET vc_id = vc _ "_id" %]
- [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, style="width: 250px", class="initial_focus") %]
+ [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
[% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %]
[% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
</td>