aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2015-01-01 14:36:17 +0100
committerStefan Parviainen <saparvia@caterva.eu>2015-01-01 14:36:17 +0100
commitef94747e5eb4d8b2e3566835280c31b848fc28e6 (patch)
treeb9db09edcfded0c53f37a31c6a368bc3108eade7 /view/tpl
parent93b94704878c1b66ee95987de2b24dc39163763a (diff)
downloadvolse-hubzilla-ef94747e5eb4d8b2e3566835280c31b848fc28e6.tar.gz
volse-hubzilla-ef94747e5eb4d8b2e3566835280c31b848fc28e6.tar.bz2
volse-hubzilla-ef94747e5eb4d8b2e3566835280c31b848fc28e6.zip
Add field template for grouped selects
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/field_select_grouped.tpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/view/tpl/field_select_grouped.tpl b/view/tpl/field_select_grouped.tpl
new file mode 100644
index 000000000..c7fb4f322
--- /dev/null
+++ b/view/tpl/field_select_grouped.tpl
@@ -0,0 +1,12 @@
+ <div class='field select'>
+ <label for='id_{{$field.0}}'>{{$field.1}}</label>
+ <select name='{{$field.0}}' id='id_{{$field.0}}'>
+ {{foreach $field.4 as $group=>$opts}}
+ <optgroup label='{{$group}}'>
+ {{foreach $opts as $opt=>$val}}
+ <option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
+ {{/foreach}}
+ </optgroup>
+ </select>
+ <span class='field_help'>{{$field.3}}</span>
+ </div>