From e0814096977b52b9aa56f4980abca2084b356fb5 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 11 Jul 2019 15:46:46 -0400 Subject: [PATCH] Fix select ui element and add states into smarty defaults Adding states into the smarty Standard Template Parameters. Correcting select. Need $key as well as $val for generic select. --- setup/standardTemplateParams.php | 1 + views/ui/f6/select.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/standardTemplateParams.php b/setup/standardTemplateParams.php index 14310cd2..0b38b88e 100644 --- a/setup/standardTemplateParams.php +++ b/setup/standardTemplateParams.php @@ -38,6 +38,7 @@ $smarty->templateAssign('thisYear', date ( 'Y' ) ); $smarty->templateAssign('ref_type_numb', $this->config['ref_type_numb']); $smarty->templateAssign('settings', $this->config['settings']); $smarty->templateAssign('terms', $this->config['terms']); +$smarty->templateAssign('states', $this->config['states']); if (is_admin()) { diff --git a/views/ui/f6/select.html b/views/ui/f6/select.html index 2e26b109..ba45c1f3 100644 --- a/views/ui/f6/select.html +++ b/views/ui/f6/select.html @@ -30,11 +30,11 @@ {if $ui.l_blank}{/if} - {foreach $ui.list as $v} + {foreach $ui.list as $k => $v} {if isset($ui.l_value) && isset($ui.l_label)} {else} - + {/if} {/foreach} -- 2.17.1