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">
|
2017-01-14 17:58:54 +01:00
|
|
|
<!-- text/number input -->
|
|
|
|
<input ng-if="type === 'text' || type === 'number'"
|
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}"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-change="save(configOption, $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
|
|
|
|
2017-01-14 17:58:54 +01:00
|
|
|
<!-- checkbox -->
|
|
|
|
<div ng-if="type === 'checkbox'" class="config-checkbox">
|
|
|
|
<i class="fa" id="{{ key }}"
|
|
|
|
ng-click="$parent.value = !$parent.value; save(configOption, $parent.value)"
|
|
|
|
ng-class="$parent.value ? 'fa-check-square-o' : 'fa-square-o'"></i>
|
|
|
|
</div>
|
|
|
|
|
2016-09-09 15:16:56 +02:00
|
|
|
<!-- comments -->
|
2017-01-14 17:58:54 +01:00
|
|
|
<div class="input-comments" ng-if="type === 'comments'">
|
2017-08-11 12:37:19 +02:00
|
|
|
<div ng-repeat="entry in $parent.value | excludeSpecialComments" class="input-group">
|
2016-09-09 15:16:56 +02:00
|
|
|
<input ng-model="entry.name"
|
|
|
|
ng-model-options="{debounce: 1000}"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-change="save(configOption, $parent.value)"
|
2016-09-09 15:16:56 +02:00
|
|
|
class="form-control"
|
|
|
|
id="{{ key }}"
|
|
|
|
type="text">
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type=button" class="btn btn-default"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-click="entry.public = !entry.public; save(configOption, $parent.value);">
|
2016-09-09 15:16:56 +02:00
|
|
|
<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"
|
2017-04-06 15:49:42 +02:00
|
|
|
ng-click="removeComment(configOption, $parent, $index)">
|
2016-09-09 15:16:56 +02:00
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
<translate>Remove</translate>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div>
|
2017-04-06 15:49:42 +02:00
|
|
|
<button type="button" ng-click="addComment(configOption, $parent)"
|
2016-09-09 15:16:56 +02:00
|
|
|
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 -->
|
2017-01-14 17:58:54 +01:00
|
|
|
<input ng-if="type === 'colorpicker'"
|
2016-02-21 22:03:25 +01:00
|
|
|
colorpicker
|
|
|
|
class="form-control"
|
|
|
|
ng-model="$parent.value"
|
2016-08-03 21:03:40 +02:00
|
|
|
ng-model-options="{debounce: 1000}"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-change="save(configOption, $parent.value)"
|
2016-02-21 22:03:25 +01:00
|
|
|
type="text">
|
|
|
|
|
2016-09-23 14:03:07 +02:00
|
|
|
<!-- datetimepicker -->
|
2017-01-14 17:58:54 +01:00
|
|
|
<input ng-if="type === 'datetimepicker'"
|
2016-09-23 14:03:07 +02:00
|
|
|
class="form-control"
|
|
|
|
datetime-picker="dd.MM.yyyy HH:mm"
|
|
|
|
ng-model="$parent.value"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-change="save(configOption, $parent.value)"
|
2016-09-23 14:03:07 +02:00
|
|
|
is-open="datetimeOpen[key]"
|
|
|
|
ng-focus="datetimeOpen[key]=true;"
|
|
|
|
save-as="'number'"
|
|
|
|
button-bar="dateTimePickerTranslatedButtons"
|
|
|
|
default-time="10:00:00">
|
|
|
|
|
2016-02-21 22:03:25 +01:00
|
|
|
<!-- textarea -->
|
2017-01-14 17:58:54 +01:00
|
|
|
<textarea ng-if="type === 'textarea'"
|
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}"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-change="save(configOption, $parent.value)"
|
2016-01-09 19:36:41 +01:00
|
|
|
id="{{ key }}" class="form-control">
|
2016-01-09 14:22:32 +01:00
|
|
|
</textarea>
|
2015-06-29 14:17:05 +02:00
|
|
|
|
2017-01-06 10:00:31 +01:00
|
|
|
<!-- editor -->
|
2017-01-14 17:58:54 +01:00
|
|
|
<textarea ng-if="type === 'editor'"
|
2017-01-06 10:00:31 +01:00
|
|
|
id="{{ configOption.key }}"
|
|
|
|
ckeditor="ckeditorOptions"
|
|
|
|
ng-model="$parent.value" class="form-control"
|
|
|
|
ng-model-options="{debounce: 1000}">
|
|
|
|
</textarea>
|
|
|
|
|
2016-02-21 22:03:25 +01:00
|
|
|
<!-- select -->
|
2017-01-14 17:58:54 +01:00
|
|
|
<select ng-if="type === 'choice'"
|
2016-01-09 19:36:41 +01:00
|
|
|
ng-model="$parent.value"
|
2016-08-03 21:03:40 +02:00
|
|
|
ng-model-options="{debounce: 500}"
|
2017-01-14 17:58:54 +01:00
|
|
|
ng-change="save(configOption, $parent.value)"
|
2016-11-01 23:30:54 +01:00
|
|
|
id="{{ key }}" class="form-control"
|
|
|
|
ng-options="option.value as option.display_name | translate for option in choices">
|
2015-06-29 14:17:05 +02:00
|
|
|
</select>
|
|
|
|
|
2017-08-30 12:17:07 +02:00
|
|
|
<!-- custom trnaslations -->
|
|
|
|
<div class="config-translations" ng-if="type === 'translations'">
|
|
|
|
<div ng-repeat="entry in $parent.value" class="input-group">
|
|
|
|
<div class="inputs">
|
|
|
|
<input ng-model="entry.original"
|
|
|
|
ng-model-options="{debounce: 1000}"
|
|
|
|
ng-change="save(configOption, $parent.value)"
|
|
|
|
class="form-control"
|
|
|
|
id="{{ key }}_original"
|
|
|
|
type="text">
|
|
|
|
<span class="arrow form-control"><i class="fa fa-arrow-right"></i></span>
|
|
|
|
<input ng-model="entry.translation"
|
|
|
|
ng-model-options="{debounce: 1000}"
|
|
|
|
ng-change="save(configOption, $parent.value)"
|
|
|
|
class="form-control"
|
|
|
|
id="{{ key }}_translated"
|
|
|
|
type="text">
|
|
|
|
</div>
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
ng-click="removeTranslation(configOption, $parent, $index)">
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
<translate>Remove</translate>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button type="button" ng-click="addTranslation(configOption, $parent)"
|
|
|
|
class="btn btn-default btn-sm">
|
|
|
|
<i class="fa fa-plus"></i>
|
|
|
|
<translate>Add new custom translation</translate>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-01-14 17:58:54 +01:00
|
|
|
<span id="success-{{ key }}" class="input-group-addon" ng-if="configOption.success !== undefined">
|
|
|
|
<i class="fa fa-lg fa-check-circle text-success"
|
|
|
|
ng-if="configOption.success === true"></i>
|
|
|
|
<i class="fa fa-lg fa-exclamation-triangle text-danger"
|
|
|
|
ng-if="configOption.success === false"
|
|
|
|
uib-tooltip="{{ configOption.errorMessage | translate }}"></i>
|
|
|
|
</span>
|
|
|
|
|
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>
|