Refactoring: DHTML-Tab-Dialog durch Variante aus jQuery-UI ersetzt
[kivitendo-erp.git] / templates / webpages / ct / form_footer.html
1 [%- USE T8 %]
2 [% USE HTML %]
3 [% USE LxERP %]
4 [% USE L %]
5 <input name="id" type="hidden" id="cvid" value="[% HTML.escape(id) %]">
6 <input name="business_save" type="hidden" value="[% HTML.escape(selectbusiness) %]">
7 <input name="title_save" type="hidden" value="[% HTML.escape(title) %]">
8
9 <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
10 <input type="hidden" name="db" id="db" value="[% HTML.escape(db) %]">
11
12 <br>
13   <input class="submit" type="submit" name="action" accesskey="s" value="[% 'Save' | $T8 %]" onclick="return check_taxzone_and_ustid()">
14   <input class="submit" type="submit" name="action" accesskey="s" value="[% 'Save and Close' | $T8 %]" onclick="return check_taxzone_and_ustid()">
15   [%- IF is_customer %]
16   <input class="submit" type="submit" name="action" value="[% 'Save and AR Transaction' | $T8 %]" onclick="return check_taxzone_and_ustid()">
17   [%- ELSE %]
18   <input class="submit" type="submit" name="action" value="[% 'Save and AP Transaction' | $T8 %]" onclick="return check_taxzone_and_ustid()">
19   [%- END %]
20   <input class="submit" type="submit" name="action" value="[% 'Save and Invoice' | $T8 %]" onclick="return check_taxzone_and_ustid()">
21   <input class="submit" type="submit" name="action" value="[% 'Save and Order' | $T8 %]" onclick="return check_taxzone_and_ustid()">
22   [%- IF is_customer %]
23   <input class="submit" type="submit" name="action" value="[% 'Save and Quotation' | $T8 %]" onclick="return check_taxzone_and_ustid()">
24   [%- ELSE %]
25   <input class="submit" type="submit" name="action" value="[% 'Save and RFQ' | $T8 %]" onclick="return check_taxzone_and_ustid()">
26   [%- END %]
27 [%- IF id AND is_orphaned %]
28   [% L.submit_tag('action', LxERP.t8('Delete'), id => 'action_delete', confirm => LxERP.t8('Do you really want to delete this object?')) %]
29 [%- END %]
30 [%- IF id %]
31   <input type="button" class="submit" onclick="set_history_window([% HTML.escape(id) %]);" name="history" id="history" value="[% 'history' | $T8 %]">
32 [%- END %]
33
34   </form>
35
36  <script type="text/javascript">
37   <!--
38       function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
39       function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
40
41       function submitInputButton(button)
42       {
43         var hidden = document.createElement("input");
44         hidden.setAttribute("type", "hidden");
45
46         if( button.hasAttribute("name") )
47           hidden.setAttribute("name", button.getAttribute("name"));
48
49         if( button.hasAttribute("value") )
50           hidden.setAttribute("value", button.getAttribute("value"));
51
52
53         button.form.appendChild(hidden);
54
55         button.disabled = true;
56
57         button.form.submit();
58       }
59
60       function check_taxzone_and_ustid() {
61         if (($('#taxzone_id').attr('value') == '1') && ($('#ustid').attr('value') == '')) {
62           alert('[% LxERP.t8('Please enter the sales tax identification number.') %]');
63           return false;
64         }
65         return true;
66       }
67
68     -->
69  </script>