PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/sites/default/files/civicrm/templates_c/en_US/en_US/%%6A/6AB/6ABE93E6%%Address.tpl.php

https://github.com/bhirsch/voipdev
PHP | 177 lines | 164 code | 9 blank | 4 comment | 21 complexity | c8e2b43da4031c9a07b490861ee69abf MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, AGPL-1.0, LGPL-2.1
  1. <?php /* Smarty version 2.6.26, created on 2010-04-27 15:25:33
  2. compiled from CRM/Contact/Form/Edit/Address.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('block', 'ts', 'CRM/Contact/Form/Edit/Address.tpl', 53, false),array('function', 'help', 'CRM/Contact/Form/Edit/Address.tpl', 60, false),array('function', 'crmURL', 'CRM/Contact/Form/Edit/Address.tpl', 105, false),array('modifier', 'crmReplace', 'CRM/Contact/Form/Edit/Address.tpl', 63, false),)), $this); ?>
  5. <?php if ($this->_tpl_vars['title'] && $this->_tpl_vars['className'] == 'CRM_Contact_Form_Contact'): ?>
  6. <h3 class="head">
  7. <span class="ui-icon ui-icon-triangle-1-e"></span><a href="#"><?php echo $this->_tpl_vars['title']; ?>
  8. </a>
  9. </h3>
  10. <div id="addressBlock" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom">
  11. <?php endif; ?>
  12. <?php if ($this->_tpl_vars['blockId'] > 1): ?><div class="spacer"></div><?php endif; ?>
  13. <div id="Address_Block_<?php echo $this->_tpl_vars['blockId']; ?>
  14. " <?php if ($this->_tpl_vars['className'] == 'CRM_Contact_Form_Contact'): ?> class="boxBlock" <?php endif; ?>>
  15. <table class="form-layout-compressed">
  16. <tr>
  17. <?php if ($this->_tpl_vars['className'] == 'CRM_Contact_Form_Contact'): ?>
  18. <td id='Address-Primary-html' colspan="2">
  19. <?php echo $this->_tpl_vars['form']['address'][$this->_tpl_vars['blockId']]['location_type_id']['label']; ?>
  20. <?php echo $this->_tpl_vars['form']['address'][$this->_tpl_vars['blockId']]['location_type_id']['html']; ?>
  21. <?php echo $this->_tpl_vars['form']['address'][$this->_tpl_vars['blockId']]['is_primary']['html']; ?>
  22. <?php echo $this->_tpl_vars['form']['address'][$this->_tpl_vars['blockId']]['is_billing']['html']; ?>
  23. </td>
  24. <?php endif; ?>
  25. <?php if ($this->_tpl_vars['blockId'] > 1): ?>
  26. <td>
  27. <a href="#" title="<?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Delete Address Block<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?>" onClick="removeBlock( 'Address', '<?php echo $this->_tpl_vars['blockId']; ?>
  28. ' ); return false;"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>delete<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></a>
  29. </td>
  30. <?php endif; ?>
  31. </tr>
  32. <?php if ($this->_tpl_vars['form']['use_household_address']): ?>
  33. <tr>
  34. <td>
  35. <?php echo $this->_tpl_vars['form']['use_household_address']['html']; ?>
  36. <?php echo $this->_tpl_vars['form']['use_household_address']['label']; ?>
  37. <?php echo smarty_function_help(array('id' => "id-usehousehold"), $this);?>
  38. <br />
  39. <div id="share_household" style="display:none">
  40. <?php echo $this->_tpl_vars['form']['shared_household']['label']; ?>
  41. <br />
  42. <?php echo ((is_array($_tmp=$this->_tpl_vars['form']['shared_household']['html'])) ? $this->_run_mod_handler('crmReplace', true, $_tmp, 'class', 'huge') : smarty_modifier_crmReplace($_tmp, 'class', 'huge')); ?>
  43. &nbsp;&nbsp;<span id="show_address"></span>
  44. <?php if ($this->_tpl_vars['mailToHouseholdID']): ?><div id="shared_address"><?php echo $this->_tpl_vars['sharedHouseholdAddress']; ?>
  45. </div><?php endif; ?>
  46. </div>
  47. </td>
  48. </tr>
  49. <?php endif; ?>
  50. <tr><td>
  51. <table id="address_<?php echo $this->_tpl_vars['blockId']; ?>
  52. " style="display:block" class="form-layout-compressed">
  53. <?php $_from = $this->_tpl_vars['addressSequence']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  54. foreach ($_from as $this->_tpl_vars['addressElement']):
  55. ?>
  56. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  57. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Contact/Form/Edit/Address/".($this->_tpl_vars['addressElement']).".tpl", 'smarty_include_vars' => array()));
  58. $this->_tpl_vars = $_smarty_tpl_vars;
  59. unset($_smarty_tpl_vars);
  60. ?>
  61. <?php endforeach; endif; unset($_from); ?>
  62. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  63. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Contact/Form/Edit/Address/geo_code.tpl", 'smarty_include_vars' => array()));
  64. $this->_tpl_vars = $_smarty_tpl_vars;
  65. unset($_smarty_tpl_vars);
  66. ?>
  67. </table>
  68. </td></tr>
  69. <?php if ($this->_tpl_vars['className'] == 'CRM_Contact_Form_Contact'): ?>
  70. <tr id="addMoreAddress<?php echo $this->_tpl_vars['blockId']; ?>
  71. " >
  72. <td><a href="#" onclick="buildAdditionalBlocks( 'Address', '<?php echo $this->_tpl_vars['className']; ?>
  73. ' );return false;"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>add address<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></a></td>
  74. </tr>
  75. <?php endif; ?>
  76. </table>
  77. </div>
  78. <?php if ($this->_tpl_vars['title'] && $this->_tpl_vars['className'] == 'CRM_Contact_Form_Contact'): ?>
  79. </div>
  80. <?php endif; ?>
  81. <?php echo '
  82. <script type="text/javascript">
  83. '; ?>
  84. <?php if ($this->_tpl_vars['blockId'] == 1): ?>
  85. <?php echo '
  86. cj(document).ready( function() {
  87. //shared household default setting
  88. if ( cj(\'#use_household_address\').is(\':checked\') ) {
  89. cj(\'table#address_1\').hide();
  90. cj(\'#share_household\').show();
  91. }
  92. '; ?>
  93. <?php if ($this->_tpl_vars['mailToHouseholdID']): ?>
  94. <?php echo '
  95. var dataUrl = "'; ?>
  96. <?php echo CRM_Utils_System::crmURL(array('p' => 'civicrm/ajax/search','h' => 0,'q' => "hh=1&id=".($this->_tpl_vars['mailToHouseholdID'])), $this);?>
  97. <?php echo '";
  98. cj.ajax({
  99. url : dataUrl,
  100. async : false,
  101. success : function(html){
  102. //fixme for showing address in div
  103. htmlText = html.split( \'|\' , 2);
  104. cj(\'input#shared_household\').val(htmlText[0]);
  105. }
  106. });
  107. '; ?>
  108. <?php endif; ?>
  109. <?php echo '
  110. //event handler for use_household_address check box
  111. cj(\'#use_household_address\').click( function() {
  112. cj(\'#share_household\').toggle( );
  113. if( ! cj(\'#use_household_address\').is(\':checked\')) {
  114. cj(\'table#address_1\').show( );
  115. } else {
  116. cj(\'table#address_1\').toggle( );
  117. }
  118. });
  119. });
  120. var dataUrl = "'; ?>
  121. <?php echo $this->_tpl_vars['housholdDataURL']; ?>
  122. <?php echo '";
  123. var newContactText = "'; ?>
  124. (<?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>new contact record<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?>)<?php echo '";
  125. cj(\'#shared_household\').autocomplete( dataUrl, { width : 320, selectFirst : false, matchCase : true, matchContains: true
  126. }).result( function(event, data, formatted) {
  127. if( isNaN( data[1] ) ){
  128. cj( "span#show_address" ).html( newContactText );
  129. cj( "#shared_household_id" ).val( data[0] );
  130. cj( \'table#address_1\' ).toggle( );
  131. } else {
  132. cj( \'table#address_1\' ).hide( );
  133. cj( "span#show_address" ).html( data[0] );
  134. cj( "#shared_household_id" ).val( data[1] );
  135. }
  136. }).bind( \'change blur\', function( ) {
  137. if ( !parseInt( cj( "#shared_household_id" ).val( ) ) ) {
  138. cj( "span#show_address" ).html( newContactText );
  139. }
  140. });
  141. '; ?>
  142. <?php endif; ?>
  143. <?php echo '
  144. //to check if same location type is already selected.
  145. function checkLocation( object, noAlert ) {
  146. var selectedText = cj( \'#\' + object + \' :selected\').text();
  147. cj( \'td#Address-Primary-html select\' ).each( function() {
  148. element = cj(this).attr(\'id\');
  149. if ( cj(this).val() && element != object && selectedText == cj( \'#\' + element + \' :selected\').text() ) {
  150. if ( ! noAlert ) {
  151. var alertText = "'; ?>
  152. <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Location type<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?> <?php echo '" + selectedText + "'; ?>
  153. <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>has already been assigned to another address. Please select another location type for this address.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php echo '";
  154. alert( alertText );
  155. }
  156. cj( \'#\' + object ).val(\'\');
  157. }
  158. });
  159. }
  160. </script>
  161. '; ?>