Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-15 14:22:53 +01:00
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
|
||||
* number: 2
|
||||
* title: Add the attribute to the wizard schema
|
||||
* description: Custom Wizard templates are modeled in the client via
|
||||
* the wizard-schema, which, along with the serialization in
|
||||
* wizard-json and models/custom-wizard, models and serializes
|
||||
* data on the client. Normally when adding an attribute, you
|
||||
* just need to add it to the schema, for the rest of the
|
||||
* modeling and serialization to work.
|
||||
* description: Custom Wizard templates are modeled and serialized in the
|
||||
* client via the Wizard Schema. In some cases, when adding a new
|
||||
* attribute, you just need to add it to the schema for the
|
||||
* attribute to be loaded from, and sent back to, the server.
|
||||
* However, if you are adding a new type-specific field attribute,
|
||||
* 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 = {
|
||||
basic: {
|
||||
id: null,
|
||||
|
|
|
@ -98,7 +98,23 @@
|
|||
class="small"}}
|
||||
</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-label">
|
||||
<label>{{i18n 'admin.wizard.field.char_counter'}}</label>
|
||||
|
@ -111,18 +127,6 @@
|
|||
checked=field.char_counter}}
|
||||
</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 isUpload}}
|
||||
|
|
|
@ -70,8 +70,8 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController
|
|||
# type: step
|
||||
# number: 3
|
||||
# title: Add a permitted parameter
|
||||
# description: The custom wizard server admin will only accept permitted
|
||||
# attributes...
|
||||
# description: The custom wizard server admin controller will only accept
|
||||
# permitted attributes...
|
||||
##
|
||||
|
||||
def save_wizard_params
|
||||
|
|
|
@ -11,10 +11,11 @@ class CustomWizard::TemplateValidator
|
|||
##
|
||||
# type: step
|
||||
# number: 5
|
||||
# title: Add a validation
|
||||
# description: If our new attribute requires validation, that should be
|
||||
# handled here, which is run before the template is saved
|
||||
# to the database.
|
||||
# title: Add a template validation (optional)
|
||||
# description: If our new attribute requires validation of a value entered
|
||||
# during administration of a wizard that should be handled here.
|
||||
# Template validators are run before the template is saved to
|
||||
# the database.
|
||||
##
|
||||
def perform
|
||||
data = @data
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||
# contact emails: angus@thepavilion.io
|
||||
|
||||
##
|
||||
## learning_unit
|
||||
# unit: custom_wizard:templates_and_builder
|
||||
# type: introduction
|
||||
# title: Adding a new wizard field attribute.
|
||||
|
|
Laden …
In neuem Issue referenzieren