From: Eileen McNaughton Date: Sun, 14 Jun 2015 02:23:11 +0000 (+1200) Subject: CRM-16676 post new-form cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=390827122a8ea3bbe234b0f0e716268c16140ccf;p=civicrm-core.git CRM-16676 post new-form cleanup --- diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index 696dc88404..edb012a731 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -225,12 +225,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { * @return void */ public function preProcess() { - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } CRM_Core_Form_RecurringEntity::preProcess('civicrm_activity'); $this->_atypefile = CRM_Utils_Array::value('atypefile', $_GET); $this->assign('atypefile', FALSE); @@ -526,9 +520,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { * @return void */ public function setDefaultValues() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } $defaults = $this->_values + CRM_Core_Form_RecurringEntity::setDefaultValues(); // if we're editing... @@ -630,10 +621,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { return; } - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } - //build other activity links CRM_Activity_Form_ActivityLinks::commonBuildQuickForm($this); diff --git a/CRM/Campaign/Form/Campaign.php b/CRM/Campaign/Form/Campaign.php index 2fe34bcc7b..c2dcf30314 100644 --- a/CRM/Campaign/Form/Campaign.php +++ b/CRM/Campaign/Form/Campaign.php @@ -79,14 +79,6 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form { CRM_Utils_System::permissionDenied(); } - //check for custom data type. - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } - $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this); $this->assign('context', $this->_context); @@ -146,11 +138,6 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form { public function setDefaultValues() { $defaults = $this->_values; - //load only custom data defaults. - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } - if (isset($defaults['start_date'])) { list($defaults['start_date'], $defaults['start_date_time']) = CRM_Utils_Date::setDateDefaults($defaults['start_date'], 'activityDateTime'); @@ -209,10 +196,6 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form { $this->applyFilter('__ALL__', 'trim'); - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } - //lets assign custom data type and subtype. $this->assign('customDataType', 'Campaign'); $this->assign('entityID', $this->_campaignId); diff --git a/CRM/Campaign/Form/Petition.php b/CRM/Campaign/Form/Petition.php index ff73aee969..9b9c6c75cc 100644 --- a/CRM/Campaign/Form/Petition.php +++ b/CRM/Campaign/Form/Petition.php @@ -67,13 +67,6 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { } } - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } - // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { CRM_Custom_Form_CustomData::preProcess($this); diff --git a/CRM/Campaign/Form/Survey/Main.php b/CRM/Campaign/Form/Survey/Main.php index c855a78262..71024ca0f3 100644 --- a/CRM/Campaign/Form/Survey/Main.php +++ b/CRM/Campaign/Form/Survey/Main.php @@ -73,13 +73,6 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey { CRM_Utils_System::setTitle(ts('Configure Survey') . ' - ' . $this->_surveyTitle); } - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } - // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { CRM_Custom_Form_CustomData::preProcess($this); @@ -115,9 +108,6 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey { * array of default values */ public function setDefaultValues() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } $defaults = $this->_values; @@ -151,9 +141,6 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey { * @return void */ public function buildQuickForm() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } $this->add('text', 'title', ts('Title'), CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey', 'title'), TRUE); diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index ecb4047ee6..3d2437acee 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -87,10 +87,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { $scheduleStatusId = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name'); $this->assign('scheduleStatusId', $scheduleStatusId); - if ($this->_cdType) { - return $result; - } - if (!$this->_caseId && $this->_activityId) { $this->_caseId = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseActivity', $this->_activityId, 'case_id', 'activity_id' @@ -245,11 +241,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { } $this->assign('targetContactValues', empty($targetContactValues) ? FALSE : $targetContactValues); - //return form for ajax - if ($this->_cdType) { - return $this->_defaults; - } - if (isset($this->_encounterMedium)) { $this->_defaults['medium_id'] = $this->_encounterMedium; } @@ -290,10 +281,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { return; } - if ($this->_cdType) { - return $result; - } - $this->assign('urlPath', 'civicrm/case/activity'); $encounterMediums = CRM_Case_PseudoConstant::encounterMedium(); diff --git a/CRM/Case/Form/Case.php b/CRM/Case/Form/Case.php index 30861c118a..f574996246 100644 --- a/CRM/Case/Form/Case.php +++ b/CRM/Case/Form/Case.php @@ -92,12 +92,6 @@ class CRM_Case_Form_Case extends CRM_Core_Form { * @return void */ public function preProcess() { - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } $this->_caseId = CRM_Utils_Request::retrieve('id', 'Positive', $this); @@ -209,7 +203,7 @@ class CRM_Case_Form_Case extends CRM_Core_Form { * @return void */ public function setDefaultValues() { - if ($this->_action & CRM_Core_Action::DELETE || $this->_action & CRM_Core_Action::RENEW || $this->_cdType) { + if ($this->_action & CRM_Core_Action::DELETE || $this->_action & CRM_Core_Action::RENEW) { return TRUE; } $className = "CRM_Case_Form_Activity_{$this->_activityTypeFile}"; @@ -244,9 +238,6 @@ class CRM_Case_Form_Case extends CRM_Core_Form { return; } - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } //need to assign custom data type and subtype to the template $this->assign('customDataType', 'Case'); @@ -302,7 +293,7 @@ class CRM_Case_Form_Case extends CRM_Core_Form { * @return void */ public function addRules() { - if ($this->_action & CRM_Core_Action::DELETE || $this->_action & CRM_Core_Action::RENEW || $this->_cdType) { + if ($this->_action & CRM_Core_Action::DELETE || $this->_action & CRM_Core_Action::RENEW) { return TRUE; } $className = "CRM_Case_Form_Activity_{$this->_activityTypeFile}"; diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php index bbd1dd842d..4b4eba06df 100644 --- a/CRM/Contact/Form/Relationship.php +++ b/CRM/Contact/Form/Relationship.php @@ -103,11 +103,6 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { */ public $_caseId; - /** - * @var mixed - */ - public $_cdType; - /** * Explicitly declare the form context. */ @@ -123,14 +118,6 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { } public function preProcess() { - //custom data related code - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } - $this->_contactId = $this->get('contactId'); $this->_contactType = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_contactId, 'contact_type'); @@ -218,9 +205,6 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { * Set default values for the form. */ public function setDefaultValues() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } $defaults = array(); @@ -279,9 +263,6 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { * Add the rules for form. */ public function addRules() { - if ($this->_cdType) { - return; - } if (!($this->_action & CRM_Core_Action::DELETE)) { $this->addFormRule(array('CRM_Contact_Form_Relationship', 'dateRule')); @@ -292,10 +273,6 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { * Build the form object. */ public function buildQuickForm() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } - if ($this->_action & CRM_Core_Action::DELETE) { $this->addButtons(array( array( diff --git a/CRM/Contribute/Form/AbstractEditPayment.php b/CRM/Contribute/Form/AbstractEditPayment.php index 68a96bcd40..f02446abe7 100644 --- a/CRM/Contribute/Form/AbstractEditPayment.php +++ b/CRM/Contribute/Form/AbstractEditPayment.php @@ -194,11 +194,6 @@ class CRM_Contribute_Form_AbstractEditPayment extends CRM_Contact_Form_Task { protected $_formType; - /** - * @var mystery variable screaming out for documentation - */ - protected $_cdType; - /** * Array of fields to display on billingBlock.tpl - this is not fully implemented but basically intent is the panes/fieldsets on this page should * be all in this array in order like diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index a32d12bfc0..22cc3a22bb 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -154,11 +154,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP protected $_formType; - /** - * @todo what on earth does cdType stand for???? - * @var - */ - protected $_cdType; public $_honoreeProfileType; /** @@ -225,15 +220,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP if (!CRM_Core_Permission::checkActionPermission('CiviContribute', $this->_action)) { CRM_Core_Error::fatal(ts('You do not have permission to access this page.')); } - // @todo - if anyone ever figures out what this _cdType subroutine is about - // (or even if it still applies) please add comments!!!!!!!!!! - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - CRM_Custom_Form_CustomData::preProcess($this); - return; - } parent::preProcess(); @@ -329,11 +315,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP * @return array */ public function setDefaultValues() { - if ($this->_cdType) { - // @todo document when this function would be called in this way - // (and whether it is valid or an overloading of this form). - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } $defaults = $this->_values; @@ -486,11 +467,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP */ public function buildQuickForm() { - //@todo document the purpose of cdType (if still in use) - if ($this->_cdType) { - CRM_Custom_Form_CustomData::buildQuickForm($this); - return; - } $allPanes = array(); $recurJs = NULL; //tax rate from financialType diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index a5b870b401..0379525fd1 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -377,12 +377,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu // Build payment processor form if (empty($_GET['onbehalf'])) { CRM_Core_Payment_ProcessorForm::buildQuickForm($this); - // Return if we are in an ajax - this is probably redundant now as - // processor does not call this form for a snippet anymore - but unsure about - // cdType - if ($this->_snippet) { - return; - } } $config = CRM_Core_Config::singleton(); diff --git a/CRM/Event/Form/ManageEvent/EventInfo.php b/CRM/Event/Form/ManageEvent/EventInfo.php index d41bdd13db..d5483dd8f1 100644 --- a/CRM/Event/Form/ManageEvent/EventInfo.php +++ b/CRM/Event/Form/ManageEvent/EventInfo.php @@ -51,14 +51,7 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { * @return void */ public function preProcess() { - //custom data related code - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } - parent::preProcess(); + parent::preProcess(); if ($this->_id) { $this->assign('entityID', $this->_id); @@ -92,18 +85,6 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { * @return void */ public function setDefaultValues() { - if ($this->_cdType) { - $tempId = (int) CRM_Utils_Request::retrieve('template_id', 'Integer', $this); - // set template custom data as a default for event, CRM-5596 - if ($tempId && !$this->_id) { - $defaults = $this->templateCustomDataValues($tempId); - } - else { - $defaults = CRM_Custom_Form_CustomData::setDefaultValues($this); - } - - return $defaults; - } $defaults = parent::setDefaultValues(); // in update mode, we need to set custom data subtype to tpl @@ -153,9 +134,6 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { * @return void */ public function buildQuickForm() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } //need to assign custom data type and subtype to the template $this->assign('customDataType', 'Event'); if ($this->_eventType) { diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index cd4a5497f6..1645a8ee52 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -279,14 +279,6 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment return CRM_Event_Form_EventFees::preProcess($this); } - //custom data related code - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this, NULL, NULL, NULL, NULL, NULL, TRUE); - } - //check the mode when this form is called either single or as //search task action if ($this->_id || $this->_contactId || $this->_context == 'standalone') { @@ -429,10 +421,6 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment return CRM_Event_Form_EventFees::setDefaultValues($this); } - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } - $defaults = array(); if ($this->_action & CRM_Core_Action::DELETE) { @@ -601,10 +589,6 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment return CRM_Event_Form_EventFees::buildQuickForm($this); } - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } - //need to assign custom data type to the template $this->assign('customDataType', 'Participant'); diff --git a/CRM/Grant/Form/Grant.php b/CRM/Grant/Form/Grant.php index 5dbc078249..a976a3eb95 100644 --- a/CRM/Grant/Form/Grant.php +++ b/CRM/Grant/Form/Grant.php @@ -68,14 +68,6 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form { * @return void */ public function preProcess() { - //custom data related code - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - CRM_Custom_Form_CustomData::preProcess($this); - return; - } $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this); $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this); @@ -124,9 +116,6 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form { * @return array */ public function setDefaultValues() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } $defaults = parent::setDefaultValues(); @@ -178,9 +167,6 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form { * @return void */ public function buildQuickForm() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } if ($this->_action & CRM_Core_Action::DELETE) { $this->addButtons(array( diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 46a327e6eb..3797db6b73 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -173,13 +173,6 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { * @throws \Exception */ public function preProcess() { - //custom data related code - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - return CRM_Custom_Form_CustomData::preProcess($this); - } // This string makes up part of the class names, differentiating them (not sure why) from the membership fields. $this->assign('formClass', 'membership'); parent::preProcess(); @@ -275,9 +268,6 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { * Set default values for the form. */ public function setDefaultValues() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } if ($this->_priceSetId) { return CRM_Price_BAO_PriceSet::setDefaultPriceSet($this, $defaults); @@ -426,9 +416,6 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { * Build the form object. */ public function buildQuickForm() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::buildQuickForm($this); - } $this->assign('taxRates', json_encode(CRM_Core_PseudoConstant::getTaxRates())); diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 0314ba27e4..9b981df44f 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -102,13 +102,6 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { ); public function preProcess() { - //custom data related code - $this->_cdType = CRM_Utils_Array::value('type', $_GET); - $this->assign('cdType', FALSE); - if ($this->_cdType) { - $this->assign('cdType', TRUE); - CRM_Custom_Form_CustomData::preProcess($this); - } // This string makes up part of the class names, differentiating them (not sure why) from the membership fields. $this->assign('formClass', 'membershiprenew'); @@ -160,9 +153,6 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { * Default values. */ public function setDefaultValues() { - if ($this->_cdType) { - return CRM_Custom_Form_CustomData::setDefaultValues($this); - } $defaults = parent::setDefaultValues(); $this->_memType = $defaults['membership_type_id']; @@ -242,9 +232,6 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { * Build the form object. */ public function buildQuickForm() { - if ($this->_cdType) { - CRM_Custom_Form_CustomData::buildQuickForm($this); - } parent::buildQuickForm(); diff --git a/templates/CRM/Activity/Form/Activity.tpl b/templates/CRM/Activity/Form/Activity.tpl index 8d0d60b2be..760acdc5de 100644 --- a/templates/CRM/Activity/Form/Activity.tpl +++ b/templates/CRM/Activity/Form/Activity.tpl @@ -24,9 +24,6 @@ +--------------------------------------------------------------------+ *} {* this template is used for adding/editing other (custom) activities. *} -{if $cdType } - {include file="CRM/Custom/Form/CustomData.tpl"} -{else} {if $action eq 4}
{else} @@ -294,5 +291,5 @@ {/literal} {/if}
{* end of form block*} -{/if} {* end of snippet if*} + {include file="CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl" entityID=$activityId entityTable="civicrm_activity"} diff --git a/templates/CRM/Activity/Form/ActivityLinks.tpl b/templates/CRM/Activity/Form/ActivityLinks.tpl index 28fa38cfb4..8b1b89ed50 100644 --- a/templates/CRM/Activity/Form/ActivityLinks.tpl +++ b/templates/CRM/Activity/Form/ActivityLinks.tpl @@ -24,7 +24,7 @@ +--------------------------------------------------------------------+ *} {* Links for scheduling/logging meetings and calls and Sending Email *} -{if $cdType eq false } + {if $contact_id } {assign var = "contactId" value= $contact_id } {/if} @@ -77,5 +77,3 @@ {/if} - -{/if} diff --git a/templates/CRM/Campaign/Form/Campaign.tpl b/templates/CRM/Campaign/Form/Campaign.tpl index 7b7447b148..a951d6366c 100644 --- a/templates/CRM/Campaign/Form/Campaign.tpl +++ b/templates/CRM/Campaign/Form/Campaign.tpl @@ -25,10 +25,6 @@ *}
-{* load the custom data *} -{if $cdType} - {include file="CRM/Custom/Form/CustomData.tpl"} -{else} {if $action eq 8} @@ -122,7 +118,3 @@ }); {/literal} - - -{/if} {* load custom data *} - diff --git a/templates/CRM/Campaign/Form/Survey/Main.tpl b/templates/CRM/Campaign/Form/Survey/Main.tpl index 93dd5416ad..dbfa34d5cf 100644 --- a/templates/CRM/Campaign/Form/Survey/Main.tpl +++ b/templates/CRM/Campaign/Form/Survey/Main.tpl @@ -24,9 +24,6 @@ +--------------------------------------------------------------------+ *} -{if $cdType } - {include file="CRM/Custom/Form/CustomData.tpl"} -{else}
{include file="CRM/common/formButtons.tpl" location="top"}
{if $action eq 1} @@ -116,5 +113,3 @@ }); {/literal} - -{/if} diff --git a/templates/CRM/Case/Form/Activity.tpl b/templates/CRM/Case/Form/Activity.tpl index a11869b668..763e57fdb9 100644 --- a/templates/CRM/Case/Form/Activity.tpl +++ b/templates/CRM/Case/Form/Activity.tpl @@ -25,9 +25,6 @@ *} {* this template is used for adding/editing activities for a case. *} -{if $cdType } - {include file="CRM/Custom/Form/CustomData.tpl"} -{else}
{if $action neq 8 and $action neq 32768 } @@ -307,4 +304,3 @@ {/literal} {/if}
-{/if} {* end of main if block*} diff --git a/templates/CRM/Case/Form/Case.tpl b/templates/CRM/Case/Form/Case.tpl index a693ee142e..f640c5ab2b 100644 --- a/templates/CRM/Case/Form/Case.tpl +++ b/templates/CRM/Case/Form/Case.tpl @@ -29,10 +29,6 @@ *}
-{if $cdType } - {include file="CRM/Custom/Form/CustomData.tpl"} -{else} - {if $action neq 8 && $action neq 32768}
{include file="CRM/common/formButtons.tpl" location="top"}
{/if} @@ -147,5 +143,4 @@
{include file="CRM/common/formButtons.tpl" location="bottom"}
-{/if}
diff --git a/templates/CRM/Contact/Form/CustomData.tpl b/templates/CRM/Contact/Form/CustomData.tpl index 2181c5febf..f577ee5eef 100644 --- a/templates/CRM/Contact/Form/CustomData.tpl +++ b/templates/CRM/Contact/Form/CustomData.tpl @@ -24,7 +24,7 @@ +--------------------------------------------------------------------+ *} {* this template is used for building tabbed custom data *} -{if $cdType || $postedInfo} +{if $postedInfo} {include file="CRM/Custom/Form/CustomData.tpl"} {if $multiRecordDisplay eq 'single'}
{$form.buttons.html}
diff --git a/templates/CRM/Contact/Form/Relationship.tpl b/templates/CRM/Contact/Form/Relationship.tpl index a5fe163a18..07aebea94d 100644 --- a/templates/CRM/Contact/Form/Relationship.tpl +++ b/templates/CRM/Contact/Form/Relationship.tpl @@ -24,9 +24,7 @@ +--------------------------------------------------------------------+ *} {* this template is used for adding/editing/viewing relationships *} -{if $cdType } - {include file="CRM/Custom/Form/CustomData.tpl"} -{else} + {if $action eq 4 } {* action = view *}
@@ -204,5 +202,3 @@ {/if}
{include file="CRM/common/formButtons.tpl" location="bottom"}
-{/if} {* close of custom data else*} - diff --git a/templates/CRM/Contact/Page/View/Relationship.tpl b/templates/CRM/Contact/Page/View/Relationship.tpl index addd909c70..b13860cb16 100644 --- a/templates/CRM/Contact/Page/View/Relationship.tpl +++ b/templates/CRM/Contact/Page/View/Relationship.tpl @@ -24,9 +24,7 @@ +--------------------------------------------------------------------+ *} {* Relationship tab within View Contact - browse, and view relationships for a contact *} -{if !empty($cdType) } - {include file="CRM/Custom/Form/CustomData.tpl"} -{elseif $action neq 16} {* add, update or view *} +{if $action neq 16} {* add, update or view *} {include file="CRM/Contact/Form/Relationship.tpl"} {else}
diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index 8471911d09..298fd31674 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -25,9 +25,7 @@ *} {* this template is used for adding/editing/deleting contributions and pledge payments *} -{if $cdType} - {include file="CRM/Custom/Form/CustomData.tpl"} -{elseif $priceSetId} +{if $priceSetId} {include file="CRM/Price/Form/PriceSet.tpl" context="standalone" extends="Contribution"} {elseif $showAdditionalInfo and $formType } {include file="CRM/Contribute/Form/AdditionalInfo/$formType.tpl"} diff --git a/templates/CRM/Event/Form/ManageEvent/EventInfo.tpl b/templates/CRM/Event/Form/ManageEvent/EventInfo.tpl index 01f6a70344..7315df2b11 100644 --- a/templates/CRM/Event/Form/ManageEvent/EventInfo.tpl +++ b/templates/CRM/Event/Form/ManageEvent/EventInfo.tpl @@ -26,9 +26,6 @@ {* Step 1 of New Event Wizard, and Edit Event Info form. *}
-{if $cdType} - {include file="CRM/Custom/Form/CustomData.tpl"} -{else} {assign var=eventID value=$id}
{include file="CRM/common/formButtons.tpl" location="top"} @@ -171,7 +168,6 @@ {include file="CRM/common/showHide.tpl" elemType="table-row"} {include file="CRM/Form/validate.tpl"} -{/if}
{literal} {/literal} -{/if}{* closing of custom data if *} diff --git a/templates/CRM/Pledge/Form/Pledge.tpl b/templates/CRM/Pledge/Form/Pledge.tpl index 9682af08ce..4debf9ff1d 100644 --- a/templates/CRM/Pledge/Form/Pledge.tpl +++ b/templates/CRM/Pledge/Form/Pledge.tpl @@ -24,9 +24,7 @@ +--------------------------------------------------------------------+ *} {* this template is used for adding/editing/deleting pledge *} -{if $cdType} - {include file="CRM/Custom/Form/CustomData.tpl"} -{elseif $showAdditionalInfo and $formType } +{if $showAdditionalInfo and $formType } {include file="CRM/Contribute/Form/AdditionalInfo/$formType.tpl"} {else} {if !$email and $action neq 8 and $context neq 'standalone'}