307 Zeilen
8 KiB
Handlebars
307 Zeilen
8 KiB
Handlebars
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.type"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{combo-box
|
|
value=action.type
|
|
content=types
|
|
onChange=(action (mut action.type))
|
|
options=(hash
|
|
none="admin.wizard.field.type"
|
|
)}}
|
|
</div>
|
|
</div>
|
|
|
|
{{#if basicTopicFields}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.title"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.title
|
|
options=(hash
|
|
hasOutput=true
|
|
wizardSelection=true
|
|
userFieldSelection='key,value'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.post"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{combo-box
|
|
value=action.post
|
|
content=wizardFields
|
|
nameProperty='label'
|
|
onChange=(action (mut action.post))
|
|
options=(hash
|
|
none='admin.wizard.select_field'
|
|
isDisabled=action.post_builder
|
|
)}}
|
|
|
|
<div class="setting-gutter">
|
|
{{input type='checkbox' checked=action.post_builder}}
|
|
<span>{{i18n 'admin.wizard.action.post_builder.checkbox'}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{#if action.post_builder}}
|
|
<div class="setting full">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.action.post_builder.label'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value editor">
|
|
{{wizard-text-editor
|
|
value=action.post_template
|
|
wizardFields=wizardFields}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
{{#if publicTopicFields}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.create_topic.category"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.category
|
|
options=(hash
|
|
hasOutput=true
|
|
textSelection='key,value'
|
|
wizardSelection=true
|
|
userFieldSelection='key,value'
|
|
categorySelection='output'
|
|
outputDefaultSelection='category'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.create_topic.tags"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.tags
|
|
options=(hash
|
|
hasOutput=true
|
|
tagSelection='output'
|
|
wizardSelection=true
|
|
userFieldSelection='key,value'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if sendMessage}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.send_message.recipient"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.recipient
|
|
options=(hash
|
|
hasOutput=true
|
|
textSelection='value,output'
|
|
wizardSelection=true
|
|
userFieldSelection='key,value'
|
|
groupSelection='key,value'
|
|
userSelection='output'
|
|
outputDefaultSelection='user'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if updateProfile}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.action.update_profile.label'}}</label>
|
|
</div>
|
|
|
|
{{wizard-mapper
|
|
inputs=action.profile_updates
|
|
keyPlaceholder='admin.wizard.action.update_profile.key'
|
|
options=(hash
|
|
pairConnector='set'
|
|
userFieldSelection='key'
|
|
wizardSelection='value'
|
|
keyDefaultSelection='userField'
|
|
)}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if sendToApi}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.send_to_api.api"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{combo-box
|
|
value=action.api
|
|
content=availableApis
|
|
onChange=(action (mut action.api))
|
|
options=(hash
|
|
isDisabled=action.custom_title_enabled
|
|
none='admin.wizard.action.send_to_api.select_an_api'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.send_to_api.endpoint"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{combo-box
|
|
value=action.api_endpoint
|
|
content=availableEndpoints
|
|
onChange=(action (mut action.api_endpoint))
|
|
options=(hash
|
|
isDisabled=apiEmpty
|
|
none='admin.wizard.action.send_to_api.select_an_endpoint'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting full">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.send_to_api.body"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-text-editor
|
|
value=action.api_body
|
|
previewEnabled=false
|
|
barEnabled=false
|
|
wizardFields=wizardFields
|
|
placeholder='admin.wizard.action.send_to_api.body_placeholder'}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if addToGroup}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.group"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.group
|
|
options=(hash
|
|
hasOutput=true
|
|
textSelection='value,output'
|
|
wizardSelection='key,value,assignment'
|
|
userFieldSelection='key,value,assignment'
|
|
groupSelection='value,output'
|
|
outputDefaultSelection='group'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if routeTo}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.route_to.url"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{input value=action.url}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if hasAdvanced}}
|
|
{{wizard-advanced-toggle showAdvanced=action.showAdvanced}}
|
|
|
|
{{#if action.showAdvanced}}
|
|
<div class="advanced-settings">
|
|
|
|
{{#if basicTopicFields}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.action.custom_fields.label'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.custom_fields
|
|
keyPlaceholder='admin.wizard.action.custom_fields.key'
|
|
options=(hash
|
|
pairConnector='set'
|
|
wizardSelection='value'
|
|
userFieldSelection='value'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if sendMessage}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.required'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-mapper
|
|
inputs=action.required
|
|
options=(hash
|
|
textSelection='value'
|
|
wizardSelection=true
|
|
userFieldSelection=true
|
|
groupSelection=true
|
|
)}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if newTopicFields}}
|
|
<div class="setting full">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.skip_redirect.label"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{input type='checkbox' checked=action.skip_redirect}}
|
|
|
|
<span>
|
|
{{i18n 'admin.wizard.action.skip_redirect.description' type='topic'}}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if routeTo}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n "admin.wizard.action.route_to.code"}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{input value=action.code}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|