}
elseif (!empty($this->_multiRecordFields)
&& (!$this->_multiRecord || !in_array($this->_multiRecord, array(
- CRM_Core_Action::DELETE,
- CRM_Core_Action::UPDATE,
- )))
+ CRM_Core_Action::DELETE,
+ CRM_Core_Action::UPDATE,
+ )))
) {
CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header');
//multirecord listing page
$this->setDefaultsValues();
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, NULL);
- if ($this->_mode == self::MODE_CREATE) {
+
+ if ($this->_mode == self::MODE_CREATE || $this->_mode == self::MODE_EDIT) {
CRM_Core_BAO_CMSUser::buildForm($this, $this->_gid, $emailPresent, $action);
}
else {
$duplicateContactsLinks = '<div class="matching-contacts-found">';
$duplicateContactsLinks .= ts('One matching contact was found. ', array(
- 'count' => count($contactLinks['rows']),
- 'plural' => '%count matching contacts were found.<br />',
- ));
+ 'count' => count($contactLinks['rows']),
+ 'plural' => '%count matching contacts were found.<br />',
+ ));
if ($contactLinks['msg'] == 'view') {
$duplicateContactsLinks .= ts('You can View the existing contact.', array(
- 'count' => count($contactLinks['rows']),
- 'plural' => 'You can View the existing contacts.',
- ));
+ 'count' => count($contactLinks['rows']),
+ 'plural' => 'You can View the existing contacts.',
+ ));
}
else {
$duplicateContactsLinks .= ts('You can View or Edit the existing contact.', array(
- 'count' => count($contactLinks['rows']),
- 'plural' => 'You can View or Edit the existing contacts.',
- ));
+ 'count' => count($contactLinks['rows']),
+ 'plural' => 'You can View or Edit the existing contacts.',
+ ));
}
$duplicateContactsLinks .= '</div>';
$duplicateContactsLinks .= '<table class="matching-contacts-actions">';
//create CMS user (if CMS user option is selected in profile)
if (!empty($params['cms_create_account']) &&
- $this->_mode == self::MODE_CREATE
+ ($this->_mode == self::MODE_CREATE || $this->_mode == self::MODE_EDIT)
) {
$params['contactID'] = $this->_id;
if (!CRM_Core_BAO_CMSUser::create($params, $this->_mail)) {