*/
protected $_locationDefaults = [];
- /**
- * How many locationBlocks should we display?
- *
- * @var int
- * @const
- */
- const LOCATION_BLOCKS = 1;
-
/**
* Explicitly declare the entity api name.
*/
- public function getDefaultEntity() {
+ public function getDefaultEntity(): string {
return 'Domain';
}
/**
* Explicitly declare the form context.
*/
- public function getDefaultContext() {
+ public function getDefaultContext(): string {
return 'create';
}
/**
* Build the form object.
+ *
+ * @throws \CiviCRM_API3_Exception
*/
- public function buildQuickForm() {
+ public function buildQuickForm(): void {
$this->addField('name', ['label' => ts('Organization Name')], TRUE);
$this->addField('description', ['label' => ts('Description'), 'size' => 30]);
//build location blocks.
- CRM_Contact_Form_Location::buildQuickForm($this);
+ CRM_Contact_Form_Edit_Address::buildQuickForm($this, 1);
+ CRM_Contact_Form_Edit_Email::buildQuickForm($this, 1);
+ CRM_Contact_Form_Edit_Phone::buildQuickForm($this, 1);
$this->addButtons([
[
<h3>{ts}Default Organization Address{/ts}</h3>
<div class="description">{ts 1={domain.address}}CiviMail mailings must include the sending organization's address. This is done by putting the %1 token in either the body or footer of the mailing. This token may also be used in regular 'Email - send now' messages and in other Message Templates. The token is replaced by the address entered below when the message is sent.{/ts}</div>
- {include file="CRM/Contact/Form/Edit/Address.tpl" masterAddress='' parseStreetAddress=''}
+ {include file="CRM/Contact/Form/Edit/Address.tpl" blockId=1 masterAddress='' parseStreetAddress=''}
<h3>{ts}Organization Contact Information{/ts}</h3>
<div class="description">{ts}You can also include general email and/or phone contact information in mailings.{/ts} {help id="additional-contact"}</div>
<table class="form-layout-compressed">
{* Display the email block *}
- {include file="CRM/Contact/Form/Edit/Email.tpl"}
+ {include file="CRM/Contact/Form/Edit/Email.tpl" blockId=1}
{* Display the phone block *}
- {include file="CRM/Contact/Form/Edit/Phone.tpl"}
+ {include file="CRM/Contact/Form/Edit/Phone.tpl" blockId=1}
</table>
<div class="spacer"></div>