UKHomeOfficeForms / hof-template-partials

DEPRECATED, this is built into hof v19 (ノ◕ヮ◕)ノ*:・゚✧
0 stars 3 forks source link

feature - enable components #14

Closed joefitter closed 7 years ago

joefitter commented 7 years ago

amended step.html to use field.html if available, if not then renderField. field.html is a pre-rendered html string representation of the field

lennym commented 7 years ago

Do we still want this?

joefitter commented 7 years ago

yes, unless you can think of a better way of including the rendered component template in a step?

lennym commented 7 years ago

What's the use case?

joefitter commented 7 years ago

component renders the component template to a string, which we then add to the field in locals.fields as html - perhaps it would be better to name it component

lennym commented 7 years ago

For what it's worth, if we do want this functionality then I'd roll it into renderField.

joefitter commented 7 years ago

hmm, yeah that's a good point, removes the nasty if/else logic from the template

lennym commented 7 years ago

Yeah, I think it would be better there, so renderField is wholly responsible for turning a field into some html.