2015-06-15 21:25:43 +02:00
|
|
|
<div class="form-group">
|
2016-08-03 21:03:40 +02:00
|
|
|
<label>{{ label | translate }}</label>
|
2015-06-15 21:25:43 +02:00
|
|
|
|
|
|
|
<div class="input-group">
|
2016-02-21 22:03:25 +01:00
|
|
|
<!-- 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"
|
2016-08-03 21:03:40 +02:00
|
|
|
ng-model-options="{debounce: 1000}"
|
2016-01-09 19:36:41 +01:00
|
|
|
ng-change="save(configOption.key, $parent.value)"
|
2016-02-10 17:49:44 +01:00
|
|
|
ng-class="{ 'form-control': type != 'checkbox' }"
|
2016-01-09 19:36:41 +01:00
|
|
|
id="{{ key }}"
|
2016-02-21 22:03:25 +01:00
|
|
|
type="{{ type }}">
|
2016-01-09 12:51:26 +01:00
|
|
|
|
2016-08-25 16:40:34 +02: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>
|
|
|
|
|
2016-09-09 15:16:56 +02:00
|
|
|
<!-- comments -->
|
|
|
|
<div class="input-comments" ng-if="type == 'comments'">
|
|
|
|
<div ng-repeat="entry in $parent.value" class="input-group">
|
|
|
|
<input ng-model="entry.name"
|
|
|
|
ng-model-options="{debounce: 1000}"
|
|
|
|
ng-change="save(configOption.key, $parent.value)"
|
|
|
|
class="form-control"
|
|
|
|
id="{{ key }}"
|
|
|
|
type="text">
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type=button" class="btn btn-default"
|
|
|
|
ng-click="entry.public = !entry.public; save(configOption.key, $parent.value);">
|
|
|
|
<i class="fa" ng-class="entry.public ? 'fa-unlock' : 'fa-lock'"></i>
|
|
|
|
{{ (entry.public ? 'Public' : 'Private') | translate }}
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
ng-click="removeComment(configOption.key, $parent, $index)">
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
<translate>Remove</translate>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button type="button" ng-click="addComment(configOption.key, $parent)"
|
|
|
|
class="btn btn-default btn-sm">
|
|
|
|
<i class="fa fa-plus"></i>
|
2016-09-26 15:33:40 +02:00
|
|
|
<translate>Add new comment field</translate>
|
2016-09-09 15:16:56 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-02-21 22:03:25 +01:00
|
|
|
<!-- colorpicker -->
|
|
|
|
<input ng-if="type == 'colorpicker'"
|
|
|
|
colorpicker
|
|
|
|
class="form-control"
|
|
|
|
ng-model="$parent.value"
|
2016-08-03 21:03:40 +02:00
|
|
|
ng-model-options="{debounce: 1000}"
|
2016-02-21 22:03:25 +01:00
|
|
|
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"
|
2016-08-03 21:03:40 +02:00
|
|
|
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">
|
2016-01-09 14:22:32 +01:00
|
|
|
</textarea>
|
2015-06-29 14:17:05 +02:00
|
|
|
|
2016-02-21 22:03:25 +01:00
|
|
|
<!-- select -->
|
2016-01-09 19:36:41 +01:00
|
|
|
<select ng-if="type == 'choice'"
|
|
|
|
ng-model="$parent.value"
|
2016-08-03 21:03:40 +02:00
|
|
|
ng-model-options="{debounce: 500}"
|
2016-01-09 19:36:41 +01:00
|
|
|
ng-change="save(configOption.key, $parent.value)"
|
|
|
|
id="{{ key }}"
|
2015-06-29 14:17:05 +02:00
|
|
|
class="form-control" ng-options="option.value as option.display_name for option in choices">
|
|
|
|
</select>
|
|
|
|
|
2015-06-15 21:25:43 +02:00
|
|
|
<span class="input-group-btn">
|
2016-08-03 21:03:40 +02:00
|
|
|
<button ng-click="reset()" class="btn btn-default" title="{{ default_value | translate }}">
|
2015-06-15 21:25:43 +02:00
|
|
|
<i class="fa fa-undo"></i>
|
|
|
|
<translate>Reset</translate>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
2016-08-03 21:03:40 +02:00
|
|
|
<p ng-if="help_text" class="help-block">{{ help_text | translate }}</p>
|
2015-06-15 21:25:43 +02:00
|
|
|
</div>
|