|
|
|
|
@ -55,31 +55,31 @@ |
|
|
|
|
<div class="rc-apps-settings__item"> |
|
|
|
|
{{#if $eq type 'string'}} |
|
|
|
|
|
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-input__wrapper"> |
|
|
|
|
{{#if multiline}} |
|
|
|
|
<textarea class="rc-input__element" name="{{id}}" rows="4" style="height: auto">{{value}}</textarea> |
|
|
|
|
{{else}} |
|
|
|
|
<input class="rc-input__element" type="text" name="{{id}}" value="{{value}}" placeholder="{{_ i18nPlaceholder}}" /> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-input__wrapper"> |
|
|
|
|
{{#if multiline}} |
|
|
|
|
<textarea class="rc-input__element" name="{{id}}" rows="4" style="height: auto">{{value}}</textarea> |
|
|
|
|
{{else}} |
|
|
|
|
<input class="rc-input__element" type="text" name="{{id}}" value="{{value}}" placeholder="{{_ i18nPlaceholder}}" /> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{else if $eq type 'boolean'}} |
|
|
|
|
<div class="rc-switch rc-switch--blue"> |
|
|
|
|
<div class="rc-switch rc-switch--blue"> |
|
|
|
|
<label class="rc-switch__label" tabindex="-1" for="{{id}}"> |
|
|
|
|
<input type="checkbox" class="rc-switch__input" name="{{id}}" id="{{id}}" checked="{{$eq value true}}"> |
|
|
|
|
<span class="rc-switch__button"> |
|
|
|
|
@ -91,7 +91,7 @@ |
|
|
|
|
</label> |
|
|
|
|
<span class="rc-switch__description">{{{parseDescription i18nDescription}}}</span> |
|
|
|
|
</div> |
|
|
|
|
{{else if $eq type 'int'}} |
|
|
|
|
{{else if $eq type 'int'}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
@ -115,7 +115,7 @@ |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{else if $eq type 'password'}} |
|
|
|
|
{{else if $eq type 'password'}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
@ -139,129 +139,237 @@ |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="input-line double-col"> |
|
|
|
|
<label class="setting-label">{{_ i18nLabel}}</label> |
|
|
|
|
<div class="setting-field"> |
|
|
|
|
{{#if $eq type 'relativeUrl'}} |
|
|
|
|
<input class="input-monitor" type="text" name="{{id}}" value="{{relativeUrl value}}" placeholder="{{_ i18nPlaceholder}}" {{isReadonly}}/> |
|
|
|
|
{{else if $eq type 'relativeUrl'}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-input__wrapper"> |
|
|
|
|
{{#if $eq type 'relativeUrl'}} |
|
|
|
|
<input class="rc-input__element" type="text" name="{{id}}" value="{{relativeUrl value}}" placeholder="{{_ i18nPlaceholder}}" {{isReadonly}}/> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'select'}} |
|
|
|
|
<div class="select-arrow"> |
|
|
|
|
<i class="icon-down-open secondary-font-color"></i> |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
<select class="input-monitor" name="{{id}}"> |
|
|
|
|
{{#each values}} |
|
|
|
|
<option value="{{key}}" selected="{{selectedOption ../id key}}">{{_ i18nLabel}}</option> |
|
|
|
|
{{/each}} |
|
|
|
|
</select> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'language'}} |
|
|
|
|
<div class="select-arrow"> |
|
|
|
|
<i class="icon-down-open secondary-font-color"></i> |
|
|
|
|
</div> |
|
|
|
|
{{else if $eq type 'font'}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-input__wrapper"> |
|
|
|
|
{{#if multiline}} |
|
|
|
|
<textarea class="rc-input__element" name="{{id}}" rows="4" style="height: auto">{{value}}</textarea> |
|
|
|
|
{{else}} |
|
|
|
|
<input class="rc-input__element" type="text" name="{{id}}" value="{{value}}" placeholder="{{_ i18nPlaceholder}}" /> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
<select class="input-monitor" name="{{id}}"> |
|
|
|
|
{{#each languages}} |
|
|
|
|
<option value="{{key}}" selected="{{appLanguage key}}" dir="auto">{{name}}</option> |
|
|
|
|
{{/each}} |
|
|
|
|
</select> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'color'}} |
|
|
|
|
<div class="horizontal"> |
|
|
|
|
{{#if $eq editor 'color'}} |
|
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
<input class="input-monitor colorpicker-input" type="text" name="{{id}}" value="{{value}}" autocomplete="off"/> |
|
|
|
|
<span class="colorpicker-swatch border-component-color" style="background-color: {{value}}"></span> |
|
|
|
|
</div> |
|
|
|
|
{{else if $eq type 'code'}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-input__wrapper"> |
|
|
|
|
{{#if isDisabled.disabled}} |
|
|
|
|
{{> CodeMirror name=id options=(getEditorOptions true) code=(i18nDefaultValue) }} |
|
|
|
|
{{else}} |
|
|
|
|
<div class="code-mirror-box" data-editor-id="{{id}}"> |
|
|
|
|
<div class="title"> |
|
|
|
|
{{label}} |
|
|
|
|
</div> |
|
|
|
|
{{> CodeMirror name=id options=getEditorOptions code=value }} |
|
|
|
|
<div class="buttons"> |
|
|
|
|
<button class="button primary button-fullscreen">Full Screen</button> |
|
|
|
|
<button class="button primary button-restore">Exit Full Screen</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if $eq editor 'expression'}} |
|
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
<input class="input-monitor" type="text" name="{{id}}" value="{{value}}"/> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
<div class="color-editor"> |
|
|
|
|
<div class="select-arrow"> |
|
|
|
|
<i class="icon-down-open secondary-font-color"></i> |
|
|
|
|
</div> |
|
|
|
|
<select name="color-editor"> |
|
|
|
|
{{#each allowedTypes}} |
|
|
|
|
<option value="{{.}}" selected="{{$eq ../editor .}}">{{_ .}}</option> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{{else if $eq type 'select'}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-select"> |
|
|
|
|
<select class="rc-select__element" name="{{id}}"> |
|
|
|
|
{{#each values}} |
|
|
|
|
<option class="rc-select__option" value="{{key}}" selected="{{selectedOption ../id key}}">{{_ i18nLabel}}</option> |
|
|
|
|
{{/each}} |
|
|
|
|
</select> |
|
|
|
|
{{> icon block="rc-select__arrow" icon="arrow-down" }} |
|
|
|
|
</div> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="settings-description">Variable name: {{getColorVariable id}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'font'}} |
|
|
|
|
<input class="input-monitor" type="text" name="{{id}}" value="{{value}}"/> |
|
|
|
|
{{/if}} |
|
|
|
|
{{else if $eq type 'color'}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'code'}} |
|
|
|
|
{{#if isDisabled.disabled}} |
|
|
|
|
{{> CodeMirror name=id options=(getEditorOptions true) code=(i18nDefaultValue) }} |
|
|
|
|
{{else}} |
|
|
|
|
<div class="code-mirror-box" data-editor-id="{{id}}"> |
|
|
|
|
<div class="title"> |
|
|
|
|
{{label}} |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-input__wrapper"> |
|
|
|
|
{{#if multiline}} |
|
|
|
|
<textarea class="rc-input__element" name="{{id}}" rows="4" style="height: auto">{{value}}</textarea> |
|
|
|
|
{{else}} |
|
|
|
|
<input class="rc-input__element" type="color" name="{{id}}" value="{{value}}" placeholder="{{_ i18nPlaceholder}}" /> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{> CodeMirror name=id options=getEditorOptions code=value }} |
|
|
|
|
{{setEditorOnBlur id}} |
|
|
|
|
<div class="buttons"> |
|
|
|
|
<button class="button primary button-fullscreen">Full Screen</button> |
|
|
|
|
<button class="button primary button-restore">Exit Full Screen</button> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
<!-- <div class="horizontal"> |
|
|
|
|
{{#if $eq editor 'color'}} |
|
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
<input class="input-monitor colorpicker-input" type="text" name="{{id}}" value="{{value}}" autocomplete="off"/> |
|
|
|
|
<span class="colorpicker-swatch border-component-color" style="background-color: {{value}}"></span> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if $eq editor 'expression'}} |
|
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
<input class="input-monitor" type="" name="{{id}}" value="{{value}}"/> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
<div class="color-editor"> |
|
|
|
|
<div class="select-arrow"> |
|
|
|
|
<i class="icon-down-open secondary-font-color"></i> |
|
|
|
|
</div> |
|
|
|
|
<select name="color-editor"> |
|
|
|
|
{{#each allowedTypes}} |
|
|
|
|
<option value="{{.}}" selected="{{$eq ../editor .}}">{{_ .}}</option> |
|
|
|
|
{{/each}} |
|
|
|
|
</select> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="settings-description">Variable name: {{getColorVariable id}}</div> --> |
|
|
|
|
{{ else if $eq type 'language'}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'action'}} |
|
|
|
|
{{#if hasChanges section}} |
|
|
|
|
<span style="line-height: 40px" class="secondary-font-color">{{_ "Save_to_enable_this_action"}}</span> |
|
|
|
|
{{else}} |
|
|
|
|
<button type="button" class="button primary action" data-setting="{{id}}" data-action="{{value}}">{{_ actionText}}</button> |
|
|
|
|
<div class="rc-input"> |
|
|
|
|
<label class="rc-input__label"> |
|
|
|
|
<div class="rc-input__title">{{_ i18nLabel}}</div> |
|
|
|
|
<div class="rc-select"> |
|
|
|
|
<select class="rc-select__element" name="{{id}}"> |
|
|
|
|
{{#each languages}} |
|
|
|
|
<option class="rc-select__option" value="{{key}}" selected="{{selectedOption key}}">{{_ name}}</option> |
|
|
|
|
{{/each}} |
|
|
|
|
</select> |
|
|
|
|
{{> icon block="rc-select__arrow" icon="arrow-down" }} |
|
|
|
|
</div> |
|
|
|
|
</label> |
|
|
|
|
{{# if i18nDescription}} |
|
|
|
|
<div class="rc-input__description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{# if i18nAlert}} |
|
|
|
|
<div class="rc-input__error"> |
|
|
|
|
<div class="rc-input__error-icon"> |
|
|
|
|
{{> icon block="rc-input__error-icon" icon="warning" classes="rc-input__error-icon-svg"}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-input__error-message">{{_ "i18nAlert"}}</div> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="input-line double-col"> |
|
|
|
|
<label class="setting-label">{{_ i18nLabel}}</label> |
|
|
|
|
<div class="setting-field"> |
|
|
|
|
{{#if $eq type 'action'}} |
|
|
|
|
{{#if hasChanges section}} |
|
|
|
|
<span style="line-height: 40px" class="secondary-font-color">{{_ "Save_to_enable_this_action"}}</span> |
|
|
|
|
{{else}} |
|
|
|
|
<button type="button" class="button primary action" data-setting="{{id}}" data-action="{{value}}">{{_ actionText}}</button> |
|
|
|
|
{{/if}} |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'asset'}} |
|
|
|
|
{{#if value.url}} |
|
|
|
|
<div class="settings-file-preview"> |
|
|
|
|
<div class="preview" style="background-image:url({{value.url}}?_dc={{random}});"></div> |
|
|
|
|
<div class="action"> |
|
|
|
|
<button type="button" class="button danger delete-asset"><i class="icon-trash secondary-font-color"></i>{{_ 'Delete'}}</button> |
|
|
|
|
{{#if value.url}} |
|
|
|
|
<div class="settings-file-preview"> |
|
|
|
|
<div class="preview" style="background-image:url({{value.url}}?_dc={{random}});"></div> |
|
|
|
|
<div class="action"> |
|
|
|
|
<button type="button" class="button danger delete-asset"><i class="icon-trash secondary-font-color"></i>{{_ 'Delete'}}</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="settings-file-preview"> |
|
|
|
|
<div class="preview no-file background-transparent-light secondary-font-color"><i class="icon-upload secondary-font-color"></i></div> |
|
|
|
|
<div class="action"> |
|
|
|
|
<div class="button primary">{{_ 'Select_file'}} |
|
|
|
|
<input type="file" accept="{{assetAccept fileConstraints}}" /> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="settings-file-preview"> |
|
|
|
|
<div class="preview no-file background-transparent-light secondary-font-color"><i class="icon-upload secondary-font-color"></i></div> |
|
|
|
|
<div class="action"> |
|
|
|
|
<div class="button primary">{{_ 'Select_file'}} |
|
|
|
|
<input type="file" accept="{{assetAccept fileConstraints}}" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{/if}} |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if $eq type 'roomPick'}} |
|
|
|
|
<div> |
|
|
|
|
{{> inputAutocomplete settings=autocompleteRoom id=id name=id class="search autocomplete" autocomplete="off" disabled=isDisabled.disabled}} |
|
|
|
|
<ul class="selected-rooms"> |
|
|
|
|
{{#each selectedRooms}} |
|
|
|
|
<li class="remove-room" data-setting={{../id}}>{{name}} <i class="icon-cancel secondary-font-color"></i></li> |
|
|
|
|
{{/each}} |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
{{> inputAutocomplete settings=autocompleteRoom id=id name=id class="search autocomplete" autocomplete="off" disabled=isDisabled.disabled}} |
|
|
|
|
<ul class="selected-rooms"> |
|
|
|
|
{{#each selectedRooms}} |
|
|
|
|
<li class="remove-room" data-setting={{../id}}>{{name}} <i class="icon-cancel secondary-font-color"></i></li> |
|
|
|
|
{{/each}} |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if i18nDescription}} |
|
|
|
|
<div class="settings-description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if i18nAlert}} |
|
|
|
|
<div class="settings-alert pending-color pending-background pending-border"><i class="icon-attention secondary-font-color"></i>{{{_ i18nAlert}}}</div> |
|
|
|
|
<div class="settings-description">{{{parseDescription i18nDescription}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if i18nAlert}} |
|
|
|
|
<div class="settings-alert pending-color pending-background pending-border"><i class="icon-attention secondary-font-color"></i>{{{_ i18nAlert}}}</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|