From 6595c41960a8de80fefcf42db3aa4a970bac871a Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 9 Aug 2013 13:13:37 -0400 Subject: [PATCH] Group input fields by type. --- plugins/settings/templates/settings.tmpl | 35 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/plugins/settings/templates/settings.tmpl b/plugins/settings/templates/settings.tmpl index f614c0a..430c7e6 100644 --- a/plugins/settings/templates/settings.tmpl +++ b/plugins/settings/templates/settings.tmpl @@ -22,13 +22,13 @@ #end if #if $mode.get($key, '') == 'select' #elif $mode.get($key, '') == 'checkbox' #set $i = 0 - #for $key in $source_known - #set $i += 1 - $row($i, $key, $section, $source_data) + #set $source_select = [] + #set $source_text = [] + #set $source_checkbox = [] + #for $k in $source_known + #set $m = $mode.get($k, 'text') + #if $m == 'select' + #set $source_select += [$k] + #elif $m == 'checkbox' + #set $source_checkbox += [$k] + #else + #set $source_text += [$k] + #end if + #end for + #for $l in [$source_select, $source_text, $source_checkbox] + #for $key in $l + #set $i += 1 + $row($i, $key, $section, $source_data) + #end for #end for
User Defined -- 2.11.4.GIT