Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Add rich text for step descriptions
Dieser Commit ist enthalten in:
Ursprung
df65c92665
Commit
d14db3678a
4 geänderte Dateien mit 32 neuen und 2 gelöschten Zeilen
|
@ -34,12 +34,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting">
|
||||
<div class="setting full">
|
||||
<div class="setting-label">
|
||||
<h3>{{i18n 'admin.wizard.step.description'}}</h3>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{textarea name="description" value=step.description placeholder=(i18n "admin.wizard.custom_text_placeholder")}}
|
||||
{{d-editor value=step.description placeholder="admin.wizard.custom_text_placeholder"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
.wizard-column .wizard-field .input-area {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
img.emoji {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.step-message {
|
||||
|
|
|
@ -60,10 +60,28 @@
|
|||
margin-top: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.d-editor {
|
||||
width: 100%;
|
||||
|
||||
.d-editor-input {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.full {
|
||||
width: 100%;
|
||||
|
||||
.setting-value {
|
||||
width: initial;
|
||||
overflow: hidden;
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
|
|
|
@ -75,6 +75,12 @@ class CustomWizard::AdminController < ::ApplicationController
|
|||
|
||||
return render json: { error: error } if error
|
||||
|
||||
## end of error checks
|
||||
|
||||
wizard['steps'].each do |s|
|
||||
s['description'] = PrettyText.cook(s['description']) if s['description']
|
||||
end
|
||||
|
||||
existing = PluginStore.get('custom_wizard', wizard['id']) || {}
|
||||
new_time = existing['after_time_scheduled'] ?
|
||||
after_time_scheduled != Time.parse(existing['after_time_scheduled']).utc :
|
||||
|
|
Laden …
In neuem Issue referenzieren