Commit 9ddb1b23 authored by jaapjansma's avatar jaapjansma

added privacy options to create individual, household and contact

parent 745d7a41
Version 1.9 (not yet released)
-----------
* Added condition Contact Has Tag.
* Added contribution recur id parameter to create contribution action.
* Added receive data parameter to create contribution action.
* Added action to set value from a parameter.
* Added action to set contact sub type.
* Added action to link contribution to membership.
* Added possibility to create a specification collection for conditions.
* Added condition to check multiple parameters.
* Added action to find or create a campaign.
* Added parameters: join date, start date, end date to the create membership actions.
**New actions**
* Set value from parameter
* Set contact subtype
* Link contribution to membership
* Find or create a campaign
* Update membership
* Set employer
**New conditions**
* Contact Has Tag.
* Check multiple parameters
**Changed actions**
_Create update individual_
* New parameter source
* New parameter created date
* New parameter do not mail
* New parameter do not email
* New parameter do not phone
* New parameter do not sms
_Create update household_
* New parameter source
* New parameter created date
* New parameter do not mail
* New parameter do not email
* New parameter do not phone
* New parameter do not sms
_Create update organization_
* New parameter source
* New parameter created date
* New parameter do not mail
* New parameter do not email
* New parameter do not phone
* New parameter do not sms
_Create contribution action_
* New parameter contribution recur id
* New parameter receive date
_Create membership action_
* New parameter join date
* New parameter start date
* New parameter end date
**Other changes**
* Collection specification on conditions.
* Fixed issue with custom token
* Added action to update an membership.
* Added parameters: source and created date to the actions create individual, household and organization.
* Added action to set employer.
Version 1.8
-----------
......
......@@ -38,6 +38,18 @@ class CreateUpdateHousehold extends AbstractAction {
if ($parameters->doesParameterExists('created_date')) {
$params['created_date'] = $parameters->getParameter('created_date');
}
if ($parameters->doesParameterExists('do_not_mail')) {
$params['do_not_mail'] = $parameters->getParameter('do_not_mail') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_email')) {
$params['do_not_email'] = $parameters->getParameter('do_not_email') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_phone')) {
$params['do_not_phone'] = $parameters->getParameter('do_not_phone') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_sms')) {
$params['do_not_sms'] = $parameters->getParameter('do_not_sms') ? '1' : '0';
}
$result = civicrm_api3('Contact', 'create', $params);
$contact_id = $result['id'];
$output->setParameter('contact_id', $contact_id);
......@@ -104,6 +116,10 @@ class CreateUpdateHousehold extends AbstractAction {
new Specification('household_name', 'String', E::ts('Household name'), false),
new Specification('source', 'String', E::ts('Source'), false),
new Specification('created_date', 'Date', E::ts('Created Date'), false),
new Specification('do_not_mail', 'Boolean', E::ts('Do not mail'), false),
new Specification('do_not_email', 'Boolean', E::ts('Do not e-mail'), false),
new Specification('do_not_phone', 'Boolean', E::ts('Do not Phone'), false),
new Specification('do_not_sms', 'Boolean', E::ts('Do not SMS'), false),
));
ContactActionUtils::createAddressParameterSpecification($spec);
ContactActionUtils::createEmailParameterSpecification($spec);
......
......@@ -48,6 +48,18 @@ class CreateUpdateIndividual extends AbstractAction {
if ($parameters->doesParameterExists('created_date')) {
$params['created_date'] = $parameters->getParameter('created_date');
}
if ($parameters->doesParameterExists('do_not_mail')) {
$params['do_not_mail'] = $parameters->getParameter('do_not_mail') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_email')) {
$params['do_not_email'] = $parameters->getParameter('do_not_email') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_phone')) {
$params['do_not_phone'] = $parameters->getParameter('do_not_phone') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_sms')) {
$params['do_not_sms'] = $parameters->getParameter('do_not_sms') ? '1' : '0';
}
$result = civicrm_api3('Contact', 'create', $params);
$contact_id = $result['id'];
$output->setParameter('contact_id', $contact_id);
......@@ -117,6 +129,10 @@ class CreateUpdateIndividual extends AbstractAction {
new OptionGroupSpecification('gender_id', 'gender', E::ts('Gender'), false),
new Specification('source', 'String', E::ts('Source'), false),
new Specification('created_date', 'Date', E::ts('Created Date'), false),
new Specification('do_not_mail', 'Boolean', E::ts('Do not mail'), false),
new Specification('do_not_email', 'Boolean', E::ts('Do not e-mail'), false),
new Specification('do_not_phone', 'Boolean', E::ts('Do not Phone'), false),
new Specification('do_not_sms', 'Boolean', E::ts('Do not SMS'), false),
));
ContactActionUtils::createAddressParameterSpecification($spec);
ContactActionUtils::createEmailParameterSpecification($spec);
......
......@@ -38,6 +38,18 @@ class CreateUpdateOrganization extends AbstractAction {
if ($parameters->doesParameterExists('created_date')) {
$params['created_date'] = $parameters->getParameter('created_date');
}
if ($parameters->doesParameterExists('do_not_mail')) {
$params['do_not_mail'] = $parameters->getParameter('do_not_mail') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_email')) {
$params['do_not_email'] = $parameters->getParameter('do_not_email') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_phone')) {
$params['do_not_phone'] = $parameters->getParameter('do_not_phone') ? '1' : '0';
}
if ($parameters->doesParameterExists('do_not_sms')) {
$params['do_not_sms'] = $parameters->getParameter('do_not_sms') ? '1' : '0';
}
$result = civicrm_api3('Contact', 'create', $params);
$contact_id = $result['id'];
$output->setParameter('contact_id', $contact_id);
......@@ -104,6 +116,10 @@ class CreateUpdateOrganization extends AbstractAction {
new Specification('organization_name', 'String', E::ts('Organization name'), false),
new Specification('source', 'String', E::ts('Source'), false),
new Specification('created_date', 'Date', E::ts('Created Date'), false),
new Specification('do_not_mail', 'Boolean', E::ts('Do not mail'), false),
new Specification('do_not_email', 'Boolean', E::ts('Do not e-mail'), false),
new Specification('do_not_phone', 'Boolean', E::ts('Do not Phone'), false),
new Specification('do_not_sms', 'Boolean', E::ts('Do not SMS'), false),
));
ContactActionUtils::createAddressParameterSpecification($spec);
ContactActionUtils::createEmailParameterSpecification($spec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment