Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
first feature commit
Dieser Commit ist enthalten in:
Ursprung
0390f742a8
Commit
f2d7f57bb6
4 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
|
@ -4,6 +4,7 @@ import getUrl from 'discourse-common/lib/get-url';
|
|||
export default StepController.extend({
|
||||
actions: {
|
||||
goNext(response) {
|
||||
debugger;
|
||||
const next = this.get('step.next');
|
||||
if (response.redirect_on_next) {
|
||||
window.location.href = response.redirect_on_next;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{{input type='number' step='0.01' id=field.id value=field.value}}
|
|
@ -330,6 +330,7 @@ class CustomWizard::Builder
|
|||
end
|
||||
|
||||
def validate_field(field, updater, step_template)
|
||||
byebug
|
||||
value = updater.fields[field['id']]
|
||||
min_length = false
|
||||
label = field['label'] || I18n.t("#{field['key']}.label")
|
||||
|
@ -356,6 +357,7 @@ class CustomWizard::Builder
|
|||
validator[:block].call(field, updater, step_template)
|
||||
end
|
||||
end
|
||||
byebug
|
||||
end
|
||||
|
||||
def is_text_type(field)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class CustomWizard::Field
|
||||
def self.types
|
||||
@types ||= ['checkbox', 'composer', 'dropdown', 'tag', 'category', 'image', 'text', 'textarea', 'text-only', 'upload', 'user-selector']
|
||||
@types ||= ['checkbox', 'composer', 'dropdown', 'tag', 'category', 'image', 'text', 'textarea', 'text-only', 'number', 'upload', 'user-selector']
|
||||
end
|
||||
|
||||
def self.require_assets
|
||||
|
|
Laden …
In neuem Issue referenzieren