Update step descriptions
Dieser Commit ist enthalten in:
Ursprung
1db9793d3e
Commit
856bd11e2a
5 geänderte Dateien mit 35 neuen und 27 gelöschten Zeilen
|
@ -63,14 +63,17 @@ const step = {
|
||||||
* type: step
|
* type: step
|
||||||
* number: 2
|
* number: 2
|
||||||
* title: Add the attribute to the wizard schema
|
* title: Add the attribute to the wizard schema
|
||||||
* description: Custom Wizard templates are modeled in the client via
|
* description: Custom Wizard templates are modeled and serialized in the
|
||||||
* the wizard-schema, which, along with the serialization in
|
* client via the Wizard Schema. In some cases, when adding a new
|
||||||
* wizard-json and models/custom-wizard, models and serializes
|
* attribute, you just need to add it to the schema for the
|
||||||
* data on the client. Normally when adding an attribute, you
|
* attribute to be loaded from, and sent back to, the server.
|
||||||
* just need to add it to the schema, for the rest of the
|
* However, if you are adding a new type-specific field attribute,
|
||||||
* modeling and serialization to work.
|
* currently you only need to add it to the field type schema on
|
||||||
|
* the server. The field schema on the server is loaded into the
|
||||||
|
* empty ``types`` object below.
|
||||||
|
* refernces: plugins/discourse-custom-wizard/discourse/lib/wizard-json
|
||||||
|
* plugins/discourse-custom-wizard/discourse/models/custom-wizard
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const field = {
|
const field = {
|
||||||
basic: {
|
basic: {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
|
@ -98,7 +98,23 @@
|
||||||
class="small"}}
|
class="small"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{!--
|
||||||
|
/* learning_step
|
||||||
|
* unit: custom_wizard:templates_and_builder
|
||||||
|
* type: step
|
||||||
|
* number: 1
|
||||||
|
* title: Add the attribute to the template
|
||||||
|
* description: First, add a new setting block to allow the site admin to
|
||||||
|
* administer how the attribute will work. Here we can see the
|
||||||
|
* controls for the Character Counter field attribute. Note
|
||||||
|
* the attribute is only available for text type fields (see
|
||||||
|
* isTextType conditional above this block). Note the
|
||||||
|
* consistent use of the ``setting``, ``setting-label`` and
|
||||||
|
* ``setting-value`` HTML structure throughout this component,
|
||||||
|
* and other Custom Wizard admin components.
|
||||||
|
*/
|
||||||
|
--}}
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<div class="setting-label">
|
<div class="setting-label">
|
||||||
<label>{{i18n 'admin.wizard.field.char_counter'}}</label>
|
<label>{{i18n 'admin.wizard.field.char_counter'}}</label>
|
||||||
|
@ -111,18 +127,6 @@
|
||||||
checked=field.char_counter}}
|
checked=field.char_counter}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{!--
|
|
||||||
/*
|
|
||||||
* unit: custom_wizard:templates_and_builder
|
|
||||||
* type: step
|
|
||||||
* number: 1
|
|
||||||
* title: Add the attribute to the template
|
|
||||||
* description: First... [describe how it's often not necessary to update
|
|
||||||
* the component javascript]
|
|
||||||
*/
|
|
||||||
--}}
|
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if isUpload}}
|
{{#if isUpload}}
|
||||||
|
|
|
@ -70,8 +70,8 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController
|
||||||
# type: step
|
# type: step
|
||||||
# number: 3
|
# number: 3
|
||||||
# title: Add a permitted parameter
|
# title: Add a permitted parameter
|
||||||
# description: The custom wizard server admin will only accept permitted
|
# description: The custom wizard server admin controller will only accept
|
||||||
# attributes...
|
# permitted attributes...
|
||||||
##
|
##
|
||||||
|
|
||||||
def save_wizard_params
|
def save_wizard_params
|
||||||
|
|
|
@ -11,10 +11,11 @@ class CustomWizard::TemplateValidator
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 5
|
# number: 5
|
||||||
# title: Add a validation
|
# title: Add a template validation (optional)
|
||||||
# description: If our new attribute requires validation, that should be
|
# description: If our new attribute requires validation of a value entered
|
||||||
# handled here, which is run before the template is saved
|
# during administration of a wizard that should be handled here.
|
||||||
# to the database.
|
# Template validators are run before the template is saved to
|
||||||
|
# the database.
|
||||||
##
|
##
|
||||||
def perform
|
def perform
|
||||||
data = @data
|
data = @data
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||||
# contact emails: angus@thepavilion.io
|
# contact emails: angus@thepavilion.io
|
||||||
|
|
||||||
##
|
## learning_unit
|
||||||
# unit: custom_wizard:templates_and_builder
|
# unit: custom_wizard:templates_and_builder
|
||||||
# type: introduction
|
# type: introduction
|
||||||
# title: Adding a new wizard field attribute.
|
# title: Adding a new wizard field attribute.
|
||||||
|
|
Laden …
In neuem Issue referenzieren