本文整理汇总了PHP中CRM_Core_Form::buildQuickForm方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form::buildQuickForm方法的具体用法?PHP CRM_Core_Form::buildQuickForm怎么用?PHP CRM_Core_Form::buildQuickForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Form
的用法示例。
在下文中一共展示了CRM_Core_Form::buildQuickForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildQuickForm
/**
* Build the form.
*/
public function buildQuickForm()
{
$this->add('select', 'permission_role', ts('Permissioned Role(s)', array('domain', 'com.aghstrategies.eventpermissions')), $this->getRoles(), FALSE, array('class' => 'crm-select2', 'multiple' => TRUE));
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Submit'), 'isDefault' => TRUE)));
$this->assign('elementNames', $this->getRenderableElementNames());
parent::buildQuickForm();
}
示例2: buildQuickForm
function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Configure CDN Tax Receipts', array('domain' => 'org.civicrm.cdntaxreceipts')));
$this->processOrgOptions('build');
$this->processReceiptOptions('build');
$this->processSystemOptions('build');
$this->processEmailOptions('build');
$arr1 = $this->processOrgOptions('defaults');
$arr2 = $this->processReceiptOptions('defaults');
$arr3 = $this->processSystemOptions('defaults');
$arr4 = $this->processEmailOptions('defaults');
$defaults = array_merge($arr1, $arr2, $arr3, $arr4);
$this->setDefaults($defaults);
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Submit', array('domain' => 'org.civicrm.cdntaxreceipts')), 'isDefault' => TRUE)));
// Set image defaults
$images = array('receipt_logo', 'receipt_signature', 'receipt_watermark', 'receipt_pdftemplate');
foreach ($images as $image) {
if (CRM_Utils_Array::value($image, $defaults)) {
$this->assign($image, $defaults[$image]);
if (!file_exists($defaults[$image])) {
$this->assign($image . '_class', TRUE);
}
}
}
parent::buildQuickForm();
}
示例3: buildQuickForm
function buildQuickForm()
{
$profileCount = CRM_Utils_Array::value('profileCount', $_GET, FALSE);
self::buildProfileWidget($this, $profileCount);
$this->assign('profileCount', $profileCount);
parent::buildQuickForm();
}
示例4: buildQuickForm
function buildQuickForm()
{
$this->add('text', 'title', ts('Title'), true, true)->setSize(45);
// add form elements
$this->add('select', 'widget', 'Widget', $this->getWidgets(), true);
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Save'), 'isDefault' => TRUE), array('type' => 'next', 'name' => ts('Save & Preview'))));
if (isset($this->_id)) {
$query = "SELECT * FROM civicrm_wci_embed_code WHERE id= %1";
$params = array(1 => array($this->_id, 'Integer'));
$dao = CRM_Core_DAO::executeQuery($query, $params, TRUE, 'CRM_Wci_DAO_EmbedCode');
while ($dao->fetch()) {
$emb_code[$dao->id] = array();
CRM_Core_DAO::storeValues($dao, $emb_code[$dao->id]);
$this->setDefaults(array('title' => $emb_code[$dao->id]['name']));
$this->setDefaults(array('widget' => $emb_code[$dao->id]['widget_id']));
}
CRM_Utils_System::setTitle(ts('Edit embed code'));
$this->assign('widget_id', $emb_code[$dao->id]['widget_id']);
} else {
CRM_Utils_System::setTitle(ts('New embed code'));
}
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
parent::buildQuickForm();
}
示例5: buildQuickForm
/**
* Function to buildQuickForm (extends parent function)
*
* @access public
*/
function buildQuickForm()
{
$this->setFormTitle();
$this->createFormElements();
$this->assign('postRuleBlock', $this->postRuleBlock);
parent::buildQuickForm();
}
示例6: buildQuickForm
function buildQuickForm()
{
$this->add('select', 'group', 'Group', $this->getCiviMailchimpGroupOptions(), TRUE);
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Submit'), 'isDefault' => TRUE)));
$this->assign('elementNames', $this->getRenderableElementNames());
parent::buildQuickForm();
}
示例7: buildQuickForm
/**
* Function to build the form
*
* @return None
* @access public
*/
public function buildQuickForm($check = FALSE)
{
parent::buildQuickForm();
$timeRange = CRM_Booking_Utils_DateTime::createTimeRange("00:00", "24:00");
$timeOptions = array();
foreach ($timeRange as $key => $time) {
$option = date('G:i', $time);
$timeOptions[$option] = $option;
}
$this->add('select', 'day_start_at', ts('Day starts at'), $timeOptions, FALSE, array());
$this->add('select', 'day_end_at', ts('Day ends at'), $timeOptions, FALSE, array());
/*
$this->add('select', 'time_period', ts('Time period'),
array(10 => '10', 15 => '15', 20 => '20', 30 => '30', 60 => '60'),
FALSE,
array()
);*/
$this->add('text', 'cc_email_address', ts('CC'), array('size' => 50, 'maxlength' => 255), FALSE);
$this->add('text', 'bcc_email_address', ts('BCC'), array('size' => 50, 'maxlength' => 255), FALSE);
$this->add('checkbox', 'log_confirmation_email', ts('Log email?'));
$this->add('checkbox', 'unlimited_resource_time_config', ts(''));
$this->add('text', 'slot_new_colour', ts('New Slot Colour'));
$this->add('text', 'slot_being_edited_colour', ts('Slot Editing Colour'));
$this->add('text', 'slot_booked_colour', ts('Booked Slot Colour'));
$this->add('text', 'slot_provisional_colour', ts('Provisional Slot Colour'));
$this->addFormRule(array('CRM_Admin_Form_Preferences_Booking', 'formRule'), $this);
$this->addButtons(array(array('type' => 'next', 'name' => ts('Save'), 'isDefault' => TRUE)));
}
示例8: buildQuickForm
public function buildQuickForm()
{
$this->add('text', 'title', ts('Find'), CRM_Core_DAO::getAttribute('CRM_Batch_DAO_Batch', 'title'));
$this->addButtons(array(array('type' => 'refresh', 'name' => ts('Search'), 'isDefault' => TRUE)));
parent::buildQuickForm();
$this->assign('suppressForm', TRUE);
}
示例9: buildQuickForm
function buildQuickForm() {
// add form elements
$this->add(
'date', // field type
'start_date', // field name
'Start Date', // field label
true // is required
);
$this->add(
'date', // field type
'end_date', // field name
'End Date', // field label
true // is required
);
$this->addButtons(array(
array(
'type' => 'submit',
'name' => ts('Submit'),
'isDefault' => TRUE,
),
));
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
parent::buildQuickForm();
}
示例10: buildQuickForm
function buildQuickForm()
{
// Contact
$this->add('hidden', 'contact_id', ts('Contact id'), '', true);
// get the list of all the groups
$allGroups = CRM_Core_PseudoConstant::group();
// Arrange groups into hierarchical listing (child groups follow their parents and have indentation spacing in title)
$groupHierarchy = CRM_Contact_BAO_Group::getGroupsHierarchy($allGroups, NULL, ' ', TRUE);
// get the list of groups contact is currently in ("Added") or unsubscribed ("Removed").
$currentGroups = CRM_Contact_BAO_GroupContact::getGroupList($this->_contactId);
// Remove current groups from drowdown options ($groupSelect)
if (is_array($currentGroups)) {
// Compare array keys, since the array values (group title) in $groupList may have extra spaces for indenting child groups
$groupSelect = array_diff_key($groupHierarchy, $currentGroups);
} else {
$groupSelect = $groupHierarchy;
}
$groupSelect = array('' => ts('- select group -')) + $groupSelect;
if (count($groupSelect) > 1) {
$session = CRM_Core_Session::singleton();
$msg = ts('Add to a group');
$this->add('select', 'group_id', $msg, $groupSelect, false);
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Opslaan / Volgende'), 'isDefault' => TRUE)));
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
}
parent::buildQuickForm();
}
示例11: buildQuickForm
function buildQuickForm()
{
// add form elements
// Add the API Email element
$this->addElement('text', 'api_email_address', ts('API Email Address'), array('size' => 48, TRUE));
$this->addElement('text', 'api_password', ts('API Password'), array('size' => 48, TRUE));
$this->add('select', 'api_audience_type', ts('Audience Type'), array('' => '- select -') + $GLOBALS["DotMailerAudienceType"], FALSE);
$this->add('select', 'api_opt_in_type', ts('Opt In Type'), array('' => '- select -') + $GLOBALS["DotMailerOptInType"], FALSE);
$this->add('select', 'api_email_type', ts('Email Type'), array('' => '- select -') + $GLOBALS["DotMailerEmailType"], FALSE);
$this->add('textarea', 'api_notes', ts('Notes'), array("rows" => 4, "cols" => 60));
/*$apiActivityTypes = &$this->addElement('advmultiselect', 'activity_types',
ts('Activity Types') . ' ', CRM_Dotmailer_Utils::getActivityTypes(),
array(
'size' => 5,
'style' => 'width:200px',
'class' => 'advmultiselect',
)
);*/
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Save'), 'isDefault' => TRUE)));
if (!empty($GLOBALS["DotMailerCiviCRMDataFieldsMapping"]) && DOTMAILER_PROCESS_CUSTOM_DATA_FIELDS == 1) {
$this->assign('dmCiviCRMFieldMapping', $GLOBALS["DotMailerCiviCRMDataFieldsMapping"]);
}
// Get activity type/campaign and DM mapping
$dmMappings = CRM_Dotmailer_Utils::getDotmailerMappingDetails();
$this->assign('dmMappings', $dmMappings);
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
parent::buildQuickForm();
}
示例12: buildQuickForm
function buildQuickForm()
{
$this->addElement('select', 'membership_record', ts('Select Membership'), array('' => ts('Loading...')));
$this->addElement('select', 'contribution_recur_record', ts('Select Recur Record'), array('' => ts('Loading...')));
//$this->addElement('text', 'contact_name', 'Contact', array('size' => 50, 'maxlength' => 255));
$this->addEntityRef('contact_name', ts('Contact'), array('create' => FALSE, 'api' => array('extra' => array('email'))));
$this->addElement('hidden', 'cid', 'cid');
$this->addElement('text', 'reference_number', 'Smart Debit Reference', array('size' => 50, 'maxlength' => 255));
$this->addButtons(array(array('type' => 'upload', 'name' => ts('Next'))));
// Get the smart Debit mandate details
require_once 'CRM/SmartdebitReconciliation/Form/SmartdebitReconciliationList.php';
$smartDebitResponse = CRM_SmartdebitReconciliation_Form_SmartdebitReconciliationList::getSmartDebitPayments(CRM_Utils_Array::value('reference_number', $_GET));
$smartDebitMandate = $smartDebitResponse[0];
// Display the smart debit payments details
$el = $this->addElement('text', 'first_name', 'First Name', array('size' => 50, 'maxlength' => 255));
$el->freeze();
$el = $this->addElement('text', 'last_name', 'Last Name', array('size' => 50, 'maxlength' => 255));
$el->freeze();
$el = $this->addElement('text', 'email_address', 'Email Address', array('size' => 50, 'maxlength' => 255));
$el->freeze();
$el = $this->addElement('text', 'regular_amount', 'Amount', array('size' => 50, 'maxlength' => 255));
$el->freeze();
$el = $this->addElement('text', 'start_date', 'Start Date', array('size' => 50, 'maxlength' => 255));
$el->freeze();
$this->assign('SDMandateArray', $smartDebitMandate);
$this->assign('memStatusCurrent', self::c_current_membership_status);
//MV, to set the current membership as default, when ajax loading
$cid = CRM_Utils_Array::value('cid', $_GET);
$this->assign('cid', $cid);
$this->addFormRule(array('CRM_SmartdebitReconciliation_Form_MembershipRecurDetails', 'formRule'), $this);
parent::buildQuickForm();
}
开发者ID:priyankakaran26,项目名称:uk.co.vedaconsulting.module.smartdebit_reconciliation,代码行数:32,代码来源:MembershipRecurDetails.php
示例13: buildQuickForm
function buildQuickForm()
{
$contributionIds = implode(',', $this->contribution_ids);
$this->add('text', 'contactId', ts('CiviCRM ID', array('domain' => 'de.systopia.donrec')), null, $required = true);
$this->add('hidden', 'contributionIds', $contributionIds);
$this->addDefaultButtons(ts('Rebook', array('domain' => 'de.systopia.donrec')));
parent::buildQuickForm();
}
示例14: buildQuickForm
function buildQuickForm()
{
// add form elements
$this->addDate('dayview_select_date', ts('Select Booking Date'), TRUE, array('formatType' => 'activityDate'));
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Submit'), 'isDefault' => TRUE), array('type' => 'reset', 'name' => ts('Reset'))));
// export form elements
parent::buildQuickForm();
}
示例15: buildQuickForm
function buildQuickForm()
{
$this->add('textarea', 'original_template', 'Paste Mailchimp HTML Here: ', array('rows' => 4, 'cols' => 50, 'style' => 'width: 100%; height: 300px;'), true);
$this->addButtons(array(array('type' => 'submit', 'name' => ts('Convert'), 'isDefault' => TRUE)));
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
parent::buildQuickForm();
}