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

69 lines
2.5 KiB
HTML
Raw Normal View History

<div class="form-group">
<label>{{ label | translate }}</label>
<div class="input-group">
<!-- text/number input, checkbox -->
<input ng-if="type == 'text' || type == 'number' || type == 'checkbox'"
2016-01-09 19:36:41 +01:00
ng-model="$parent.value"
ng-model-options="{debounce: 1000}"
2016-01-09 19:36:41 +01:00
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
<!-- resolution -->
<!-- Can be removed with multiprojector, but maybe it could be reused in the projectormanage-view -->
<!-- if removed, remember to delete the class resolution -->
<span ng-if="type == 'resolution'">
<translate>Width</translate>:
<input ng-model="$parent.value.width"
ng-model-option="{debounce: 1000}"
ng-change="save(configOption.key, $parent.value)"
class="form-control resolution"
id="{{ key }}_width"
type="number">
<translate>Height</translate>:
<input ng-model="$parent.value.height"
ng-model-option="{debounce: 1000}"
ng-change="save(configOption.key, $parent.value)"
class="form-control resolution"
id="{{ key }}_height"
type="number">
</span>
<!-- colorpicker -->
<input ng-if="type == 'colorpicker'"
colorpicker
class="form-control"
ng-model="$parent.value"
ng-model-options="{debounce: 1000}"
ng-change="save(configOption.key, $parent.value)"
type="text">
<!-- textarea -->
2016-01-09 19:36:41 +01:00
<textarea ng-if="type == 'textarea'"
ng-model="$parent.value"
ng-model-options="{debounce: 1000}"
2016-01-09 19:36:41 +01:00
ng-change="save(configOption.key, $parent.value)"
id="{{ key }}" class="form-control">
</textarea>
<!-- select -->
2016-01-09 19:36:41 +01:00
<select ng-if="type == 'choice'"
ng-model="$parent.value"
ng-model-options="{debounce: 500}"
2016-01-09 19:36:41 +01:00
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">
<button ng-click="reset()" class="btn btn-default" title="{{ default_value | translate }}">
<i class="fa fa-undo"></i>
<translate>Reset</translate>
</button>
</span>
</div>
<p ng-if="help_text" class="help-block">{{ help_text | translate }}</p>
</div>