Allow location type for organisation addresses be configurable.

This commit is contained in:
Jens Schuppe 2019-01-22 15:02:02 +01:00
parent d28248723b
commit 3a027cc7c9
5 changed files with 77 additions and 6 deletions

View file

@ -121,6 +121,14 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
TRUE
);
$this->add(
'select',
'location_type_id_organisation',
E::ts('Location type for organisations'),
$this->getLocationTypes(),
TRUE
);
$this->add(
'select', // field type
'financial_type_id', // field name

View file

@ -168,6 +168,7 @@ class CRM_Twingle_Profile {
return array(
'selector',
'location_type_id',
'location_type_id_organisation',
'financial_type_id',
'pi_banktransfer',
'pi_debit_manual',
@ -225,6 +226,7 @@ class CRM_Twingle_Profile {
return new CRM_Twingle_Profile($name, array(
'selector' => '',
'location_type_id' => CRM_Twingle_Submission::LOCATION_TYPE_ID_WORK,
'location_type_id_organisation' => CRM_Twingle_Submission::LOCATION_TYPE_ID_WORK,
'financial_type_id' => 1, // "Donation"
'pi_banktransfer' => 5, // "EFT"
'pi_debit_manual' => NULL,