discourse/app/assets/javascripts/wizard/addon/components/wizard-field.hbs
Godfrey Chan 2228f75645
DEV: Modernize Wizard model implementation (#23640)
+ native classes
+ tracked properties
- Ember.Object
- Ember.Evented
- observers
- mixins
- computed/discourseComputed

Also removes unused wizard infrastructure for warnings. It appears
that once upon on time, either the server can generate warnings,
or some client code can generate them, which requires an extra 
confirmation from the user before they can continue to the next step.

This code is not tested and appears unused and defunct. Nothing
generates such warning and the server does not serialize them.

Extracted from https://github.com/discourse/discourse/pull/23678
2023-11-23 16:35:51 +00:00

39 lines
920 B
Handlebars

{{#if this.field.label}}
<label for={{this.field.id}}>
<span class="wizard-container__label">
{{this.field.label}}
</span>
{{#if this.field.required}}
<span class="wizard-container__label required">*</span>
{{/if}}
{{#if this.field.description}}
<div class="wizard-container__description">{{html-safe
this.field.description
}}</div>
{{/if}}
</label>
{{/if}}
<div class="wizard-container__input">
{{component
this.inputComponentName
field=this.field
step=this.step
fieldClass=this.fieldClass
wizard=this.wizard
}}
</div>
{{#if this.field.errorDescription}}
<div class="wizard-container__description error">{{html-safe
this.field.errorDescription
}}</div>
{{/if}}
{{#if this.field.extraDescription}}
<div class="wizard-container__description extra">{{html-safe
this.field.extraDescription
}}</div>
{{/if}}