CRM-12882 - Allow all admins to view payment processors page. Clarify error message...
[civicrm-core.git] / CRM / Admin / Form / MessageTemplates.php
index fbb5b3098c7aa4ec16ce9631ff0d96a2e506cbb4..537a2d99a67358f65ac23b923e08070538327747 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -158,36 +158,7 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Admin_Form {
     //get the tokens.
     $tokens = CRM_Core_SelectValues::contactTokens();
 
-    //sorted in ascending order tokens by ignoring word case
-    natcasesort($tokens);
-    $this->assign('tokens', json_encode($tokens));
-
-    $this->add('select', 'token1', ts('Insert Tokens'),
-      $tokens, FALSE,
-      array(
-        'size' => "5",
-        'multiple' => TRUE,
-        'onchange' => "return tokenReplText(this);",
-      )
-    );
-
-    $this->add('select', 'token2', ts('Insert Tokens'),
-      $tokens, FALSE,
-      array(
-        'size' => "5",
-        'multiple' => TRUE,
-        'onchange' => "return tokenReplHtml(this);",
-      )
-    );
-
-    $this->add('select', 'token3', ts('Insert Tokens'),
-      $tokens, FALSE,
-      array(
-        'size' => "5",
-        'multiple' => TRUE,
-        'onchange' => "return tokenReplText(this);",
-      )
-    );
+    $this->assign('tokens', CRM_Utils_Token::formatTokensForDisplay($tokens));
 
     $this->add('textarea', 'msg_text', ts('Text Message'),
       "cols=50 rows=6"