}
/**
- * Function to actually build the form
+ * Add standard buttons
*
* @return void
* @access public
*/
public function buildQuickForm() {
- if ($this->_action & CRM_Core_Action::DELETE) {
- $this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Delete'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
- }
- elseif ($this->_action & CRM_Core_Action::VIEW) {
+ if ($this->_action & CRM_Core_Action::VIEW) {
$this->addButtons(array(
array(
'type' => 'cancel',
$this->addButtons(array(
array(
'type' => 'next',
- 'name' => ts('Save'),
+ 'name' => $this->_action & CRM_Core_Action::DELETE ? ts('Delete') : ts('Save'),
'isDefault' => TRUE,
),
array(
CRM_Utils_System::redirect($url);
return TRUE;
}
- else {
- $this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Delete'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
- }
}
else {
$this->_isTagSet = CRM_Utils_Request::retrieve('tagset', 'Positive', $this);
}
$this->assign('adminReservedTags', $adminReservedTags);
- parent::buildQuickForm();
}
+ parent::buildQuickForm();
}
/**
*/
public function buildQuickForm() {
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;
+ return parent::buildQuickForm();
}
$config = CRM_Core_Config::singleton();
}
$this->add('text', 'threshold', ts("Weight Threshold to Consider Contacts 'Matching':"), $attributes);
- $this->addButtons(array(
- array('type' => 'next', 'name' => ts('Save'), 'isDefault' => TRUE),
- array('type' => 'cancel', 'name' => ts('Cancel')),
- ));
$this->assign('contact_type', $this->_contactType);
$this->addFormRule(array('CRM_Contact_Form_DedupeRules', 'formRule'), $this);
+
+ parent::buildQuickForm();
}
/**