* @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);
* @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...
return;
}
- if ($this->_cdType) {
- return CRM_Custom_Form_CustomData::buildQuickForm($this);
- }
-
//build other activity links
CRM_Activity_Form_ActivityLinks::commonBuildQuickForm($this);
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);
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');
$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);
}
}
- $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);
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);
* array of default values
*/
public function setDefaultValues() {
- if ($this->_cdType) {
- return CRM_Custom_Form_CustomData::setDefaultValues($this);
- }
$defaults = $this->_values;
* @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);
$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'
}
$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;
}
return;
}
- if ($this->_cdType) {
- return $result;
- }
-
$this->assign('urlPath', 'civicrm/case/activity');
$encounterMediums = CRM_Case_PseudoConstant::encounterMedium();
* @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);
* @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}";
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');
* @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}";
*/
public $_caseId;
- /**
- * @var mixed
- */
- public $_cdType;
-
/**
* Explicitly declare the form context.
*/
}
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');
* Set default values for the form.
*/
public function setDefaultValues() {
- if ($this->_cdType) {
- return CRM_Custom_Form_CustomData::setDefaultValues($this);
- }
$defaults = array();
* 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'));
* 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(
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
protected $_formType;
- /**
- * @todo what on earth does cdType stand for????
- * @var
- */
- protected $_cdType;
public $_honoreeProfileType;
/**
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();
* @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;
*/
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
// 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();
* @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);
* @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
* @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) {
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') {
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) {
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');
* @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);
* @return array
*/
public function setDefaultValues() {
- if ($this->_cdType) {
- return CRM_Custom_Form_CustomData::setDefaultValues($this);
- }
$defaults = parent::setDefaultValues();
* @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(
* @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();
* 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);
* 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()));
);
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');
* Default values.
*/
public function setDefaultValues() {
- if ($this->_cdType) {
- return CRM_Custom_Form_CustomData::setDefaultValues($this);
- }
$defaults = parent::setDefaultValues();
$this->_memType = $defaults['membership_type_id'];
* Build the form object.
*/
public function buildQuickForm() {
- if ($this->_cdType) {
- CRM_Custom_Form_CustomData::buildQuickForm($this);
- }
parent::buildQuickForm();
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing other (custom) activities. *}
-{if $cdType }
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
{if $action eq 4}
<div class="crm-block crm-content-block crm-activity-view-block">
{else}
{/literal}
{/if}
</div>{* end of form block*}
-{/if} {* end of snippet if*}
+
{include file="CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl" entityID=$activityId entityTable="civicrm_activity"}
+--------------------------------------------------------------------+
*}
{* Links for scheduling/logging meetings and calls and Sending Email *}
-{if $cdType eq false }
+
{if $contact_id }
{assign var = "contactId" value= $contact_id }
{/if}
</ul>
{/if}
-
-{/if}
*}
<div class="crm-block crm-form-block crm-campaign-form-block">
-{* load the custom data *}
-{if $cdType}
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
{if $action eq 8}
<table class="form-layout">
});
</script>
{/literal}
-
-
-{/if} {* load custom data *}
-
+--------------------------------------------------------------------+
*}
-{if $cdType }
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
<div class="crm-block crm-form-block crm-campaign-survey-main-form-block">
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{if $action eq 1}
});
</script>
{/literal}
-
-{/if}
*}
{* this template is used for adding/editing activities for a case. *}
-{if $cdType }
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
<div class="crm-block crm-form-block crm-case-activity-form-block">
{if $action neq 8 and $action neq 32768 }
{/literal}
{/if}
</div>
-{/if} {* end of main if block*}
*}
<div class="crm-block crm-form-block crm-case-form-block">
-{if $cdType }
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
-
{if $action neq 8 && $action neq 32768}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
-{/if}
</div>
+--------------------------------------------------------------------+
*}
{* 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'}
<div class="crm-submit-buttons">{$form.buttons.html}</div>
+--------------------------------------------------------------------+
*}
{* 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 *}
<div class="crm-block crm-content-block crm-relationship-view-block">
<table class="crm-info-panel">
</div>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
-{/if} {* close of custom data else*}
-
+--------------------------------------------------------------------+
*}
{* 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}
<div id="contact-summary-relationship-tab" class="view-content">
*}
{* 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"}
{* Step 1 of New Event Wizard, and Edit Event Info form. *}
<div class="crm-block crm-form-block crm-event-manage-eventinfo-form-block">
-{if $cdType}
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
{assign var=eventID value=$id}
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="top"}
{include file="CRM/common/showHide.tpl" elemType="table-row"}
{include file="CRM/Form/validate.tpl"}
-{/if}
</div>
{literal}
<script type="text/javascript">
{include file="CRM/Event/Form/EventFees.tpl"}
-{* Ajax callback for custom data snippet *}
-{elseif $cdType}
- {include file="CRM/Custom/Form/CustomData.tpl"}
-
{* Main event form template *}
{else}
{if $participantMode == 'test' }
*}
{* this template is used for adding/editing/deleting grant *}
-{if $cdType}
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
-
<div class="crm-block crm-form-block crm-grant-form-block">
{if $action eq 8}
<div class="messages status">
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
-
-{/if} {* closing of main custom data if *}
</div>
{/if}
<div class="spacer"></div>
-{if $cdType }
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{elseif $priceSetId}
+{if $priceSetId}
{include file="CRM/Price/Form/PriceSet.tpl" context="standalone" extends="Membership"}
{literal}
<script type="text/javascript">
+--------------------------------------------------------------------+
*}
{* this template is used for renewing memberships for a contact *}
-{if $cdType }
- {include file="CRM/Custom/Form/CustomData.tpl"}
-{else}
{if $membershipMode == 'test' }
{assign var=registerMode value="TEST"}
{elseif $membershipMode == 'live'}
}
</script>
{/literal}
-{/if}{* closing of custom data if *}
+--------------------------------------------------------------------+
*}
{* 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'}