Created
July 1, 2016 07:17
-
-
Save firstred/b5016aab980ade678d741691e5b15c5b to your computer and use it in GitHub Desktop.
Form.tpl 1.5 backwards compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{extends file="helpers/form/form.tpl"} | |
{block name="input"} | |
{if $input.type == 'switch' && $smarty.const._PS_VERSION_|@addcslashes:'\'' < '1.6'} | |
{foreach $input.values as $value} | |
<input type="radio" name="{$input.name|escape:'htmlall':'UTF-8'}" | |
id="{$input.name|escape:'htmlall':'UTF-8'}_{$value.id|escape:'htmlall':'UTF-8'}" | |
value="{$value.value|escape:'htmlall':'UTF-8'}" | |
{if $fields_value[$input.name] == $value.value}checked="checked"{/if} | |
{if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} /> | |
<label class="t" for="{$input.name|escape:'htmlall':'UTF-8'}_{$value.id|escape:'htmlall':'UTF-8'}"> | |
{if isset($input.is_bool) && $input.is_bool == true} | |
{if $value.value == 1} | |
<img src="../img/admin/enabled.gif" alt="{$value.label|escape:'htmlall':'UTF-8'}" | |
title="{$value.label|escape:'htmlall':'UTF-8'}" /> | |
{else} | |
<img src="../img/admin/disabled.gif" alt="{$value.label|escape:'htmlall':'UTF-8'}" | |
title="{$value.label|escape:'htmlall':'UTF-8'}" /> | |
{/if} | |
{else} | |
{$value.label|escape:'htmlall':'UTF-8'} | |
{/if} | |
</label> | |
{if isset($input.br) && $input.br}<br />{/if} | |
{if isset($value.p) && $value.p}<p>{$value.p|escape:'htmlall':'UTF-8'}</p>{/if} | |
{/foreach} | |
{else} | |
{$smarty.block.parent} | |
{/if} | |
{/block} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment