Advertisement
maxisoft

city field

May 28th, 2022
1,196
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.    
  3.     $value = ['id'=>'','name'=>''];
  4.    
  5.     $dom_attr = [
  6.         'id'             => 'city_select',
  7.         'data-selected'  => $value['id'],
  8.         'data-type'      => 'cities',
  9.         'data-child'     => 'cities',
  10.         'data-items-url' => href_to('geo', 'get_items')
  11.     ];
  12.    
  13. ?>
  14.  
  15.  
  16. <?php $this->addTplJSNameFromContext('geo'); ?>
  17.  
  18.  
  19.     <div id="geo-widget-city" class="form-control city-input d-flex align-items-center px-1">
  20.        
  21.         <?php echo html_input('hidden', 'city', $value['id'], array('class'=>'city-id')); ?>
  22.  
  23.         <span class="city-name flex-fill ml-2"<?php if (empty($value['name'])){ ?> style="display:none"<?php } ?>>
  24.             <?php echo $value['name']; ?>
  25.         </span>
  26.  
  27.         <a class="city_clear_link btn btn-sm btn-outline-danger mr-1" href="#" <?php if (empty($value['name'])){ ?>style="display:none"<?php } ?>>
  28.             <?php echo LANG_DELETE; ?>
  29.         </a>
  30.         <a class="ajax-modal ml-auto btn btn-sm btn-outline-secondary" title="<?php html(LANG_SELECT); ?>" href="<?php echo href_to('geo', 'widget', array('city', $value['id'])); ?>">
  31.             <?php echo LANG_SELECT; ?>
  32.         </a>
  33.     </div>
Advertisement
RAW Paste Data Copied
Advertisement