}
}
- //setDefault of contact types for email greeting, postal greeting, addressee, CRM-4575
+ // setDefault of contact types for email greeting, postal greeting, addressee, CRM-4575
if (in_array($this->_gName, array(
'email_greeting',
'postal_greeting',
$enabled->freeze();
}
- //fix for CRM-3552, CRM-4575
+ // fix for CRM-3552, CRM-4575
$showIsDefaultGroups = array(
'email_greeting',
'postal_greeting',
$this->add('checkbox', 'is_default', ts('Default Option?'));
}
- //get contact type for which user want to create a new greeting/addressee type, CRM-4575
+ // get contact type for which user want to create a new greeting/addressee type, CRM-4575
if (in_array($this->_gName, array(
'email_greeting',
'postal_greeting',
if ($this->_gName == 'participant_status') {
// For Participant Status options, expose the 'filter' field to track which statuses are "Counted", and the Visibility field
- $element = $this->add('checkbox', 'filter', ts('Counted?'));
+ $this->add('checkbox', 'filter', ts('Counted?'));
$this->add('select', 'visibility_id', ts('Visibility'), CRM_Core_PseudoConstant::visibility());
}
if ($this->_gName == 'participant_role') {
*
* @return array
* array of errors / empty array.
+ * @throws \CRM_Core_Exception
*/
public static function formRule($fields, $files, $self) {
$errors = array();
$dataType = self::getOptionGroupDataType($self->_gName);
if ($dataType && $self->_gName !== 'activity_type') {
$validate = CRM_Utils_Type::validate($fields['value'], $dataType, FALSE);
- if (!$validate) {
+ if ($validate === FALSE) {
CRM_Core_Session::setStatus(
ts('Data Type of the value field for this option value does not match ' . $dataType),
ts('Value field Data Type mismatch'));
public function postProcess() {
if ($this->_action & CRM_Core_Action::DELETE) {
$fieldValues = array('option_group_id' => $this->_gid);
- $wt = CRM_Utils_Weight::delWeight('CRM_Core_DAO_OptionValue', $this->_id, $fieldValues);
+ CRM_Utils_Weight::delWeight('CRM_Core_DAO_OptionValue', $this->_id, $fieldValues);
if (CRM_Core_BAO_OptionValue::del($this->_id)) {
if ($this->_gName == 'phone_type') {
}
}
else {
- $ids = array();
$params = $this->exportValues();
// allow multiple defaults within group.