Skip to content

Conversation

moumoutte
Copy link
Contributor

Review

This PR closes #218

  • Tests

@moumoutte moumoutte force-pushed the 218_change_format_input_type branch from b162c2e to e390d47 Compare April 12, 2017 14:42
@wo0dyn
Copy link
Contributor

wo0dyn commented Apr 20, 2017

LGTM, but I don't really understand why you are making this change 😕
Is it something we can test?

@wo0dyn wo0dyn self-requested a review April 20, 2017 16:53
@moumoutte
Copy link
Contributor Author

moumoutte commented Apr 27, 2017

LGTM, but I don't really understand why you are making this change 

I need a way in template to know which kind of format field I'm currently rendering.
https://github.com/peopledoc/peopletheme/pull/267/files#diff-08b9064107cc53120f718fec6d123ed5R5

Is it something we can test?

Don't think so.

@moumoutte moumoutte force-pushed the 218_change_format_input_type branch from e390d47 to 2daebb9 Compare April 27, 2017 10:00
@moumoutte
Copy link
Contributor Author

Pour information, django type ses widgets par input_type:

https://github.com/django/django/blob/master/django/forms/widgets.py#L262

C'est une manière de récuperer le type de manière standard dans un template django. Le type_id n'est la que pour formidable et non pour aiguiller le template. D'ailleurs le type_id au niveau du widget ne sert que pour le FormidableForm ... hors de questions dans ces conditions de s'appuyer sur le type_id dans un template puisque ce n'est pas le standard de django.

Encore une fois, dans un template , nous avons besoin de savoir a quel type de formattage nous avons a faire (CF PR peopletheme) afin d'afficher correctement le field dans sa globalité avec le form dans lequel il est contenu. Pas question de faire ça dans le template du widget, puisque l'interet etant d'aligner le field avec les autres fields du form.

@GreatWizard
Copy link
Contributor

Après discussion avec @moumoutte, input_type est une valeur définie dans les widget django sauf nos widgets de formatage custom. Ca semble nécessaire pour rentrer "correctement" dans les mécaniques de moteur de rendu.

@wo0dyn
Copy link
Contributor

wo0dyn commented Apr 27, 2017

Thanks you guys for these explanations. LGTM.
Feel free to merge whenever you're ready 😉

@moumoutte moumoutte merged commit 4c65888 into master Apr 27, 2017
@moumoutte moumoutte deleted the 218_change_format_input_type branch April 27, 2017 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark Format Widget as "help_text" type

3 participants