Review main Merged

45349[BUGFIX] EXT:form - handling of missing type attribute

Ralf Zimmermann CR +2 V +2 Easy +27 −0 updated 12/23/15, 09:30

Commit message

Render default "type" attribute if not set by configuration.
Relates to the elements BUTTONTAG, INPUT and TEXTFIELD

Review

  • Code review CR +2
    • Benni Mack +2
    • Daniel Goerz +1
    • Björn Jacob +1
  • Verified V +2
    • Benni Mack +2
    • Daniel Goerz +1
    • Björn Jacob +1

Issues 1

Files 3

Review log 18

  1. Ralf Zimmermann uploaded patch set 1 12/18/15, 09:33

  2. Björn Jacob commented on patch set 1 CR +1 V +1 12/18/15, 10:49

    Tested with supplied test form.
  3. Frank Nägler commented on patch set 1 12/18/15, 11:18

    Is it possible to make this check in controller context and not in the view? Imho the property should ever contains a valid value.
  4. Ralf Zimmermann commented on patch set 1 12/18/15, 12:15

    You can define "type" property via Typoscript, but if you dont do this, is results in a empty type attribute for this 3 elements (only for this 3 elements - The "type" property for the other elements (like checkbox) are set with the typoscript element definition "fixedHtmlAttributeValues") Therefore we need a "fallback" for the "type" attribute. I dont want such things in the code. The idea when rewriting the code was to seperate the element configuration stuff from the codebase. With this patch the "type" attribute get a valid value if its not defined. Can you explain me better what you mean?
  5. Ralf Zimmermann commented on patch set 1 12/18/15, 12:23

    The wizard also write valid values. This behavior only affect people who write their own configuration and forgot to set the type property.
  6. Frank Nägler commented on patch set 1 12/18/15, 12:28

    Imho a view should never contain conditions, specially for things like this. A view should display/output the data which are assigned to the view. Any if in a view means missing logic in the controller context. In this case: if it is possible, that the configuration has no type set, the controller should check it and assign the default value. From my point of view, it is not part of the view to take care of correct configuration.
  7. Ralf Zimmermann commented on patch set 1 12/18/15, 12:42

    All right. I see that i already implementet stuff for default values ;) The next patchset will comming soon.
  8. Frank Nägler commented on patch set 1 CR -1 12/18/15, 12:44

    thank you, will give a -1 now.
  9. Ralf Zimmermann uploaded patch set 2 12/18/15, 12:48

  10. Björn Jacob commented on patch set 2 CR +1 V +1 12/18/15, 13:15

    Tested again with supplied test form.
  11. Frank Nägler commented on patch set 2 CR +1 12/18/15, 13:18

    that is much better, thank you!
  12. Björn Jacob commented on patch set 3 12/23/15, 06:30

    Published edit on patch set 2
  13. Björn Jacob voted on patch set 3 V +1 12/23/15, 06:30

  14. Björn Jacob voted on patch set 3 CR +1 12/23/15, 06:30

  15. Daniel Goerz voted on patch set 3 CR +1 V +1 12/23/15, 08:51

  16. Benni Mack voted on patch set 3 CR +2 V +2 12/23/15, 09:29

  17. Gerrit merged patch set 3 12/23/15, 09:29

  18. Benni Mack commented on patch set 4 12/23/15, 09:30

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 8b0e0e1935efb1e12e182952ff258c17ecf0a96e