1
0
Fork 0

Separate raw and cooked descriptions

Dieser Commit ist enthalten in:
Angus McLeod 2017-11-03 16:22:50 +08:00
Ursprung 8a216fcfcf
Commit f3588dbe89
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -72,7 +72,7 @@ const CustomWizard = Discourse.Model.extend({
if (s.title) step['title'] = s.title; if (s.title) step['title'] = s.title;
if (s.key) step['key'] = s.key; if (s.key) step['key'] = s.key;
if (s.banner) step['banner'] = s.banner; if (s.banner) step['banner'] = s.banner;
if (s.description) step['description'] = s.description; if (s.raw_description) step['raw_description'] = s.raw_description;
const fields = s.get('fields'); const fields = s.get('fields');
if (fields.length) { if (fields.length) {
@ -218,7 +218,7 @@ CustomWizard.reopenClass({
id: s.id, id: s.id,
key: s.key, key: s.key,
title: s.title, title: s.title,
description: s.description, raw_description: s.raw_description,
banner: s.banner, banner: s.banner,
fields, fields,
actions, actions,

Datei anzeigen

@ -39,7 +39,7 @@
<h3>{{i18n 'admin.wizard.step.description'}}</h3> <h3>{{i18n 'admin.wizard.step.description'}}</h3>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{d-editor value=step.description placeholder="admin.wizard.custom_text_placeholder"}} {{d-editor value=step.raw_description placeholder="admin.wizard.custom_text_placeholder"}}
</div> </div>
</div> </div>

Datei anzeigen

@ -78,7 +78,7 @@ class CustomWizard::AdminController < ::ApplicationController
## end of error checks ## end of error checks
wizard['steps'].each do |s| wizard['steps'].each do |s|
s['description'] = PrettyText.cook(s['description']) if s['description'] s['description'] = PrettyText.cook(s['raw_description']) if s['raw_description']
end end
existing = PluginStore.get('custom_wizard', wizard['id']) || {} existing = PluginStore.get('custom_wizard', wizard['id']) || {}