OpenSlides/openslides/core/static/templates/config-form-field.html
2016-01-09 14:22:32 +01:00

24 lines
1003 B
HTML

<div class="form-group">
<label>{{ label }}</label>
<div class="input-group">
<input ng-if="type != 'choice' && type != 'textarea'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}"
type="{{ type }}" class="form-control">
<textarea ng-if="type == 'textarea'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}" class="form-control">
</textarea>
<select ng-if="type == 'choice'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}"
class="form-control" ng-options="option.value as option.display_name for option in choices">
</select>
<span class="input-group-btn">
<button ng-click="value=configOption.default_value; save(configOption.key, configOption.default_value)" class="btn btn-default" translate>
<i class="fa fa-undo"></i>
<translate>Reset</translate>
</button>
</span>
</div>
<p ng-if="help_text" class="help-block">{{ help_text }}</p>
</div>