1
0
Fork 0

Revert to post_builder

Dieser Commit ist enthalten in:
Angus McLeod 2020-04-15 11:23:41 +10:00
Ursprung 631640a7d7
Commit 1ac241fb9a
4 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,5 @@
import { default as discourseComputed, observes, on } from 'discourse-common/utils/decorators'; import { default as discourseComputed, observes, on } from 'discourse-common/utils/decorators';
import { equal, empty, or, notEmpty } from "@ember/object/computed"; import { equal, empty, or } from "@ember/object/computed";
import { generateName, selectKitContent, schema } from '../lib/wizard'; import { generateName, selectKitContent, schema } from '../lib/wizard';
import Component from "@ember/component"; import Component from "@ember/component";
@ -20,7 +20,6 @@ export default Component.extend({
basicTopicFields: or('createTopic', 'sendMessage', 'openComposer'), basicTopicFields: or('createTopic', 'sendMessage', 'openComposer'),
publicTopicFields: or('createTopic', 'openComposer'), publicTopicFields: or('createTopic', 'openComposer'),
showSkipRedirect: or('createTopic', 'sendMessage'), showSkipRedirect: or('createTopic', 'sendMessage'),
showPostBuilder: notEmpty('action.post_template'),
@discourseComputed('wizard.steps') @discourseComputed('wizard.steps')
runAfterContent(steps) { runAfterContent(steps) {

Datei anzeigen

@ -61,13 +61,13 @@
)}} )}}
<div class="setting-gutter"> <div class="setting-gutter">
{{input type='checkbox' checked=showPostBuilder}} {{input type='checkbox' checked=action.post_builder}}
<span>{{i18n 'admin.wizard.action.post_builder.checkbox'}}</span> <span>{{i18n 'admin.wizard.action.post_builder.checkbox'}}</span>
</div> </div>
</div> </div>
</div> </div>
{{#if showPostBuilder}} {{#if action.post_builder}}
<div class="setting full"> <div class="setting full">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.action.post_builder.label'}}</label> <label>{{i18n 'admin.wizard.action.post_builder.label'}}</label>

Datei anzeigen

@ -115,6 +115,7 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController
:skip_redirect, :skip_redirect,
:url, :url,
:post, :post,
:post_builder,
:post_template, :post_template,
title: mapped_params, title: mapped_params,
category: mapped_params, category: mapped_params,

Datei anzeigen

@ -306,7 +306,7 @@ class CustomWizard::Action
user: user user: user
).perform ).perform
params[:raw] = action['post_template'] ? params[:raw] = action['post_builder'] ?
mapper.interpolate(action['post_template']) : mapper.interpolate(action['post_template']) :
data[action['post']] data[action['post']]