mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-01 05:55:02 +03:00
Fixes #522 Исправлено поле geo
This commit is contained in:
parent
786106587b
commit
a2b9701df1
|
@ -7,32 +7,34 @@
|
|||
{block 'field_classes'}js-geo-select{/block}
|
||||
|
||||
{block 'field_input'}
|
||||
{$place = $smarty.local.place}
|
||||
|
||||
<p class="mb-15"><select class="js-geo-country width-200" name="{$smarty.local.sName}_country">
|
||||
<option value="">{$aLang.field.geo.select_country}</option>
|
||||
|
||||
{if $aGeoCountries}
|
||||
{foreach $aGeoCountries as $oGeoCountry}
|
||||
<option value="{$oGeoCountry->getId()}" {if $oFieldGeoTarget and $oFieldGeoTarget->getCountryId() == $oGeoCountry->getId()}selected="selected"{/if}>{$oGeoCountry->getName()}</option>
|
||||
{foreach $aGeoCountries as $country}
|
||||
<option value="{$country->getId()}" {if $place and $place->getCountryId() == $country->getId()}selected="selected"{/if}>{$country->getName()}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select></p>
|
||||
|
||||
<p class="mb-15"><select class="js-geo-region width-200" name="{$smarty.local.sName}_region" {if ! $oFieldGeoTarget or ! $oFieldGeoTarget->getCountryId()}style="display:none;"{/if}>
|
||||
<p class="mb-15"><select class="js-geo-region width-200" name="{$smarty.local.sName}_region" {if ! $place or ! $place->getCountryId()}style="display:none;"{/if}>
|
||||
<option value="">{$aLang.field.geo.select_region}</option>
|
||||
|
||||
{if $aGeoRegions}
|
||||
{foreach $aGeoRegions as $oGeoRegion}
|
||||
<option value="{$oGeoRegion->getId()}" {if $oFieldGeoTarget and $oFieldGeoTarget->getRegionId() == $oGeoRegion->getId()}selected="selected"{/if}>{$oGeoRegion->getName()}</option>
|
||||
{foreach $aGeoRegions as $region}
|
||||
<option value="{$region->getId()}" {if $place and $place->getRegionId() == $region->getId()}selected="selected"{/if}>{$region->getName()}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select></p>
|
||||
|
||||
<p><select class="js-geo-city width-200" name="{$smarty.local.sName}_city" {if ! $oFieldGeoTarget or ! $oFieldGeoTarget->getRegionId()}style="display:none;"{/if}>
|
||||
<p><select class="js-geo-city width-200" name="{$smarty.local.sName}_city" {if ! $place or ! $place->getRegionId()}style="display:none;"{/if}>
|
||||
<option value="">{$aLang.field.geo.select_city}</option>
|
||||
|
||||
{if $aGeoCities}
|
||||
{foreach $aGeoCities as $oGeoCity}
|
||||
<option value="{$oGeoCity->getId()}" {if $oFieldGeoTarget and $oFieldGeoTarget->getCityId() == $oGeoCity->getId()}selected="selected"{/if}>{$oGeoCity->getName()}</option>
|
||||
{foreach $aGeoCities as $city}
|
||||
<option value="{$city->getId()}" {if $place and $place->getCityId() == $city->getId()}selected="selected"{/if}>{$city->getName()}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select></p>
|
||||
|
|
|
@ -72,10 +72,10 @@
|
|||
|
||||
{* Местоположение *}
|
||||
{include 'components/field/field.geo.tpl'
|
||||
sName = 'geo'
|
||||
bInline = true
|
||||
sLabel = {lang name='user.settings.profile.fields.place.label'}
|
||||
fieldGeoTarget = $oGeoTarget}
|
||||
sName = 'geo'
|
||||
bInline = true
|
||||
sLabel = {lang name='user.settings.profile.fields.place.label'}
|
||||
place = $oGeoTarget}
|
||||
|
||||
|
||||
{* О себе *}
|
||||
|
|
Loading…
Reference in a new issue