display a warning instead of an error if the project_id is a duplicate
This commit is contained in:
parent
96c072eb8e
commit
8d1d93d77a
2 changed files with 8 additions and 2 deletions
|
@ -568,7 +568,13 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
|
|||
$profile->validate();
|
||||
}
|
||||
catch (ProfileValidationError $e) {
|
||||
$this->setElementError($e->getAffectedFieldName(), $e->getMessage());
|
||||
switch ($e->getErrorCode()) {
|
||||
case ProfileValidationError::ERROR_CODE_PROFILE_VALIDATION_FAILED:
|
||||
$this->setElementError($e->getAffectedFieldName(), $e->getMessage());
|
||||
break;
|
||||
case ProfileValidationError::ERROR_CODE_PROFILE_VALIDATION_WARNING:
|
||||
CRM_Core_Session::setStatus($e->getMessage(), E::ts('Warning'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue