0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 15:21:11 +02:00

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.key) step['key'] = s.key;
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');
if (fields.length) {
@ -218,7 +218,7 @@ CustomWizard.reopenClass({
id: s.id,
key: s.key,
title: s.title,
description: s.description,
raw_description: s.raw_description,
banner: s.banner,
fields,
actions,

Datei anzeigen

@ -39,7 +39,7 @@
<h3>{{i18n 'admin.wizard.step.description'}}</h3>
</div>
<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>

Datei anzeigen

@ -78,7 +78,7 @@ class CustomWizard::AdminController < ::ApplicationController
## end of error checks
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
existing = PluginStore.get('custom_wizard', wizard['id']) || {}