CRM-16643 - Deprecate 'setvalue' api action & switch editable default to 'create'
[civicrm-core.git] / templates / CRM / Admin / Form / PaymentProcessor.tpl
index 73644c381b0afc84b3d5742c3692c495820be57b..6dd14d15c162d8cb01abbc3e50fe9c52eb893565 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 </div>
 
 {if $action eq 1  or $action eq 2}
-<script type="text/javascript" >
-{literal}
+  <script type="text/javascript">
+  {literal}
     function reload(refresh) {
-        var paymentProcessorType = document.getElementById("payment_processor_type_id");
-        var url = {/literal}"{$refreshURL}"{literal}
-        var post = url + "&pp=" + paymentProcessorType.value;
-        if( refresh ) {
-            window.location= post;
-        }
+      var paymentProcessorType = cj("#payment_processor_type_id");
+      var url = {/literal}"{$refreshURL}"{literal} + "&pp=" + paymentProcessorType.val();
+      paymentProcessorType.closest('form').attr('data-warn-changes', 'false');
+      window.location.href = url;
     }
-{/literal}
-    </script>
+  {/literal}
+  </script>
 
 {/if}