aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/field_select.tpl
blob: 6c090ceb5d546089e4cc4616621fcd543a4a5575 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
	<div class="form-group">
		<label for="id_{{$field.0}}">{{$field.1}}{{if $field.5}}<sup class="required zuiqmid"> {{$field.5}}</sup>{{/if}}</label>
		<select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}">
			{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
		</select>
		<small class="form-text text-muted">{{$field.3}}</small	>
	</div>
{{* 
	COMMENTS for this template:
	@author hilmar runge, 2020.01
	$field array index:
		.0	field name: name=... for input, id=id_... for input, id=label_... for label, id=help_... for small text
		.1	label text
		.2	selected field
		.3	form text
		.4	option value(s)
		.5	label text addition, used for qmc
	css classes used:
		.required, .code
		.form-group, .form-control, .form-text, .text-muted
*}}