diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-01 14:36:17 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-01 14:36:17 +0100 |
commit | ef94747e5eb4d8b2e3566835280c31b848fc28e6 (patch) | |
tree | b9db09edcfded0c53f37a31c6a368bc3108eade7 /view/tpl | |
parent | 93b94704878c1b66ee95987de2b24dc39163763a (diff) | |
download | volse-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.tpl | 12 |
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> |