meraproject/module/ui/input/yandex_country_city/model.php

18 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?
namespace ui\input;
class Yandex_Country_City extends Input {
public function render(array $opt = array()): string
{
return '<div class="form-group form-group-float">
<input data-name="country_code" name="'.$this->name.'_country_code" type="hidden" value="'.$this->options['country_code'].'"/>
<input data-name="country_name" name="'.$this->name.'_country_name" type="hidden" value="'.$this->options['country_name'].'"/>
<input data-name="city_id" name="'.$this->name.'_city_id" type="hidden" value="'.$this->options['city_id'].'"/>
<input data-name="city_name" name="'.$this->name.'_city_name" type="hidden" value="'.$this->options['city_name'].'"/>
<label class="form-group-float-label">'.$this->label.'</label>
<input type="text" class="form-control yandex-search" placeholder="'.$this->options[Input::PLACEHOLDER].'" value="'.h($this->value).'" autocomplete="Off">
</div>';
//<input type="text" class="form-control" name="'.$this->name.'" placeholder="'.$this->options[Input::PLACEHOLDER].'" value="'.h($this->value).'">
}
}