Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +01:00
Separate raw and cooked descriptions
Dieser Commit ist enthalten in:
Ursprung
8a216fcfcf
Commit
f3588dbe89
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
|
@ -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,
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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']) || {}
|
||||||
|
|
Laden …
In neuem Issue referenzieren