Ansprechpartner nicht mehr beim drücken der Eingabetaste löschen
authorThomas Heck <theck@linet-services.de>
Fri, 19 Oct 2012 14:13:20 +0000 (16:13 +0200)
committerThomas Heck <theck@linet-services.de>
Fri, 19 Oct 2012 14:13:20 +0000 (16:13 +0200)
fixt #2020

templates/webpages/ct/_contact.html
templates/webpages/ct/form_footer.html

index bfa4f37..e87b65a 100644 (file)
 
     </table>
 
-[% IF cp_id %]
-    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]">
-[% END %]
+    [% IF cp_id %]
+      <input type="button" id="delete_contact" onclick="submitInputBitton(this);" name="action" value="[% 'Delete Contact' | $T8 %]">
+    [% END %]
 
     <br style="clear: left" />
index 791aacf..fa433b8 100644 (file)
       function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
       function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
 
+      function submitInputBitton(button)
+      {
+        var hidden = document.createElement("input");
+        hidden.setAttribute("type", "hidden");
+
+        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();
+      }
+
       var maintab = new ddtabcontent("maintab");
       maintab.setpersist(true);
       maintab.setselectedClassTarget("link"); //"link" or "linkparent"