Review main Merged

38165[FEATURE] Show remaining characters below text fields

Andreas Kienast CR +2 V +2 Normal +78 −2 updated 04/03/15, 14:52

Commit message

If a field has the TCA definition "max", show the amount of characters left
below the textfield if it has the focus.

Review

  • Code review CR +2
    • Benni Mack +2
    • Jan Helke +1
    • Daniel Sattler +1
  • Verified V +2
    • Benni Mack +2
    • Jan Helke +1

Issues 1

Files 4

Review log 25

  1. Andreas Kienast uploaded patch set 1 03/25/15, 14:49

  2. Andreas Kienast uploaded patch set 2 03/25/15, 14:50

  3. Mathias Brodala commented on patch set 2 CR -1 03/25/15, 14:57

    FEATURE please.

    FormEngine.php:2006

    Suggestion: remainingCharacters

    FormEngine.js:562

    class is a quasi-reserved word in JavaScript, please use "class".

    FormEngine.js:563

    Replace with TBE_EDITOR.labels.charactersLeft.replace("{0}", maxlengthProperties.charactersLeft)

    FormEngine.js:563

    Same here.

    FormEngine.js:574

    See above.

    locallang_core.xlf:80

    This is not really translatable. Since we cannot use plural forms here, I suggest "Remaining characters: {0}". This way translators can at least move around the character count.
  4. Andreas Kienast uploaded patch set 3 03/25/15, 15:14

  5. Mathias Brodala voted on patch set 3 CR +1 03/25/15, 15:44

  6. Jan Helke voted on patch set 3 CR +1 V +1 03/25/15, 16:01

  7. Andreas Kienast updated the commit message in patch set 4 03/25/15, 16:01

  8. Jan Helke voted on patch set 4 CR +1 V +1 03/25/15, 16:02

  9. Mathias Brodala voted on patch set 4 CR +1 03/25/15, 16:10

  10. Frans Saris commented on patch set 4 03/25/15, 18:42

    It also shows for datetime fields.
  11. Wouter Wolters voted on patch set 4 CR +1 03/25/15, 18:43

  12. Frans Saris commented on patch set 4 03/25/15, 19:04

    Did anyone test this with special chars?
  13. Frans Saris commented on patch set 4 03/25/15, 19:10

    Ok, looks like specials chars work okay. Tested with “’‘”
  14. Frank Nägler commented on patch set 4 CR -1 03/26/15, 09:26

    -1 until Lolli checked this change, because it's FormEngine ;)
  15. Frank Nägler voted on patch set 4 CR +1 03/26/15, 09:36

  16. Benni Mack commented on patch set 4 CR -1 03/26/15, 17:20

    FormEngine.js:556

    how about putting this in an own initialize... method? Also make sure this works for inline records. Plus, some comments in the code would be nice :)
  17. Andreas Kienast uploaded patch set 5 03/26/15, 19:07

  18. Andreas Kienast commented on patch set 5 03/26/15, 19:09

    IRRE-approved!™
  19. Jan Helke voted on patch set 5 CR +1 V +1 03/26/15, 20:19

  20. Daniel Sattler voted on patch set 5 CR +1 03/26/15, 22:34

  21. Benni Mack voted on patch set 5 CR +2 V +2 03/27/15, 00:53

  22. Benni Mack merged patch set 5 03/27/15, 00:53

  23. Frans Saris commented on patch set 6 04/03/15, 10:33

    Even without the max set it shows "Remaining characters: ...". As this kind of makes sense for text fields this doesn't for numeric fields. Further appears there a duplicate message below flexforms.
  24. Frans Saris commented on patch set 6 04/03/15, 10:39

  25. Felix Kopp commented on patch set 6 04/03/15, 14:52

    I suggest to only display the amount when faction remains (less than 15 or <20%) to reduce the visual noise in common cases.