CRM-16415 - convert button to crmButton, convert single url variable to path plus...
authorStephanie Gray <stephanie@freeform.ca>
Wed, 30 Sep 2015 19:47:39 +0000 (15:47 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 13 Oct 2015 18:50:13 +0000 (14:50 -0400)
CRM/Campaign/Page/SurveyType.php
templates/CRM/Campaign/Page/Petition.tpl
templates/CRM/Campaign/Page/SurveyType.tpl

index a873a40de57c8ccb938e9a708872bf7d92bb92b3..817dc2d6cb221b7b2b5203945422136bc026bc9b 100644 (file)
@@ -81,7 +81,7 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
 
     CRM_Utils_System::setTitle(ts('%1 Options', array(1 => $this->_GName)));
 
-    $this->assign('addSurveyType', CRM_Utils_System::url("civicrm/admin/campaign/surveyType", 'reset=1&action=add'));
+    $this->assign('addSurveyType', array("civicrm/admin/campaign/surveyType", "reset=1&action=add"));
   }
 
   /**
index 9845b310f6654695e1ec91e89d51b3f2b34b7c78..e315c81e11ad0ec70ab3b4098e24af97934e1505 100644 (file)
@@ -27,7 +27,9 @@
 
 {if $surveys}
   <div class="action-link">
-    {crmButton href=$addSurveyUrl icon="crm-i fa-plus-circle"}{ts}Add Survey{/ts}{/crmButton}
+    <a href="{$addSurveyUrl}" class="button">
+      <span><i class="crm-i fa-plus-circle"></i> {ts}Add Survey{/ts}</span>
+    </a>
   </div>
  {include file="CRM/common/enableDisableApi.tpl"}
  {include file="CRM/common/jsortable.tpl"}
@@ -68,5 +70,7 @@
   </div>
 {/if}
 <div class="action-link">
-  {crmButton href=$addSurveyUrl icon="crm-i fa-plus-circle"}{ts}Add Survey{/ts}{/crmButton}
+  <a href="{$addSurveyUrl}" class="button">
+    <span><i class="crm-i fa-plus-circle"></i> {ts}Add Survey{/ts}</span>
+  </a>
 </div>
index e230ac0fc113d3bb4862d42a504440b602a37dd5..6f1308bc10618615fc56e2baeff81bace0dba055 100644 (file)
@@ -4,7 +4,7 @@
 {else}
 {if $rows}
 <div class="action-link">
-  <a href="{$addSurveyType}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts 1=$GName}Add %1{/ts}</span></a>
+  {crmButton p=$addSurveyType.0 q=$addSurveyType.1 icon="crm-i fa-plus-circle"}{ts 1=$GName}Add %1{/ts}{/crmButton}
 </div>
 
 <div id={$gName}>
         </table>
         {/strip}
         <div class="action-link">
-          <a href="{$addSurveyType}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts 1=$GName}Add %1{/ts}</span></a>
+          {crmButton p=$addSurveyType.0 q=$addSurveyType.1 icon="crm-i fa-plus-circle"}{ts 1=$GName}Add %1{/ts}{/crmButton}
         </div>
 
 </div>
 {else}
     <div class="messages status no-popup">
          <div class="icon inform-icon"> &nbsp;
-         {ts 1=$addSurveyType}There are no survey type entered. You can <a href='%1'>add one</a>.{/ts}</div>
+         {ts p=$addSurveyType.0 q=$addSurveyType.1}There are no survey types entered. You can <a href='%1'>add one</a>.{/ts}</div>
     </div>
 {/if}
 {/if}