* @access public
*/
function preProcess() {
+ //location blocks.
+ CRM_Contact_Form_Location::preProcess($this);
+
+ //skip rest of postpress when we are building additional email and phone blocks
+ if (!empty($this->_addBlockName)) {
+ return;
+ }
+
parent::preProcess();
$this->_values = $this->get('values');
CRM_Event_BAO_Event::retrieve($params, $this->_values);
$this->set('values', $this->_values);
}
-
- //location blocks.
- CRM_Contact_Form_Location::preProcess($this);
}
/**
{* @var blockId Contains the current block id, and assigned in the CRM/Contact/Form/Location.php file *}
{if !$addBlock}
- <tr>
- <td>{ts}Phone{/ts}</td>
- <td>{ts}Phone Location{/ts}</td>
- {if $className eq 'CRM_Contact_Form_Contact'}
- <td colspan="2">{ts}Phone Type{/ts}</td>
+ <tr>
+ <td>{ts}Phone{/ts}</td>
+ {if $className eq 'CRM_Contact_Form_Contact'}
+ <td>{ts}Phone Location{/ts}</td>
+ {/if}
+ <td colspan="2">{ts}Phone Type{/ts}</td>
+ {if $className eq 'CRM_Contact_Form_Contact'}
<td id="Phone-Primary" class="hiddenElement">{ts}Primary?{/ts}</td>
- {/if}
- </tr>
+ {/if}
+ </tr>
{/if}
<tr id="Phone_Block_{$blockId}">
- <td>{$form.phone.$blockId.phone.html} {ts}ext.{/ts} {$form.phone.$blockId.phone_ext.html|crmAddClass:four} </td>
- <td>{$form.phone.$blockId.location_type_id.html}</td>
- <td colspan="2">{$form.phone.$blockId.phone_type_id.html}</td>
+ <td>{$form.phone.$blockId.phone.html} {ts}ext.{/ts} {$form.phone.$blockId.phone_ext.html|crmAddClass:four} </td>
+ {if $className eq 'CRM_Contact_Form_Contact'}
+ <td>{$form.phone.$blockId.location_type_id.html}</td>
+ {/if}
+ <td colspan="2">{$form.phone.$blockId.phone_type_id.html}</td>
+ {if $className eq 'CRM_Contact_Form_Contact'}
<td align="center" id="Phone-Primary-html" {if $blockId eq 1}class="hiddenElement"{/if}>{$form.phone.$blockId.is_primary.1.html}</td>
- {if $blockId gt 1}
- <td><a href="#" title="{ts}Delete Phone Block{/ts}" onClick="removeBlock('Phone','{$blockId}'); return false;">{ts}delete{/ts}</a></td>
- {/if}
+ {/if}
+ {if $blockId gt 1}
+ <td><a href="#" title="{ts}Delete Phone Block{/ts}" onClick="removeBlock('Phone','{$blockId}'); return false;">{ts}delete{/ts}</a></td>
+ {/if}
</tr>
+
{if !$addBlock}
<tr>
-<td colspan="4">
- <a id='addPhone' href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'Phone', '{$className}');return false;">{ts}Add another Phone number{/ts}</a>
-</td>
+ <td colspan="4">
+ <a id='addPhone' href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'Phone', '{$className}');return false;">{ts}Add another Phone number{/ts}</a>
+ </td>
</tr>
{/if}
{ts}Use this form to configure the location and optional contact information for the event. This information will be displayed on the Event Information page. It will also be included in online registration pages and confirmation emails if these features are enabled.{/ts}
</div>
{/if}
-<div class="crm-block crm-form-block crm-event-manage-location-form-block">
+
{if $addBlock}
{include file="CRM/Contact/Form/Edit/$blockName.tpl"}
{else}
+<div class="crm-block crm-form-block crm-event-manage-location-form-block">
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="top"}
</div>