Merge branch 'master' into custom_field_management
Dieser Commit ist enthalten in:
Commit
9e0cf29b7c
6 geänderte Dateien mit 27 neuen und 4 gelöschten Zeilen
|
@ -29,7 +29,7 @@ export default Component.extend(UndoChanges, {
|
|||
hasCustomFields: or('basicTopicFields', 'updateProfile', 'createGroup', 'createCategory'),
|
||||
basicTopicFields: or('createTopic', 'sendMessage', 'openComposer'),
|
||||
publicTopicFields: or('createTopic', 'openComposer'),
|
||||
showSkipRedirect: or('createTopic', 'sendMessage'),
|
||||
showPostAdvanced: or('createTopic', 'sendMessage'),
|
||||
actionTypes: Object.keys(wizardSchema.action.types).map(type => {
|
||||
return {
|
||||
id: type,
|
||||
|
|
|
@ -117,7 +117,8 @@ const action = {
|
|||
tags: null,
|
||||
visible: null,
|
||||
custom_fields: null,
|
||||
skip_redirect: null
|
||||
skip_redirect: null,
|
||||
suppress_notifications: null,
|
||||
},
|
||||
send_message: {
|
||||
title: null,
|
||||
|
@ -127,7 +128,8 @@ const action = {
|
|||
skip_redirect: null,
|
||||
custom_fields: null,
|
||||
required: null,
|
||||
recipient: null
|
||||
recipient: null,
|
||||
suppress_notifications: null
|
||||
},
|
||||
open_composer: {
|
||||
title: null,
|
||||
|
@ -218,6 +220,7 @@ const action = {
|
|||
'code',
|
||||
'custom_fields',
|
||||
'skip_redirect',
|
||||
'suppress_notifications',
|
||||
'required'
|
||||
],
|
||||
required: [
|
||||
|
|
|
@ -762,7 +762,7 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if showSkipRedirect}}
|
||||
{{#if showPostAdvanced}}
|
||||
<div class="setting full">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.skip_redirect.label"}}</label>
|
||||
|
@ -776,6 +776,20 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting full">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.suppress_notifications.label"}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input type='checkbox' checked=action.suppress_notifications}}
|
||||
|
||||
<span>
|
||||
{{i18n 'admin.wizard.action.suppress_notifications.description' type='topic'}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if routeTo}}
|
||||
|
|
|
@ -203,6 +203,9 @@ en:
|
|||
skip_redirect:
|
||||
label: "Redirect"
|
||||
description: "Don't redirect the user to this {{type}} after the wizard completes"
|
||||
suppress_notifications:
|
||||
label: "Suppress Notifications"
|
||||
description: "Suppress normal notifications triggered by post creation"
|
||||
send_message:
|
||||
label: "Send Message"
|
||||
recipient: "Recipient"
|
||||
|
|
|
@ -114,6 +114,7 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController
|
|||
:type,
|
||||
:code,
|
||||
:skip_redirect,
|
||||
:suppress_notifications,
|
||||
:post,
|
||||
:post_builder,
|
||||
:post_template,
|
||||
|
|
|
@ -443,6 +443,8 @@ class CustomWizard::Action
|
|||
mapper.interpolate(action['post_template']) :
|
||||
data[action['post']]
|
||||
|
||||
params[:import_mode] = ActiveRecord::Type::Boolean.new.cast(action['suppress_notifications'])
|
||||
|
||||
add_custom_fields(params)
|
||||
end
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren