Review main Abandoned

61493[FEATURE] Allow disabling the new button when editing records

Bernhard Sirlinger CR 0 V 0 Easy +44 −0 updated 11/10/21, 11:50

Commit message

Introduce a new option "disableNew" which can be set in TSConfig
similar to "disableDelete"

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 3337

Show 1012 earlier messages
  1. Bernhard Sirlinger uploaded patch set 1 08/13/19, 15:02

  2. Simon Gilli commented on patch set 1 CR +1 08/13/19, 15:13

    Regression test would be nice imo
  3. TYPO3com voted on patch set 1 V +1 08/13/19, 15:14 Completed build in 11m 12s on Tue, 13 Aug, 03:14 PM Test Summary: 47176 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35690

  4. Oliver Klee commented on patch set 1 08/13/19, 16:31

    EditDocumentController.php:1951

    I propose renaming this from a getter name to "isNewButtonDisabled". What do you think?

    EditDocumentController.php:1953

    Does the getTsConfigOption call make sense if $this->firstEl['table'] is not set?
  5. Bernhard Sirlinger commented on patch set 1 08/13/19, 19:46

    > Patch Set 1: > > (2 comments)

    EditDocumentController.php:1951 Reply

    i would agree but then the other function is also called getDisableDelete. Maybe we should rename both? But that's why i chose this naming scheme.

    EditDocumentController.php:1953 Reply

    it currently uses the same logic as "disableDelete" which allows setting the option for a specific table ("options.disableDelete.tx_table") or for everything ("options.disableDelete")
  6. Oliver Klee commented on patch set 1 08/13/19, 20:55

    EditDocumentController.php:1951 Reply

    I don't find consistency here important. So I'm fine either way (with a slide preference of c) over b)): a) use the new name for the new method and keep the old one unchanged b) use the new name for the new method and rename old one unchanged in the same changeset c) like b), but in two different changesets (in any order)
  7. Bernhard Sirlinger uploaded patch set 2 08/14/19, 07:31

  8. Bernhard Sirlinger commented on patch set 2 08/14/19, 07:35

    EditDocumentController.php:1951 Reply

    I change the method name for the new method to what you suggested, i too find it much cleaner. I'll also upload a second changeset once this is merged to rename the other method.
  9. Bernhard Sirlinger commented on patch set 2 08/14/19, 07:35

    EditDocumentController.php:1953 Reply

    Done
  10. TYPO3com voted on patch set 2 V +1 08/14/19, 07:42 Completed build in 10m 39s on Wed, 14 Aug, 07:42 AM Test Summary: 47176 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35692

  11. Oliver Klee voted on patch set 2 CR +1 08/14/19, 08:45

  12. Jan Stockfisch voted on patch set 2 CR +1 08/14/19, 15:50

  1. Jan Stockfisch voted on patch set 2 V +1 08/14/19, 15:53

  2. Benny Schimmer commented on patch set 2 V +1 CR +1 08/14/19, 16:31

    Works as expected.
  3. Simon Gilli voted on patch set 2 CR +1 08/15/19, 15:15

  4. Anja Leichsenring commented on patch set 2 CR -1 08/23/19, 09:59

    can't help it, but is this not rather a feature than a bugfix? It introduces new configuration and at least needs documentation.
  5. Frank Nägler commented on patch set 2 CR -1 08/23/19, 10:02

    since this a new feature, we need at least and RST file to document the new setting. Also, a feature is not valid for a backport. Maybe we can backport this, but this requires a go by Benni.
  6. Steffen Frese voted on patch set 2 V +1 CR +1 10/10/19, 06:54

  7. Steffen Frese uploaded patch set 3 10/10/19, 07:56

  8. TYPO3com voted on patch set 3 V +1 10/10/19, 08:05 Completed build in 08m 36s on Thu, 10 Oct, 08:05 AM Test Summary: 47719 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37199

  9. Julian Geils voted on patch set 3 V +1 CR +1 10/10/19, 09:32

  10. Oliver Klee wrote 10/10/19, 09:56

    Removed reviewer Oliver Klee.
  11. Oli Bartsch commented on patch set 3 10/10/19, 11:51

    Feature-87321-AllowDisablingTheNewButtonWhenEditingRecords.rst:12 Unresolved

    I suggest adding ‘User’ here to make it clear that this is User TSconfig.

    Feature-87321-AllowDisablingTheNewButtonWhenEditingRecords.rst:15 Unresolved

    Is this correct and if so, why is it disabled by default? I think a Feature should introduce new possibilities to configure something. If it’s disabled by default every integrator has to adjust his configuration to have the same behavior prior this patch because currently the button is present in each installation.
  12. Daniel Goerz uploaded patch set 4 10/20/19, 15:18

  13. TYPO3com voted on patch set 4 V +1 10/20/19, 15:29 Completed build in 10m 59s on Sun, 20 Oct, 03:29 PM Test Summary: 47986 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37395

  14. Riccardo De Contardi commented on patch set 4 10/20/19, 21:22

    If this new feature is introduced, maybe `options.saveDocNew` should be removed (Actually, it does not work on version 9 - see https://forge.typo3.org/issues/87129 ). Searching for `saveDocNew` on the core files, it appears on 3 files: ``` typo3/sysext/frontend/ext_localconf.php typo3/sysext/backend/Classes/Controller/EditDocumentController.php typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js ```
  15. Georg Tiefenbrunn voted on patch set 4 V +1 CR +1 01/22/20, 08:01

  16. Anja Leichsenring commented on patch set 4 V -1 02/15/20, 19:47

    this is not ready. The disableDelete setting will also hide the delete button in List View, where the new disableNew button only works in edit view of a record. When such options get introduced, they should behave conistently throughout the system.
  17. Claus Harup voted on patch set 4 V +1 CR +1 06/19/20, 16:12

  18. Jan Stockfisch wrote 06/19/20, 18:16

    Removed reviewer Jan Stockfisch.
  19. Robin Louis van Komen voted on patch set 4 V +1 CR +1 06/22/20, 11:31

  20. Frank Nägler wrote 07/02/20, 15:39

    Removed reviewer Frank Nägler.
  21. Tobi Kretschmann voted on patch set 4 CR +1 08/25/20, 10:15

  22. Jörg Bösche commented on patch set 4 CR +1 08/25/20, 10:29

    IMO this is a BUGFIX and not a feature. The behaviour already appeared in v10 and v9.5 and was reported on https://forge.typo3.org/issues/87129.
  23. Oli Bartsch commented on patch set 4 V -1 09/04/20, 18:09

    I invested some time to spot more places which would need to be adjusted. * RecordProvider and PageProvider (ContextMenu) * DatabaseRecordList * NewRecordController * Page module (both) - E.g. "add content" And there are surely more. Also you have to keep in mind "new" does also mean copy/cut => paste.
  24. Anja Leichsenring commented on patch set 4 11/11/20, 20:05

    half the work is done, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/66559 please either continue here with the feature or abandon the patch, as it seems it is stuck.
  25. Benni Mack abandoned the change 11/10/21, 11:50

    abandoning the change now (no reaction in the past 12 months)