These blocks appear to be unused because these forms are never displayed in frozen "view" mode.
If they were in use they would be broken because the urls are incorrectly output raw
instead of being properly passed to `CRM_Utils_System::url()`.
$buttons[0]['class'] = 'crm-warnDataLoss';
}
$this->addButtons($buttons);
-
- // TODO: Is this condition ever true? Can this code be removed?
- if ($this->_action & CRM_Core_Action::VIEW) {
- $this->freeze();
- $this->addElement('xbutton', 'done', ts('Done'), [
- 'type' => 'button',
- 'onclick' => "location.href='civicrm/admin/custom/group?reset=1&action=browse'",
- ]);
- }
}
/**
$this->addFormRule(['CRM_UF_Form_Field', 'formRule'], $this);
- // if view mode pls freeze it with the done button.
- if ($this->_action & CRM_Core_Action::VIEW) {
- $this->freeze();
- $this->addElement('xbutton', 'done', ts('Done'),
- [
- 'type' => 'button',
- 'onclick' => "location.href='civicrm/admin/uf/group/field?reset=1&action=browse&gid=" . $this->_gid . "'",
- ]
- );
- }
-
$this->setDefaults($defaults);
}
],
]);
- // views are implemented as frozen form
- if ($this->_action & CRM_Core_Action::VIEW) {
- $this->freeze();
- $this->addElement('xbutton', 'done', ts('Done'), [
- 'type' => 'button',
- 'onclick' => "location.href='civicrm/admin/uf/group?reset=1&action=browse'",
- ]);
- }
-
$this->addFormRule(['CRM_UF_Form_Group', 'formRule'], $this);
}