CRM-13863 - Get rid of double title for forms that use popups
authorColeman Watts <coleman@civicrm.org>
Mon, 18 Aug 2014 20:49:02 +0000 (21:49 +0100)
committerColeman Watts <coleman@civicrm.org>
Tue, 19 Aug 2014 20:45:24 +0000 (21:45 +0100)
Transfer responsibility for page title from tpl to php.
Add setPageTitle helper method to CRM_Core_Form.
And a bit of misc form/tpl cleanup

86 files changed:
CRM/ACL/Form/ACL.php
CRM/Activity/Page/Tab.php
CRM/Admin/Form.php
CRM/Admin/Form/ContactType.php
CRM/Admin/Form/LocationType.php
CRM/Admin/Form/MailSettings.php
CRM/Admin/Form/Mapping.php
CRM/Admin/Form/Options.php
CRM/Admin/Form/RelationshipType.php
CRM/Admin/Form/Tag.php
CRM/Admin/Page/Mapping.php
CRM/Case/Page/Tab.php
CRM/Contact/BAO/Contact.php
CRM/Contact/Form/Task.php
CRM/Contact/Form/Task/SMS.php
CRM/Contact/Page/Inline/ContactName.php
CRM/Contact/Page/View/Note.php
CRM/Contact/Page/View/Relationship.php
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/ManagePremiums.php
CRM/Contribute/Page/ContributionRecur.php
CRM/Contribute/Page/Tab.php
CRM/Core/Form.php
CRM/Custom/Form/DeleteField.php
CRM/Custom/Form/Field.php
CRM/Custom/Page/Field.php
CRM/Event/Form/Participant.php
CRM/Event/Page/Tab.php
CRM/Financial/Form/FinancialAccount.php
CRM/Financial/Form/FinancialBatch.php
CRM/Financial/Form/FinancialType.php
CRM/Financial/Form/FinancialTypeAccount.php
CRM/Grant/Form/Grant.php
CRM/Grant/Form/GrantView.php
CRM/Grant/Page/Tab.php
CRM/Grant/Selector/Search.php
CRM/Member/Form/Membership.php
CRM/Member/Form/MembershipRenewal.php
CRM/Member/Form/MembershipType.php
CRM/Member/Page/Tab.php
CRM/Note/Form/Note.php
CRM/Pledge/Form/Payment.php
CRM/Pledge/Form/Pledge.php
CRM/Pledge/Page/Payment.php
CRM/Pledge/Page/Tab.php
CRM/Price/Form/Field.php
CRM/SMS/Form/Provider.php
CRM/UF/Form/Field.php
templates/CRM/ACL/Form/ACL.tpl
templates/CRM/Admin/Form/ContactType.tpl
templates/CRM/Admin/Form/LocationType.tpl
templates/CRM/Admin/Form/MailSettings.tpl
templates/CRM/Admin/Form/Mapping.tpl
templates/CRM/Admin/Form/OptionGroup.tpl
templates/CRM/Admin/Form/Options.tpl
templates/CRM/Admin/Form/RelationshipType.tpl
templates/CRM/Admin/Form/Tag.tpl
templates/CRM/Admin/Page/ContactType.tpl
templates/CRM/Admin/Page/LocationType.tpl
templates/CRM/Admin/Page/MailSettings.tpl
templates/CRM/Admin/Page/Options.tpl
templates/CRM/Admin/Page/RelationshipType.tpl
templates/CRM/Contact/Page/View/Note.tpl
templates/CRM/Contribute/Form/Contribution.tpl
templates/CRM/Contribute/Form/ContributionView.tpl
templates/CRM/Contribute/Form/ManagePremiums.tpl
templates/CRM/Custom/Form/DeleteField.tpl
templates/CRM/Event/Form/Participant.tpl
templates/CRM/Event/Form/ParticipantView.tpl
templates/CRM/Financial/Form/FinancialAccount.tpl
templates/CRM/Financial/Form/FinancialBatch.tpl
templates/CRM/Financial/Form/FinancialType.tpl
templates/CRM/Financial/Form/FinancialTypeAccount.tpl
templates/CRM/Grant/Form/Grant.tpl
templates/CRM/Grant/Form/GrantView.tpl
templates/CRM/Member/Form/Membership.tpl
templates/CRM/Member/Form/MembershipRenewal.tpl
templates/CRM/Member/Form/MembershipType.tpl
templates/CRM/Member/Form/MembershipView.tpl
templates/CRM/Pledge/Form/Payment.tpl
templates/CRM/Pledge/Form/Pledge.tpl
templates/CRM/Pledge/Form/PledgeView.tpl
templates/CRM/Pledge/Page/Payment.tpl
templates/CRM/SMS/Form/Provider.tpl
templates/CRM/SMS/Page/Provider.tpl
templates/CRM/common/enableDisableApi.tpl

index 2741d755e1db5b53197acd8a89ea23e6c167e587..a787abe90ccdd097d6471a6af76a4ed0a3f81b5f 100644 (file)
@@ -121,6 +121,8 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
   public function buildQuickForm() {
     parent::buildQuickForm();
 
+    $this->setPageTitle(ts('ACL'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -311,5 +313,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
       CRM_ACL_BAO_ACL::create($params);
     }
   }
+
 }
 
index 1e5fa71e7e6c4d7789e493eeedec4f679aba6d3b..555d1b7e86c01409073d10e053eddfea756616d2 100644 (file)
@@ -135,9 +135,6 @@ class CRM_Activity_Page_Tab extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->assign('action', $this->_action);
 
index 6f18f0060728c8970d7252db95614ca942463b5d..0f6a1d407b0faa4089aff54964b7165d683eb518 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Admin_Form extends CRM_Core_Form {
   }
 
   /**
-   * This function sets the default values for the form. MobileProvider that in edit/view mode
+   * This function sets the default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
    * @access public
@@ -112,7 +112,7 @@ class CRM_Admin_Form extends CRM_Core_Form {
    * @access public
    */
   public function buildQuickForm() {
-    if ($this->_action & CRM_Core_Action::VIEW) {
+    if ($this->_action & CRM_Core_Action::VIEW || $this->_action & CRM_Core_Action::PREVIEW) {
       $this->addButtons(array(
           array(
             'type' => 'cancel',
index 0f900b9296f49e7a0e8d933e6eb3da3861768367..74211e0ea06f9f723406f73e3c2321995e05cc8c 100644 (file)
@@ -47,6 +47,8 @@ class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Contact Type'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -153,5 +155,6 @@ class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
         array(1 => $contactType->label)
       ), ts('Saved'), 'success');
   }
+
 }
 
index 8252d55180789d7915c58c896091f97a5b4eeb14..8e8dcf64f5da2515004abffafbfb1ec825425399 100644 (file)
@@ -46,8 +46,8 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
    * @access public
    */
   public function buildQuickForm() {
-
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Location Type'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -70,7 +70,7 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
       'variable'
     );
 
-    $this->add('text', 'display_name', ts('Display Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'display_name'));
+    $this->add('text', 'display_name', ts('Display Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'display_name'), TRUE);
     $this->add('text', 'vcard_name', ts('vCard Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'vcard_name'));
 
     $this->add('text', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'description'));
@@ -127,4 +127,5 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
         array(1 => $locationType->name)
       ), ts('Saved'), 'success');
   }
+
 }
index 34b9ae12afabb1270dad40b65c7a159832742c78..f66de121e333ef51367a758b3d6157a51e92f64d 100644 (file)
@@ -47,6 +47,7 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Mail Account'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -182,5 +183,6 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
       CRM_Core_Session::setStatus("", ts('Changes Not Saved.'), "info");
     }
   }
+
 }
 
index 38b3fcf59209d1cf28c8cb6972fd5eab0b1ff9e9..ae1806af2aa7710ec753152d29b71c1b6f003b2b 100644 (file)
@@ -55,6 +55,8 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
 
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Field Mapping'));
+
     if ($this->_action == CRM_Core_Action::DELETE) {
       return;
     }
@@ -110,6 +112,6 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
       CRM_Core_BAO_Mapping::add($params);
     }
   }
-  //end of function
+
 }
 
index a380f055341defd06c3418ee061a5b6487865846..8282796976e620bf665b06fb1ce225ba558192c9 100644 (file)
@@ -150,6 +150,8 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('%1 Option', array(1 => $this->_gLabel)));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -437,4 +439,5 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form {
       CRM_Core_Session::setStatus(ts('The %1 \'%2\' has been saved.', array(1 => $this->_gLabel, 2 => $optionValue->label)), ts('Saved'), 'success');
     }
   }
+
 }
index 995450231da2f69c4ddb3707d855e0050ba42098..c03c8fc82fa9ed898381fd20261687295e31225c 100644 (file)
@@ -47,9 +47,9 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Relationship Type'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
-
       return;
     }
 
@@ -171,6 +171,6 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form {
       CRM_Core_Session::setStatus(ts('The Relationship Type has been saved.'), ts('Saved'), 'success');
     }
   }
-  //end of function
+
 }
 
index f1812e8db73fe10ece10ce23db12394dcc05d624..5346a4d6c920924f2386c19237bd35e9f4fd7f6b 100644 (file)
@@ -47,12 +47,12 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
    * @access public
    */
   public function buildQuickForm() {
+    $this->setPageTitle($this->_isTagSet ? ts('Tag Set') : ts('Tag'));
+
     if ($this->_action == CRM_Core_Action::DELETE) {
       if ($this->_id && $tag = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $this->_id, 'name', 'parent_id')) {
-        CRM_Core_Session::setStatus(ts("This tag cannot be deleted. You must delete all its child tags ('%1', etc) prior to deleting this tag.", array(1 => $tag)), ts('Sorry'), 'error');
         $url = CRM_Utils_System::url('civicrm/admin/tag', "reset=1");
-        CRM_Utils_System::redirect($url);
-        return TRUE;
+        CRM_Core_Error::statusBounce(ts("This tag cannot be deleted. You must delete all its child tags ('%1', etc) prior to deleting this tag.", array(1 => $tag)), $url);
       }
     }
     else {
@@ -65,7 +65,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
         $this->_isTagSet = TRUE;
       }
 
-      $allTag = array('' => '- ' . ts('select') . ' -') + CRM_Core_BAO_Tag::getTagsNotInTagset();
+      $allTag = array('' => ts('- select -')) + CRM_Core_BAO_Tag::getTagsNotInTagset();
 
       if ($this->_id) {
         unset($allTag[$this->_id]);
@@ -89,7 +89,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
       );
 
       //@lobo haven't a clue why the checkbox isn't displayed (it should be checked by default
-      $this->add('checkbox', 'is_selectable', ts("If it's a tag or a category"));
+      $this->add('checkbox', 'is_selectable');
 
       $isReserved = $this->add('checkbox', 'is_reserved', ts('Reserved?'));
 
@@ -159,6 +159,6 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
       CRM_Core_Session::setStatus(ts('The tag \'%1\' has been saved.', array(1 => $tag->name)), ts('Saved'), 'success');
     }
   }
-  //end of function
+
 }
 
index 95c1ed9eb37e2f3fd979e9d213db7e10f8ad5a0d..ac9bb3587f82b4db4bcf408ad2255c88ac0a33f1 100644 (file)
@@ -38,6 +38,8 @@
  */
 class CRM_Admin_Page_Mapping extends CRM_Core_Page_Basic {
 
+  public $useLivePageJS = TRUE;
+
   /**
    * The action links that we need to display for the browse screen
    *
index 5706c0a9bb30f7e0d852bf97952dabec099f545a..2c83b33a8730a215f6a9dc0a9cf4cd0a81f56bb9 100644 (file)
@@ -81,9 +81,6 @@ class CRM_Case_Page_Tab extends CRM_Core_Page {
       else {
         CRM_Contact_Page_View::checkUserPermission($this);
       }
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
     else {
       if ($this->_action & CRM_Core_Action::VIEW) {
index 16b703190d69ec43c4f7208c4c03a3abeb946b5c..2f93f8eb08966a3790e98e4b9cfd793bc7a5ab11 100644 (file)
@@ -3191,7 +3191,7 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id )
    *
    * @param  int     $contactId   contact id.
    *
-   * @return true if present else false.
+   * @return bool true if present else false.
    * @access public
    * @static
    */
index b9eb35da8ee05a8f880298835933f3b4b3fe92fa..b783d0230d8acdf807110d123cc8f7e84d33d13e 100644 (file)
@@ -332,7 +332,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
    *
    * @access public
    *
-   * @return void
+   * @return array
    */
   function setDefaultValues() {
     $defaults = array();
index 0c3918fa2113abf5c7e1bb09d91b6b83845645d4..5eb487817e2a00e2b3cc0d545204846c4913bc6f 100644 (file)
@@ -59,9 +59,6 @@ class CRM_Contact_Form_Task_SMS extends CRM_Contact_Form_Task {
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
 
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE);
-    if ($cid) {
-      CRM_Contact_Page_View::setTitle($cid);
-    }
 
     CRM_Contact_Form_Task_SMSCommon::preProcessProvider($this);
 
index 9e27fc6b8bf996d382a1eb13099ebcf21b075fe1..a8ff5d513d1a527e36b7e105980dd4ff9d994465 100644 (file)
@@ -60,11 +60,7 @@ class CRM_Contact_Page_Inline_ContactName extends CRM_Core_Page {
     $this->assign('title', $title);
 
     // Check if this is default domain contact CRM-10482
-    if (CRM_Contact_BAO_Contact::checkDomainContact($contactId)) {
-      $this->assign('domainContact', TRUE);
-    } else {
-      $this->assign('domainContact', FALSE);
-    }
+    $this->assign('domainContact', CRM_Contact_BAO_Contact::checkDomainContact($contactId));
 
     // check logged in user permission
     CRM_Contact_Page_View::checkUserPermission($this, $contactId);
index 6ab9c26692af863654cb14e9eeab6fe2e6251f8c..8a9e8ca44f026cd36c6b993e6442c14ac18953e1 100644 (file)
@@ -208,9 +208,6 @@ class CRM_Contact_Page_View_Note extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
     CRM_Utils_System::setTitle(ts('Notes for') . ' ' . $displayName);
 
index 3738957ff30e63e5afd54fa9831fc46260110db2..944a373f1332cacb7d9d297e3ca9c9a9048a1171 100644 (file)
@@ -198,9 +198,6 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->assign('action', $this->_action);
   }
index cfefe62ec1350d9bbff73cddf1892aa13cd33ed8..34420056ca3c4bb732581a2f07c56d0ad0494b64 100644 (file)
@@ -331,16 +331,11 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $this->assign('lineItem', empty($this->_lineItems) ? FALSE : $this->_lineItems);
 
     // Set title
-    if ($this->_contactID) {
-      $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactID);
-
-      // Check if this is default domain contact CRM-10482
-      if (CRM_Contact_BAO_Contact::checkDomainContact($this->_contactID)) {
-        $displayName .= ' (' . ts('default organization') . ')';
-      }
-
-      // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-      CRM_Utils_System::setTitle(ts('Contribution from') . ' ' . $displayName);
+    if ($this->_mode) {
+      $this->setPageTitle($this->_ppID ? ts('Credit Card Pledge Payment') : ts('Credit Card Contribution'));
+    }
+    else {
+      $this->setPageTitle($this->_ppID ? ts('Pledge Payment') : ts('Contribution'));
     }
 
     if ($this->_id) {
index 0787a131b656d05b855bcc95741f975694d51c69..4c9c34bbdf75361b42d20322bf8eed2dc7d56393 100644 (file)
@@ -93,36 +93,15 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
    * @access public
    */
   public function buildQuickForm() {
-    //parent::buildQuickForm( );
+    parent::buildQuickForm( );
+    $this->setPageTitle(ts('Premium Product'));
 
     if ($this->_action & CRM_Core_Action::PREVIEW) {
       CRM_Contribute_BAO_Premium::buildPremiumPreviewBlock($this, $this->_id);
-
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Done with Preview'),
-            'isDefault' => TRUE,
-          ),
-        )
-      );
-
       return;
     }
 
     if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
       return;
     }
 
@@ -210,19 +189,6 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
 
     $this->addFormRule(array('CRM_Contribute_Form_ManagePremiums', 'formRule'));
 
-    $this->addButtons(array(
-        array(
-          'type' => 'upload',
-          'name' => ts('Save'),
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
-
     $this->assign('productId', $this->_id);
   }
 
@@ -420,5 +386,6 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
     $config = CRM_Core_Config::singleton();
     return $config->imageUploadURL.basename($newFilename);
   }
+
 }
 
index c9056a964f3d872c8bcb634f3f19baa818067ae7..be2c84832fe95d9730794e506157737dafccc610 100644 (file)
@@ -81,9 +81,6 @@ class CRM_Contribute_Page_ContributionRecur extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $this->assign('action', $this->_action);
 
     if ($this->_permission == CRM_Core_Permission::EDIT && !CRM_Core_Permission::check('edit contributions')) {
index 94d7adf2acf612fb63ab1d70d22df2bdd1e4db0a..c63ae358cf635297480b17a805e054fccfa4311d 100644 (file)
@@ -259,9 +259,6 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
     $this->assign('action', $this->_action);
 
index 562d3fe970d002599be243bb7753c12a39217162..13a097844bd0b6b961a3c4034a855caf4206667a 100644 (file)
@@ -1674,5 +1674,27 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   function allowAjaxSubmit() {
     $this->removeAttribute('data-no-ajax-submit');
   }
+
+  /**
+   * Sets page title based on entity and action
+   * @param string $entityLabel
+   */
+  function setPageTitle($entityLabel) {
+    switch ($this->_action) {
+      case CRM_Core_Action::ADD:
+        CRM_Utils_System::setTitle(ts('New %1', array(1 => $entityLabel)));
+        break;
+      case CRM_Core_Action::UPDATE:
+        CRM_Utils_System::setTitle(ts('Edit %1', array(1 => $entityLabel)));
+        break;
+      case CRM_Core_Action::VIEW:
+      case CRM_Core_Action::PREVIEW:
+        CRM_Utils_System::setTitle(ts('View %1', array(1 => $entityLabel)));
+        break;
+      case CRM_Core_Action::DELETE:
+        CRM_Utils_System::setTitle(ts('Delete %1', array(1 => $entityLabel)));
+        break;
+    }
+  }
 }
 
index 49543efc04a57b1f03c3fd2dd6043bbdd2b5defe..cd7c6dc75d288d2b2ece596a436a61b53e7aebcf 100644 (file)
@@ -69,9 +69,8 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
     CRM_Core_BAO_CustomField::retrieve($params, $defaults);
 
     $this->_title = CRM_Utils_Array::value('label', $defaults);
-    $this->assign('title', $this->_title);
 
-    CRM_Utils_System::setTitle(ts('Confirm Custom Field Delete'));
+    CRM_Utils_System::setTitle(ts('Delete %1', array(1 => $this->_title)));
   }
 
   /**
index 4c368c8ae29f618785747b62877640ee49f5cae9..cce4f2b9584106e1278dab62d982cbf0e96f383f 100644 (file)
@@ -280,7 +280,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
   public function buildQuickForm() {
     if ($this->_gid) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $this->_gid, 'title');
-      CRM_Utils_System::setTitle($this->_title . ' - ' . ($this->_id ? ts('Edit Field') : ts('Add Field')));
+      CRM_Utils_System::setTitle($this->_title . ' - ' . ($this->_id ? ts('Edit Field') : ts('New Field')));
       $this->assign('gid', $this->_gid);
     }
 
index 0085da336878ab01b457c033d2c8d915bae34e9c..84507d68085838228f4008628cb4070091792833 100644 (file)
@@ -276,7 +276,9 @@ class CRM_Custom_Page_Field extends CRM_Core_Page {
       $groupTitle = CRM_Core_BAO_CustomGroup::getTitle($this->_gid);
       $this->assign('gid', $this->_gid);
       $this->assign('groupTitle', $groupTitle);
-      CRM_Utils_System::setTitle(ts('%1 - Custom Fields', array(1 => $groupTitle)));
+      if ($action & CRM_Core_Action::BROWSE) {
+        CRM_Utils_System::setTitle(ts('%1 - Custom Fields', array(1 => $groupTitle)));
+      }
     }
 
     // assign vars to templates
index fdfb16e1d0f308860a2148505fafa05f4f531582..ef44f134932292c7e8f5184d86dc8d2b32f69754 100644 (file)
@@ -218,8 +218,10 @@ class CRM_Event_Form_Participant extends CRM_Contact_Form_Task {
     if ($this->_contactId) {
       $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
       $this->assign('displayName', $displayName);
-      // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-      CRM_Utils_System::setTitle(ts('Event Registration for') .  ' ' . $displayName);
+      $this->setPageTitle(ts('Event Registration for %1', array(1 => $displayName)));
+    }
+    else {
+      $this->setPageTitle(ts('Event Registration'));
     }
 
     // check the current path, if search based, then dont get participantID
index 9d971eba4460b9fcc985bf0b0bfb7330ae4ddc74..8a8ab7bb7aa49dfc5aa115a3445608db02d90d8f 100644 (file)
@@ -135,9 +135,6 @@ class CRM_Event_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
 
     $this->assign('action', $this->_action);
index a04b33276fdbd33cfd06eba40e5918cdcc4d2d42..25bb3167549e3bf9b6abf0744445aa34027a734a 100644 (file)
@@ -68,12 +68,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
         $this->_isARFlag = TRUE;
         if ($this->_action & CRM_Core_Action::DELETE) {
           $msg = ts("The selected financial account cannot be deleted because at least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance).");
-          if (CRM_Utils_Array::value('snippet', $_REQUEST) == 'json') {
-            CRM_Core_Page_AJAX::returnJsonResponse($msg);
-          }
-          CRM_Core_Session::setStatus($msg, '', 'error');
-          CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialAccount',
-            "reset=1&action=browse"));
+          CRM_Core_Error::statusBounce($msg);
         }
       }
     }
@@ -87,6 +82,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
    */
   public function buildQuickForm( ) {
     parent::buildQuickForm( );
+    $this->setPageTitle(ts('Financial Account'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -194,4 +190,5 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
       CRM_Core_Session::setStatus(ts('The Financial Account \'%1\' has been saved.', array(1 => $contributionType->name)));
     }
   }
+
 }
index 4bed5d72f63ffeed25fe1d1c72fa4496b94e7d61..4b4846c0336da9d165e4ddc3501f9d224845f8a8 100644 (file)
@@ -90,6 +90,8 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Financial Batch'));
+
     if (isset( $this->_id)) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $this->_id, 'title');
       CRM_Utils_System::setTitle($this->_title .' - '.ts( 'Accounting Batch'));
@@ -315,6 +317,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
       CRM_Core_Error::statusBounce(ts('You dont have permission to %1 this batch'), array(1 => $actionName));
     }
   }
+
 }
 
 
index 1a780db3d658b32e82404d75f29afa1015735997..7d75bfefe6e4ba54a2c6867bf2b37b01534a70e2 100644 (file)
@@ -48,11 +48,11 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Financial Type'));
 
     $this->_id = CRM_Utils_Request::retrieve('id' , 'Positive', $this);
     if ($this->_id) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_id, 'name');
-      CRM_Utils_System::setTitle($this->_title . ' - ' . ts( 'Financial Type'));
     }
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -129,4 +129,5 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
       $session->replaceUserContext($url);
     }
   }
+
 }
index 00fcecc4714f50b1d54750b12c8e015a0607d74e..fc907db9e21706c705e230e563d4179195b03c6b 100644 (file)
@@ -127,24 +127,13 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
    * @access public
    */
   public function buildQuickForm() {
+    parent::buildQuickForm();
+    $this->setPageTitle(ts('Financial Type Account')););
+
     if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-        array(
-          'type' => 'next',
-          'name' => ts('Delete Financial Account Type'),
-          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-          'isDefault' => TRUE
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'))
-        )
-      );
       return;
     }
 
-    parent::buildQuickForm();
-
     if (isset($this->_id)) {
       $params = array('id' => $this->_id);
       CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, $defaults);
@@ -351,6 +340,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
         "reset=1&action=browse&aid={$this->_aid}"));
     }
   }
+
 }
 
 
index eac98fec4af4929e4e833e26a12e908b8617a19d..1c8c6a90d2750c6d00d5e77184d2d92b53bc78c0 100644 (file)
@@ -90,6 +90,8 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form {
       CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
     }
 
+    $this->setPageTitle(ts('Grant'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -123,7 +125,6 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form {
       return CRM_Custom_Form_CustomData::setDefaultValues($this);
     }
 
-    $defaults = array();
     $defaults = parent::setDefaultValues();
 
     if ($this->_action & CRM_Core_Action::DELETE) {
index 859343647aadb5edbf100c8d26328a6093815f72..1b0fc3b7972533b819e95c79517376e65880a00d 100644 (file)
@@ -117,6 +117,8 @@ class CRM_Grant_Form_GrantView extends CRM_Core_Form {
     CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
 
     $this->assign('id', $this->_id);
+
+    $this->setPageTitle(ts('Grant'));
   }
 
   /**
index 03518b187fd6e5990227fc088e44e261b6c70ed4..0094dcdc170eedd5e7eb13df39049138e090d3b7 100644 (file)
@@ -122,9 +122,6 @@ class CRM_Grant_Page_Tab extends CRM_Contact_Page_View {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Utils_System::setTitle(ts('Grant by') .  ' ' . $displayName);
     }
     $this->assign('action', $this->_action);
 
index 70112e1daf9700ded04d1064db2a5755cd129de7..d481ac9483006c42da9c586895842e83532d8ec8 100644 (file)
@@ -209,13 +209,10 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co
       );
 
       if ($cid) {
-        $deleteExtra = ts('Are you sure you want to delete this grant?');
-
         $delLink = array(
           CRM_Core_Action::DELETE => array('name' => ts('Delete'),
             'url' => 'civicrm/contact/view/grant',
             'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=grant' . $extraParams,
-            'extra' => 'onclick = "if (confirm(\'' . $deleteExtra . '\') ) this.href+=\'&amp;confirmed=1\'; else return false;"',
             'title' => ts('Delete Grant'),
           ),
         );
@@ -224,7 +221,6 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co
     }
     return self::$_links;
   }
-  //end of function
 
   /**
    * getter for array of the parameters required for creating pager.
index 3180b299f84669a1a9674a1d4acaf9c147dae36d..a865ddb8a000163d2a1ee267d10cf7342482f7b7 100644 (file)
@@ -269,18 +269,8 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
     $this->assign('onlinePendingContributionId', $this->_onlinePendingContributionId);
     $this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
 
-    // Set title
-    if ($this->_contactID) {
-      $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactID);
-
-      // Check if this is default domain contact CRM-10482
-      if (CRM_Contact_BAO_Contact::checkDomainContact($this->_contactID)) {
-        $displayName .= ' (' . ts('default organization') . ')';
-      }
+    $this->setPageTitle(ts('Membership'));
 
-      // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-      CRM_Utils_System::setTitle(ts('Membership for') . ' ' . $displayName);
-    }
     parent::preProcess();
   }
 
index cc3a1c53bcfb7fd99549cd950061922ff8a264f1..e0de74e80c3a56c54506d530a6e6754d56ba4064 100644 (file)
@@ -197,6 +197,9 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form {
     }
 
     $this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
+
+    CRM_Utils_System::setTitle(ts('Renew Membership'));
+
     parent::preProcess();
   }
 
index 17e0b726e03650c3bc5b5c44dff8136357db3754..4cca8ce15d5ac581b042d85d5b363af5a6d55696 100644 (file)
@@ -53,6 +53,8 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
     $session = CRM_Core_Session::singleton();
     $url = CRM_Utils_System::url('civicrm/admin/member/membershipType', 'reset=1');
     $session->pushUserContext($url);
+
+    $this->setPageTitle(ts('Membership Type'));
   }
 
   /**
index 72e7d2b293918bf69919665a9be739a00072427e..e451396b501b13aab127a895840dcf2fa97b2073 100644 (file)
@@ -297,9 +297,6 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
 
     $this->assign('action', $this->_action);
index eec3f9f32160f574a6ffdc5addf4835d9536d21e..79f23507ad671100afaf3d49aa1bee5ae2df0d39 100644 (file)
@@ -83,11 +83,7 @@ class CRM_Note_Form_Note extends CRM_Core_Form {
     if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
       CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
     }
-
-    // set title to "Note - " + Contact Name
-    $displayName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_entityId, 'display_name');
-    $pageTitle = 'Note - ' . $displayName;
-    $this->assign('pageTitle', $pageTitle);
+    $this->setPageTitle($this->_parentId ? ts('Comment') : ts('Note'));
   }
 
   /**
index c491621b9a8bf89bd0097d7a23f6bced2db19e1d..83b8f2336e04927417d510ed417e8eaa01bb38f6 100644 (file)
@@ -60,6 +60,8 @@ class CRM_Pledge_Form_Payment extends CRM_Core_Form {
     }
 
     $this->_id = CRM_Utils_Request::retrieve('ppId', 'Positive', $this);
+
+    CRM_Utils_System::setTitle(ts('Edit Scheduled Pledge Payment'));
   }
 
   /**
index 6db57883b363a6f6f8d7cecbf2347ad436750cfb..bce71ce4d2df00b09e2b8641de8e959d3f17d850 100644 (file)
@@ -105,14 +105,10 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
         $this->userEmail
       ) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactID);
       $this->assign('displayName', $this->userDisplayName);
-
-      // set title to "Pledge - "+Contact Name
-      $displayName = $this->userDisplayName;
-      $pageTitle = ts('Pledge by'). ' ' . $displayName;
-      $this->assign('pageTitle', $pageTitle);
-      CRM_Utils_System::setTitle($pageTitle);
     }
 
+    $this->setPageTitle(ts('Pledge'));
+
     //build custom data
     CRM_Custom_Form_CustomData::preProcess($this, NULL, NULL, 1, 'Pledge', $this->_id);
     $this->_values = array();
index 6d5ab08dc20fcbb688869e69a07b68b32d66e4b4..56e7462e47c7da008fb4979229e4946daf20ac9c 100644 (file)
@@ -53,8 +53,6 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
 
     if ($this->_action & CRM_Core_Action::UPDATE) {
       $this->edit();
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
     else {
       $pledgeId = CRM_Utils_Request::retrieve('pledgeId', 'Positive', $this);
index 15b9f2f8ff6dc1ed8dc60618aa0f66de787c47a5..68df77e40c9416ececddf5a37301df44244231f4 100644 (file)
@@ -112,9 +112,6 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
 
     $this->assign('action', $this->_action);
index 3870e0dbc54c7b313e3e045bed55701dd7e85259..e0ec35e89f0e69d64c480275ad02ffb1ea63e037 100644 (file)
@@ -96,17 +96,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
 
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
 
-    switch ($this->_action) {
-      case CRM_Core_Action::ADD:
-        CRM_Utils_System::setTitle(ts('Add Price Field'));
-        break;
-      case CRM_Core_Action::UPDATE:
-        CRM_Utils_System::setTitle(ts('Edit Price Field'));
-        break;
-      case CRM_Core_Action::DELETE:
-        CRM_Utils_System::setTitle(ts('Delete Price Field'));
-        break;
-    }
+    $this->setPageTitle(ts('Price Field'));
   }
 
   /**
index 6ec36832fb64c08715ce0246aa84068bcc0572a2..753039b1593da4b5d6a96a5ffc66917c3f68fd73 100644 (file)
@@ -43,7 +43,7 @@ class CRM_SMS_Form_Provider extends CRM_Core_Form {
 
     $this->_id = $this->get('id');
 
-    CRM_Utils_System::setTitle(ts('Manage - SMS Providers'));
+    $this->setPageTitle(ts('SMS Provider'));
 
     if ($this->_id) {
       $refreshURL = CRM_Utils_System::url('civicrm/admin/sms/provider',
index 87c276cb352724ca9e9bfd0e05353608fab4776e..97a936c763ff711f29f985e3f2220decdbd090d2 100644 (file)
@@ -106,17 +106,8 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     if ($this->_gid) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title');
-      switch ($this->_action) {
-        case CRM_Core_Action::ADD:
-          CRM_Utils_System::setTitle(ts('Add Profile Field'));
-          break;
-        case CRM_Core_Action::UPDATE:
-          CRM_Utils_System::setTitle(ts('Edit Profile Field'));
-          break;
-        case CRM_Core_Action::DELETE:
-          CRM_Utils_System::setTitle(ts('Delete Profile Field'));
-          break;
-      }
+
+      $this->setPageTitle(ts('Profile Field'));
 
       $url = CRM_Utils_System::url('civicrm/admin/uf/group/field',
         "reset=1&action=browse&gid={$this->_gid}"
index b6608bf978f8a8d9cf3736d2e0c05cb50b6ddb14..ad10a2d2f1553b6345c74206ec4fe57f9e142a0b 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing ACL  *}
-<h3>{if $action eq 1}{ts}New ACL{/ts}{elseif $action eq 2}{ts}Edit ACL{/ts}{else}{ts}Delete ACL{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-acl-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
index cce3627d6c94ad1e44b5e9df76963a0d92bab1cb..660de87b81f297a3fde1180c176279510a66c2e4 100644 (file)
@@ -25,7 +25,6 @@
 *}
 {* this template is used for adding/editing Contact Type  *}
 
-<h3>{if $action eq 1}{ts}New Contact Type{/ts}{elseif $action eq 2}{ts}Edit Contact Type{/ts}{else}{ts}Delete Contact Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-contact-type-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
@@ -53,8 +52,8 @@
            {/if}
    </tr>
    <tr class="crm-contact-type-form-block-image_URL">
-      <td class="label">{$form.image_URL.label}</td>
-      <td>{$form.image_URL.html|crmAddClass:'huge40'}{help id="id-image_URL"}</td>
+      <td class="label">{$form.image_URL.label} {help id="id-image_URL"}</td>
+      <td>{$form.image_URL.html|crmAddClass:'huge40'}</td>
    </tr>
    <tr class="crm-contact-type-form-block-description">
      <td class="label">{$form.description.label}
index 945a8df2ee86167347d4df54ac1cd7a449bdef4b..d02a3e89a72debb74b33bb92ce97211071f9f10b 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing location type  *}
-<h3>{if $action eq 1}{ts}New Location Type{/ts}{elseif $action eq 2}{ts}Edit Location Type{/ts}{else}{ts}Delete Location Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-location-type-form-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 {if $action eq 8}
index 7ed52a897aece54fc311fd257891a08fd4235536..67e9adbbeadb2de182f6e470c6509a82e27c31e2 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing email settings.  *}
-<h3>{if $action eq 1}{ts}New Email Settings{/ts}{elseif $action eq 2}{ts}Edit Email Settings{/ts}{else}{ts}Delete Email Settings{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-mail-settings-form-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 {if $action eq 8}
index 6ebb1243d47f6d16dfb4a58821a506be4bc10f71..746fc728025c447010cf6d2b6f78ba4195ee27c2 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing a saved mapping *}
-<h3>{if $action eq 1}{ts}New Tag{/ts}{elseif $action eq 2}{ts}Edit Mapping{/ts}{else}{ts}Delete Mapping{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-mapping-form-block">
     {if $action eq 1 or $action eq 2 }
       <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index 9e456e4e72b64b0325d372dca7d57356de5713c5..6da427ffd1a8ed8c7de745bf37e47bb28291a542 100644 (file)
@@ -23,7 +23,6 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{* this template is used for adding/editing/deleting activity type  *}
 <h3>{if $action eq 1}{ts}New Option Group{/ts}{elseif $action eq 2}{ts}Edit Option Group{/ts}{else}{ts}Delete Option Group{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-admin-optiongroup-form-block">
   <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index 27afc010600b23a7579362182f247f848b5c2205..b08273239ae9ddcdbde7ad2323fbe5e089825795 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing options *}
-<h3>{if $action eq 1}{ts 1=$gLabel}New %1 Option{/ts}{elseif $action eq 8}{ts 1=$gLabel}Delete %1 Option{/ts}{else}{ts 1=$gLabel}Edit %1 Option{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-admin-options-form-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   {if $action eq 8}
index 3c4f97b19c743c6938f22badc36bc228a397728a..fc83e30fb245a2f589a24beef54fa08919a9ee4d 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing relationship types  *}
-<h3>{if $action eq 1}{ts}New Relationship Type{/ts}{elseif $action eq 2}{ts}Edit Relationship Type{/ts}{elseif $action eq 8}{ts}Delete Relationship Type{/ts}{else}{ts}View Relationship Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-relationship-type-form-block">
       <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   {if $action eq 8}
index 301dbb517556400495ec1e521df7f71bf15b3c81..242138abea66b7164641fae98e4d823e55ba6ac6 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing a tag (admin)  *}
-<h3>{if $action eq 1}{ts}New Tag {if $isTagSet}Set{/if}{/ts}{elseif $action eq 2}{ts}Edit Tag {if $isTagSet}Set{/if}{/ts}{else}{ts}Delete Tag {if $isTagSet}Set{/if}{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-tag-form-block">
     {if $action eq 1 or $action eq 2 }
     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index 6a6d707c45464686caaa9a63201ada29bd3c421f..eae3fe1dec3b77aa5e5d9f48bcd4f5fa58215820 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-<div id="help">
-    {ts}CiviCRM comes with 3 basic (built-in) contact types: Individual, Household, and Organization. You can create additional contact types based on these types to further differentiate contacts (for example you might create Student, Parent, Staff, and /or Volunteer types from the basic Individual type...).{/ts} {help id="id-contactSubtype-intro"}
-</div>
-
 {if $action eq 1 or $action eq 2 or $action eq 8}
    {include file="CRM/Admin/Form/ContactType.tpl"}
 {else}
 
+  <div id="help">
+    {ts}CiviCRM comes with 3 basic (built-in) contact types: Individual, Household, and Organization. You can create additional contact types based on these types to further differentiate contacts (for example you might create Student, Parent, Staff, and /or Volunteer types from the basic Individual type...).{/ts} {help id="id-contactSubtype-intro"}
+  </div>
 {if $rows}
 <div>
     {strip}
     {/foreach}
     </table>
     {/strip}
-    {if $action ne 1 and $action ne 2}
-    <div class="action-link">
-  <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contact Type{/ts}</span></a>
-    </div>
-    {/if}
-</div>
-{else}
+  </div>
+  {else}
     <div class="messages status no-popup">
-          <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/ContactType' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are currently no Contact Types entered. You can <a href='%1'>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
-{/if}
+  {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contact Type{/ts}</span></a>
+  </div>
 {/if}
index 747f4a72119b1396fa46dc4d5d0aff3d5590693e..7a07c54b14852289f2332defc24b77931daadc39 100644 (file)
@@ -30,8 +30,8 @@
     {ts}Location types provide convenient labels to differentiate contacts' location(s). Administrators may define as many additional types as appropriate for your constituents (examples might be Main Office, School, Vacation Home...).{/ts}
   </div>
 
-{if $rows}
-<div id="ltype">
+  {if $rows}
+  <div id="ltype">
     {strip}
   {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
     </thead>
     {foreach from=$rows item=row}
     <tr id="location_type-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-entity {if NOT $row.is_active} disabled{/if}">
-        <td class="crm-locationType-name">{$row.name}</td>
-        <td class="crm-locationType-display_name">{$row.display_name}</td>
-        <td class="crm-locationType-vcard_name">{$row.vcard_name}</td>
-        <td class="crm-locationType-description">{$row.description}</td>
-        <td id="row_{$row.id}_status" class="crm-locationType-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
-        <td class="crm-locationType-is_default" >{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
+        <td class="crmf-name">{$row.name}</td>
+        <td class="crmf-display_name crm-editable">{$row.display_name}</td>
+        <td class="crmf-vcard_name">{$row.vcard_name}</td>
+        <td class="crmf-description crm-editable">{$row.description}</td>
+        <td id="row_{$row.id}_status" class="crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
+        <td class="crmf-is_default" >{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
         <td>{$row.action|replace:'xx':$row.id}</td>
     </tr>
     {/foreach}
     </table>
     {/strip}
-
-    {if $action ne 1 and $action ne 2}
-    <div class="action-link">
-  <a href="{crmURL q="action=add&reset=1"}" id="newLocationType" class="button"><span>&raquo; {ts}New Location Type{/ts}</span></a>
-    </div>
-    {/if}
-</div>
-{else}
+  </div>
+  {else}
     <div class="messages status no-popup">
-          <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/locationType' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are no Location Types entered for this Contact. You can <a href='%1'>add one</a>.{/ts}
+        <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+        {ts}None found.{/ts}
     </div>
-{/if}
+  {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" id="newLocationType" class="button"><span><div class="icon add-icon"></div>{ts}Add Location Type{/ts}</span></a>
+  </div>
 {/if}
index 38f05ca10731947a465f05c5beac3dc6e23347dd..ba0111f4bdf98e56efc7b65698531ec5a003398d 100644 (file)
       </table>
     {/strip}
 
-    {if $action ne 1 and $action ne 2}
-      <div class="action-link">
-        <a href="{crmURL q="action=add&reset=1"}" id="newMailSettings" class="button"><span><div class="icon add-icon"></div>{ts}Add Mail Account{/ts}</span></a>
-      </div>
-    {/if}
   </div>
 </div>
 {else}
     <div class="messages status no-popup">
-        <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/mailSettings' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are no Mail Settings present. You can <a href='%1'>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
 {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" id="newMailSettings" class="button"><span><div class="icon add-icon"></div>{ts}Add Mail Account{/ts}</span></a>
+  </div>
 {/if}
index b68715bead9c9d10961ae5c130de216e3e089851..d75725c4a06de9e08fd122638cc7c2dbd9ae858c 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="crm-content-block crm-block">
 {if $rows}
-{if $action ne 1 and $action ne 2 and $isLocked ne 1}
+{if $isLocked ne 1}
     <div class="action-link">
         <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
     </div>
         {include file="CRM/common/crmeditable.tpl"}
         {/strip}
 
-        {if $action ne 1 and $action ne 2 and $isLocked ne 1}
-            <div class="action-link">
-                <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
-            </div>
-        {/if}
 </div>
 {else}
     <div class="messages status no-popup">
-         <div class="icon inform-icon"></div>
-        {capture assign=link}class="action-item" href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}"{/capture}
-        {ts 1=$link}There are no option values entered. You can <a %1>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
 {/if}
+  {if $isLocked ne 1}
+    <div class="action-link">
+      <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
+    </div>
+  {/if}
 </div>
 {/if}
index 99fc3f0e403a8f0351bcfe147a56e3e7cb9aba53..827219de275fa94cff3ef955e27605a73ed710fb 100644 (file)
         </table>
         {/strip}
 
-        {if !($action eq 1 and $action eq 2)}
-            <div class="action-link">
-              <a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
-            </div>
-        {/if}
 </div>
 {else}
     <div class="messages status no-popup">
-        <div class="icon inform-icon"></div>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/reltype' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are no relationship types present. You can <a href='%1'>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
 {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
+  </div>
 {/if}
index 2bcf2d167c4df4e0d9afe251dce6ce5e71e53ffb..f43d8236d6c1c289e55b182b0518c4fd00d5b579 100644 (file)
@@ -26,7 +26,6 @@
 <div class="view-content">
 {if $action eq 4}{* when action is view  *}
     {if $notes}
-        <h3>{ts}View Note{/ts}</h3>
         <div class="crm-block crm-content-block crm-note-view-block">
           <table class="crm-info-panel">
             <tr><td class="label">{ts}Subject{/ts}</td><td>{$note.subject}</td></tr>
         </div>
         {/if}
 {elseif $action eq 1 or $action eq 2} {* action is add or update *}
-    <h3>
-        {if $parentId}
-            {if $action eq 1}{ts}New Comment{/ts}{else}{ts}Edit Comment{/ts}{/if}
-        {else}
-            {if $action eq 1}{ts}New Note{/ts}{else}{ts}Edit Note{/ts}{/if}
-        {/if}
-    </h3>
   <div class="crm-block crm-form-block crm-note-form-block">
     <div class="content crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
         <table class="form-layout">
     </div>
 {/if}
 {if ($action eq 8)}
-<fieldset><legend>{ts}Delete Note{/ts}</legend>
 <div class=status>{ts 1=$notes.$id.note}Are you sure you want to delete the note '%1'?{/ts}</div>
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
-</fieldset>
 
 {/if}
 
index df3efb4a9b3195334cdf3a100a63e6e61ddc67bc..d80e90319965c99c40d12c111b196bfe403f0955 100644 (file)
   {include file="CRM/Contribute/Form/AdditionalInfo/$formType.tpl"}
 {else}
 
-  {if $contributionMode}
-  <h3>{if $ppID}{ts}Credit Card Pledge Payment{/ts}{else}{ts}Credit Card Contribution{/ts}{/if}</h3>
-    {elseif $context NEQ 'standalone'}
-  <h3>{if $action eq 1 or $action eq 1024}{if $ppID}{ts}Pledge Payment{/ts}{else}{ts}New Contribution{/ts}{/if}{elseif $action eq 8}{ts}Delete Contribution{/ts}{else}{ts}Edit Contribution{/ts}{/if}</h3>
-  {/if}
-
   <div class="crm-block crm-form-block crm-contribution-form-block">
 
   {if $contributionMode == 'test' }
@@ -75,7 +69,7 @@
       {else}
         {capture assign=ccModeLink}{crmURL p='civicrm/contact/view/contribution' q="reset=1&action=add&context=standalone&mode=live"}{/capture}
       {/if}
-      <span class="action-link crm-link-credit-card-mode">&nbsp;<a class="open-inline crm-hover-button" href="{$ccModeLink}">&raquo; {ts}submit credit card contribution{/ts}</a></span>
+      <span class="action-link crm-link-credit-card-mode">&nbsp;<a class="open-inline crm-hover-button action-item" href="{$ccModeLink}">&raquo; {ts}submit credit card contribution{/ts}</a></span>
     {/if}
   </div>
   {if $isOnline}{assign var=valueStyle value=" class='view-value'"}{else}{assign var=valueStyle value=""}{/if}
index d13cf73fb3e053793e5c198e6f12d1c7195e035a..783b0a98d2b5df427348b923eddf80ccc8224283 100644 (file)
@@ -24,8 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 <div class="crm-block crm-content-block crm-contribution-view-form-block">
-<h3>{ts}View Contribution{/ts}</h3>
-
 <div class="action-link">
   <div class="crm-submit-buttons">
     {if call_user_func(array('CRM_Core_Permission','check'), 'edit contributions')}
index 3a55d415edfba4bc3241907efc6ee665d31848b9..28f2657f1b0a5a17f2d45928a92d7d72574dae09 100644 (file)
@@ -24,9 +24,7 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting premium  *}
-<h3>{if $action eq 1}{ts}New Premium{/ts}{elseif $action eq 2}{ts}Edit Premium{/ts}{elseif $action eq 1024}{ts}Preview a Premium{/ts}{else}{ts}Delete Premium Product{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-contribution-manage_premiums-form-block">
-<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
    {if $action eq 8}
       <div class="messages status no-popup">
           <div class="icon inform-icon"></div>
@@ -35,6 +33,7 @@
   {elseif $action eq 1024}
      {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="previewPremium"}
   {else}
+     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   <table class="form-layout-compressed">
      <tr class="crm-contribution-form-block-name">
   <td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='name' id=$productId}{/if}
index 72f861217e1b83f060e7a1f9efed0f2f0a45075f..ea2cf56999e385793e6491eae6803432445ee2f4 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for confirmation of delete for a Fields  *}
-<h3>{ts}Delete Custom Field{/ts} - {$title}</h3>
 <div class="crm-block crm-form-block crm-custom-deletefield-form-block">
     <div class="messages status no-popup">
          <div class="icon inform-icon"></div>
index cad2d9da89c68e3e3fad4902676592edb9a74e90..e762821956266fa6d3a9bffc53b993f6cc7515ed 100644 (file)
     {elseif $participantMode == 'live'}
     {assign var=registerMode value="LIVE"}
   {/if}
-  <h3>{if $action eq 1}{ts}New Event Registration{/ts}{elseif $action eq 8}{ts}Delete Event Registration{/ts}{else}{ts}Edit Event Registration{/ts}{/if}</h3>
   <div class="crm-block crm-form-block crm-participant-form-block">
     <div class="view-content">
       {if $participantMode}
       {/if}
 
       {if $action eq 8} {* If action is Delete *}
-        <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
         <div class="crm-participant-form-block-delete messages status no-popup">
           <div class="crm-content">
             <div class="icon inform-icon"></div> &nbsp;
index bc51b308bd58f2c2dae0bae2fe68f9f8847fe282..a83a3d2874385f8c624f94eb588f6629534423e3 100644 (file)
@@ -25,7 +25,6 @@
 *}
 {* View existing event registration record. *}
 <div class="crm-block crm-content-block crm-event-participant-view-form-block">
-    <h3>{ts}View Participant{/ts}</h3>
     <div class="action-link">
         <div class="crm-submit-buttons">
             {if call_user_func(array('CRM_Core_Permission','check'), 'edit event participants')}
index ddc5514cd78ca5bf5b6e35f8d90063677132ff7a..03e8149e80dcf73ae7a3e9344fac4fcdf16ee1ef 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial type  *}
-<h3>{if $action eq 1}{ts}New Financial Account{/ts}{elseif $action eq 2}{ts}Edit Financial Account{/ts}{else}{ts}Delete Financial Account{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-contribution_type-form-block crm-financial_type-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
index 55d7bfb48a50abd45ddbf23ec6bd47b9aa946012..ac12013792b49581c2ba9d0d47053c0f4a0225e8 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial batch  *}
-<h3>{if $action eq 8}
-  {ts}Delete Batch{/ts} - {$batchTitle}
-  {elseif $action eq 1}
-  {ts}Add New Batch{/ts}
-  {elseif $action eq 2}
-  {ts}Edit Batch{/ts} - {$batchTitle}
-  {/if}
-</h3>
 <div class="crm-block crm-form-block crm-financial_type-form-block">
 {if $action eq 8}
   <div class="messages status">
index 2abfad9f2c2c67a50eae67490ea37e9dbcd8c702..6af2ae8be3473f970189b1fd3af421717c9e50b8 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial type  *}
-<h3>{if $action eq 1}{ts}New Financial Type{/ts}{elseif $action eq 2}{ts}Edit Financial Type{/ts}{else}{ts}Delete Financial Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-financial_type-form-block">
    {if $action eq 8}
       <div class="messages status">
index ba5497f18edf2e0c7a2220bc15808eb06393e2b7..1dc67719f4a141c2e76634265af0594f3bce1aa8 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial type  *}
-<h3>{if $action eq 8}{ts}Delete Financial Type Account{/ts}{elseif $action eq 1}{ts}Add New Financial Type Account{/ts}{elseif $action eq 2}{ts}Edit Financial Type Account{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-financial_type-form-block">
   {if $action eq 8}
     <div class="messages status">
index ac5cf62769c16e45e09c62c2ef8dcd1651b93cc9..7abe7e6b93108841234171bb4a003b048ddc62a3 100644 (file)
   {include file="CRM/Custom/Form/CustomData.tpl"}
 {else}
 
-{if $action eq 1 and $context ne 'standalone'}
-   <h3>{ts}New Grant{/ts}</h3>
-{elseif $action eq 2}
-   <h3>{ts}Edit Grant{/ts}</h3>
-{elseif $action eq 8}
-   <h3>{ts}Delete Grant{/ts}</h3>
-{/if}
-
 <div class="crm-block crm-form-block crm-grant-form-block">
   {if $action eq 8}
      <div class="messages status">
index 07797d1bfad6ef9f49ee4d3d01a47bd1a417792d..58554e8f1d7bf230e5df20347369f0ec0573d49b 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for viewing grants *}
-<h3>{ts}View Grant{/ts}</h3>
 <div class="crm-block crm-content-block crm-grant-view-block">
     <div class="crm-submit-buttons">
         {if call_user_func(array('CRM_Core_Permission','check'), 'edit grants')}
index fad591f3c161e75e4347267f37f8d1e8424dd278..0ff485622cbe4960da746f23d9090c488348308d 100644 (file)
@@ -61,9 +61,6 @@
     <p>{ts}You will not be able to send an automatic email receipt for this Membership because there is no email address recorded for this contact. If you want a receipt to be sent when this Membership is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the Membership.{/ts}</p>
   </div>
   {/if}
-  {if $context NEQ 'standalone'}
-  <h3>{if $action eq 1}{ts}New Membership{/ts}{elseif $action eq 2}{ts}Edit Membership{/ts}{else}{ts}Delete Membership{/ts}{/if}</h3>
-  {/if}
   {if $membershipMode}
   <div id="help">
     {ts 1=$displayName 2=$registerMode}Use this form to submit Membership Record on behalf of %1. <strong>A %2 transaction will be submitted</strong> using the selected payment processor.{/ts}
index c817bef7b206ffc29eebca1a3404aefa7f97c460..a8331a63ffa3eca27d8594fb5309f24e6091738e 100644 (file)
@@ -54,7 +54,6 @@
             if you want to cancel the automatic renewal option.{/ts}</p>
       </div>
     {/if}
-    <h3>{ts}Renew Membership{/ts}</h3>
   {/if}
   <div class="crm-block crm-form-block crm-member-membershiprenew-form-block">
     <div id="help" class="description">
index 214daf71b165adb0c413a968003041f21d832b7c..495e4e0ed2fd642c7ea47cf1110a9b7d2cad7d33 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting membership type  *}
-<h3>{if $action eq 1}{ts}New Membership Type{/ts}{elseif $action eq 2}{ts}Edit Membership Type{/ts}{else}{ts}Delete Membership Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-membership-type-form-block">
 
-  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   <div class="form-item" id="membership_type_form">
   {if $action eq 8}
     <div class="messages status no-popup">
@@ -35,6 +33,7 @@
     </div>
     <div> {include file="CRM/common/formButtons.tpl"}</div>
   {else}
+    <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
     <table class="form-layout-compressed">
       <tr class="crm-membership-type-form-block-name">
         <td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_type' field='name' id=$membershipTypeId}{/if}
index 5ea03f4b25b4859cd42edd01cf79c8e1968edcd0..c68b17f459352aac8bd093f4df8070d54a78b475 100644 (file)
@@ -25,7 +25,6 @@
 *}
 {* View existing membership record. *}
 <div class="crm-block crm-content-block crm-membership-view-form-block">
-    <h3>{ts}View Membership{/ts}</h3>
     <div class="crm-submit-buttons">
         {* Check permissions and make sure this is not an inherited membership (edit and delete not allowed for inherited memberships) *}
         {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships') }
index d92d3e63e42826240c44c76a1e7c50aa2492a5e1..e7386081b683c9ed4ecbb3b23d62c26841378cfa 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for updating pledge payment*}
-<h3>{ts}Edit Scheduled Pledge Payment{/ts}</h3>
 <div class="crm-block crm-form-block crm-pledge-payment-form-block">
       <table class="form-layout-compressed">
         <tr><td class="label">{ts}Status{/ts}</td><td class="form-layout">{$status}</td></tr>
index 2052ba67225610512fd635079a45bab0a76cc406..959321c54127e82f708b1c0aa262b3580c7cf400 100644 (file)
         <p>{ts}You will not be able to send an acknowledgment for this pledge because there is no email address recorded for this contact. If you want a acknowledgment to be sent when this pledge is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the pledge.{/ts}</p>
 </div>
 {/if}
-{if $action EQ 1}
-    <h3>{ts}New Pledge{/ts}</h3>
-{elseif $action EQ 2}
-    <h3>{ts}Edit Pledge{/ts}</h3>
+{if $action EQ 2}
     {* Check if current Total Pledge Amount is different from original pledge amount. *}
     {math equation="x / y" x=$amount y=$installments format="%.2f" assign="currentInstallment"}
     {* Check if current Total Pledge Amount is different from original pledge amount. *}
     {if $currentInstallment NEQ $eachPaymentAmount}
       {assign var=originalPledgeAmount value=`$installments*$eachPaymentAmount`}
     {/if}
-{elseif $action EQ 8}
-    <h3>{ts}Delete Pledge{/ts}</h3>
 {/if}
 <div class="crm-block crm-form-block crm-pledge-form-block">
  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index bc6a6bcccb58c8bb22c7579e983437384da27512..99416468d8923038f2db81177075a3ffcc86b7de 100644 (file)
@@ -29,7 +29,6 @@
     {assign var=originalPledgeAmount value=`$installments*$original_installment_amount`}
 {/if}
 
-<h3>{ts}View Pledge{/ts}</h3>
 <div class="crm-block crm-content-block crm-pledge-view-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 <table class="crm-info-panel">
index 1d303920c54ccb54d3b4941dc26239c9925f5548..b87b1535c40503a99bbfbdf3f0e96e63bb71309a 100644 (file)
     <td {if ! ($permission EQ 'edit' and ($row.status eq 'Pending' or $row.status eq 'Overdue' or $row.status eq 'Completed')) } colspan="2"{/if} >{$row.label}</td>
 {if $context neq user}
     {if $permission EQ 'edit' and ($row.status eq 'Pending' or $row.status eq 'Overdue' or $row.status eq 'Completed') }
-        <td>
+        <td class="nowrap">
         {if $row.status eq 'Completed'} {* Link to view contribution record for completed payment.*}
             {capture assign=viewContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&id=`$row.contribution_id`&cid=`$contactId`&action=view&context=`$context`"}{/capture}
-            {ts 1=$viewContribURL}<a href='%1'>View Payment</a>{/ts}
+            <a class="crm-hover-button action-item" href="{$viewContribURL}">{ts}View Payment{/ts}</a>
         {else} {* Links to record / submit a payment. *}
             {capture assign=newContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=`$context`&ppid=`$row.id`"}{/capture}
-            {ts 1=$newContribURL}<a href='%1'>Record Payment (Check, Cash, EFT ...)</a>{/ts}
+            <a class="crm-hover-button action-item" href="{$newContribURL}">{ts}Record Payment{/ts}</a>
             {if $newCredit}
-              <br/>
               {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&ppid=`$row.id`&context=`$context`&mode=live"}{/capture}
-              {ts 1=$newCreditURL}<a href='%1'>Submit Credit Card Payment</a>{/ts}
+              <a class="crm-hover-button action-item" href="{$newCreditURL}">{ts}Credit Card Payment{/ts}</a>
             {/if}
-            <br/>
             {capture assign=editURL}{crmURL p="civicrm/pledge/payment" q="reset=1&action=update&cid=`$contactId`&context=`$context`&ppId=`$row.id`"}{/capture}
-            {ts 1=$editURL}<a href='%1'>Edit Scheduled Payment</a>{/ts}
+            <a class="crm-hover-button action-item" href="{$editURL}">{ts}Edit Scheduled Payment{/ts}</a>
         {/if}
         </td>
     {/if}
index a27b1360cceb222f4bb46161bc7bdb841aad988b..6b0cc328ec0df257bb3421c498679497497ff48c 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* This template is used for adding/configuring SMS Providers  *}
-<h3>{if $action eq 1}{ts}New Provider{/ts}{elseif $action eq 2}{ts}Edit Provider{/ts}{else}{ts}Delete Provider{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-job-form-block">
  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 
index 3a6f0b232f269ba632ecedf2661b3dc0d96f158e..fe074894a6555c52be3d59716247ceed2aecf188 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{capture assign=wikiLink}{docURL page="Setting up a SMS Provider for CiviSMS" text="(How to add a SMS Provider)" resource="wiki"}{/capture}
-<div id="help">
-    {ts}You can configure one or more SMS Providers for your CiviCRM installation. To learn more about the procedure to install SMS extension and Provider, refer{/ts} {$wikiLink}
-</div>
 {if $action eq 1 or $action eq 2 or $action eq 8}
    {include file="CRM/SMS/Form/Provider.tpl"}
 {else}
+  {capture assign=wikiLink}{docURL page="Setting up a SMS Provider for CiviSMS" text="(How to add a SMS Provider)" resource="wiki"}{/capture}
+  <div id="help">
+    {ts}You can configure one or more SMS Providers for your CiviCRM installation. To learn more about the procedure to install SMS extension and Provider, refer{/ts} {$wikiLink}
+  </div>
 
   {if $rows}
 
-      {if $action ne 1 and $action ne 2}
-        <div class="action-link">
-          <a href="{crmURL q="action=add&reset=1"}" id="newProvider" class="button"><span><div class="icon add-icon"></div>{ts}Add New Provider{/ts}</span></a>
-       </div>
-      {/if}
-
-<div id="ltype">
+  <div id="ltype">
     {strip}
         {* handle enable/disable actions*}
        {include file="CRM/common/enableDisableApi.tpl"}
         {/foreach}
         </table>
     {/strip}
-</div>
-{elseif $action ne 1}
+  </div>
+  {else}
     <div class="messages status no-popup">
       <div class="icon inform-icon"></div>
-        {ts}There are no providers configured.{/ts}
-     </div>
-     <div class="action-link">
-       <a href="{crmURL p='civicrm/admin/sms/provider' q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add SMS Provider{/ts}</span></a>
+        {ts}None found.{/ts}
      </div>
 
-{/if}
+  {/if}
+  <div class="action-link">
+    <a href="{crmURL p='civicrm/admin/sms/provider' q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add SMS Provider{/ts}</span></a>
+  </div>
 {/if}
index b366ac327adafaad4aff5a990e5ea5857e78b41c..87a87ae62ddba0439cd0ff14645e016318f2a28b 100644 (file)
@@ -63,7 +63,7 @@
     function enableDisable() {
       $row = $(this).closest('.crm-entity');
       info = $(this).crmEditableEntity();
-      fieldLabel = info.label || info.title || info.name || {/literal}'{ts escape="js"}Record{/ts}'{literal};
+      fieldLabel = info.label || info.title || info.display_name || info.name || {/literal}'{ts escape="js"}Record{/ts}'{literal};
       enabled = !$row.hasClass('disabled');
       if (enabled) {
         CRM.confirm({{/literal}