Review main Merged

21931[TASK] sys_file/sys_file_reference override strategy

Andreas Wolf CR +2 V +2 Normal +95 −15 updated 09/01/13, 18:57

Commit message

Until now, the sys_file_reference records use the regular "null value"
checkbox to switch between the value from sys_file and a custom value
the user can supply. This is however confusing for users, as there is no
explanation what the checkbox really does and also the placeholder text
is not removed when checking the checkbox (but an empty string is stored
in the database and thus used for output afterwards).

This commit changes the appearance to have a checkbox on top and toggle
between a classical read-only field and a real input field.

Review

  • Code review CR +2
    • Steffen Ritter +2
  • Verified V +2
    • Steffen Ritter +2

Issues 1

Files 4

Review log 29

Show 4 earlier messages
  1. Mr. Jenkins commented on patch set 1 07/05/13, 13:23

  2. Andreas Wolf uploaded patch set 2 07/05/13, 14:15

  3. Mr. Jenkins commented on patch set 2 07/05/13, 14:16

  4. Felix Kopp updated the commit message in patch set 2 07/05/13, 14:38

  1. Mr. Jenkins commented on patch set 3 07/05/13, 14:39

  2. Steffen Ritter uploaded patch set 4 07/05/13, 19:39

  3. Steffen Ritter commented on patch set 4 V +1 CR +1 07/05/13, 19:40

    small improvement
  4. Mr. Jenkins commented on patch set 4 07/05/13, 19:40

  5. Andreas Wolf commented on patch set 4 07/05/13, 20:30

    FormEngine.php:1143

    $PA['itemFormElNameActive'] contains a name with square brackets [], which are not allowed for ids. We might get in trouble with these identifiers when using jQuery, and the brackets will have to be escaped (see e.g. http://stackoverflow.com/questions/1239095/find-dom-element-by-id-when-id-contains-square-brackets). Thus, I strongly opt against using these identifiers here!
  6. Felix Kopp commented on patch set 4 07/13/13, 09:54

    CSS is not yet perfect but that is a matter of the core since field are not of the same height in EXT: t3skin.

    FormEngine.php:1129

    Is mode added for all fields?

    FormEngine.php:5923

    What is the $table parameter needed for?

    FormEngine.php:6347

    getValueForFormFieldPlaceholder could be better. Can we rename or do we have to deprecate?

    locallang_core.xlf:318

    Concept said: "Override …fieldname…" Not a blocker for me though
  7. Frans Saris uploaded patch set 5 08/05/13, 12:46

  8. Mr. Jenkins commented on patch set 5 08/05/13, 12:47

  9. Frans Saris commented on patch set 5 08/05/13, 12:47

    I changed the id handling, added label to translation and added some checks for mode.
  10. Frans Saris voted on patch set 5 V +1 CR +1 08/05/13, 16:28

  11. Frans Saris uploaded patch set 6 08/05/13, 20:14

  12. Mr. Jenkins commented on patch set 6 08/05/13, 20:15

  13. Frans Saris uploaded patch set 7 08/07/13, 09:51

  14. Mr. Jenkins commented on patch set 7 08/07/13, 09:52

  15. Frans Saris voted on patch set 7 V +1 CR +1 08/19/13, 14:20

  16. Steffen Ritter uploaded patch set 8 08/28/13, 12:22

  17. Mr. Jenkins commented on patch set 8 08/28/13, 12:23

  18. Steffen Ritter commented on patch set 8 V +2 CR +2 08/28/13, 12:24

    just added a wording change requested from Jens Hoffmann.
  19. Steffen Ritter merged patch set 9 08/28/13, 12:24

  20. Helmut Hummel commented on patch set 9 08/29/13, 18:55

    Post merge review. Can somebody please take care fixing these issues? thanks!

    FormEngine.php:45

    What is that?

    FormEngine.php:1137

    htmlspecialchars is wrong in this context and does not properly encode the value GeneralUtility::quoteJsValue() must be used to encode $PA['itemFormElName']

    FormEngine.php:1147

    not encoded at all (htmlspecialchars needed)

    FormEngine.php:1148

    not encoded at all (htmlspecialchars needed)

    FormEngine.php:5955

    Please, no is_numeric when checking for integer
  21. Philipp Gampe commented on patch set 9 08/31/13, 17:15

    Comments of Helmut have not been taken care by now. Please do so or revert the commit.
  22. Steffen Ritter commented on patch set 9 08/31/13, 18:27

    lol Philip, no need for reverting :) No critical issue - and as we just sat together a whole week - allow us some rest...
  23. Steffen Ritter commented on patch set 9 08/31/13, 18:29

    FormEngine.php:5955 Reply

    it does not check if it is an integer ... it checks if it is not a string. as new records will have NEW4352345 within the uid. so no issue here.
  24. Steffen Ritter commented on patch set 9 09/01/13, 07:44

    FormEngine.php:45 Reply

    Done

    FormEngine.php:1137 Reply

    Done

    FormEngine.php:1147 Reply

    Done

    FormEngine.php:1148 Reply

    Done
  25. Helmut Hummel commented on patch set 9 09/01/13, 18:57

    FormEngine.php:5955 Reply

    IMHO the check in code does not reflect the expectations. Pushed my proposal to https://review.typo3.org/#/c/23526/2