OpenSlides/openslides/core/static/templates/config-form-field.html

34 lines
1.1 KiB
HTML
Raw Normal View History

<div class="form-group">
<label>{{ label }}</label>
<div class="input-group">
2016-01-09 19:36:41 +01:00
<input ng-if="type != 'choice' && type != 'textarea'"
ng-model="$parent.value"
ng-change="save(configOption.key, $parent.value)"
ng-class="{ 'form-control': type != 'checkbox' }"
2016-01-09 19:36:41 +01:00
id="{{ key }}"
type="{{ type }}">
2016-01-09 12:51:26 +01:00
2016-01-09 19:36:41 +01:00
<textarea ng-if="type == 'textarea'"
ng-model="$parent.value"
ng-change="save(configOption.key, $parent.value)"
id="{{ key }}" class="form-control">
</textarea>
2016-01-09 19:36:41 +01:00
<select ng-if="type == 'choice'"
ng-model="$parent.value"
ng-change="save(configOption.key, $parent.value)"
id="{{ key }}"
class="form-control" ng-options="option.value as option.display_name for option in choices">
</select>
<span class="input-group-btn">
2016-01-27 22:32:38 +01:00
<button ng-click="reset()" class="btn btn-default" title="{{ default_value }}">
<i class="fa fa-undo"></i>
<translate>Reset</translate>
</button>
</span>
</div>
<p ng-if="help_text" class="help-block">{{ help_text }}</p>
</div>