<script type="text/javascript">
<!--
- function submitInputButton(button)
+ function submitInputButton(action)
{
- var hidden = document.createElement("input");
- hidden.setAttribute("type", "hidden");
+ var $hidden = $("<input type='hidden' name='action' value='CustomerVendor/" + action + "'>"),
+ $form = $('#form');
- if ( button.hasAttribute("name") )
- hidden.setAttribute("name", button.getAttribute("name"));
-
- if ( button.hasAttribute("value") )
- hidden.setAttribute("value", button.getAttribute("value"));
-
-
- button.form.appendChild(hidden);
-
- button.disabled = true;
-
- button.form.submit();
+ $form.append($hidden);
+ $form.submit();
}
function check_taxzone_and_ustid() {
</table>
- [% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Contact'), name = 'action_delete_contact', class = 'submit') %]
+ [% L.button_tag('submitInputButton("delete_contact");', LxERP.t8('Delete Contact'), class = 'submit') %]
[% IF ( !SELF.contact.cp_id ) %]
<script type="text/javascript">
$('#action_delete_contact').hide();
[% END %]
</table>
- [% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Shipto'), name = 'action_delete_shipto', class = 'submit') %]
+ [% L.button_tag('submitInputButton("delete_shipto");', LxERP.t8('Delete Shipto'), class = 'submit') %]
[% IF ( !SELF.shipto.shipto_id ) %]
<script type="text/javascript">
$('#action_delete_shipto').hide();