Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
ShortcutSetForm
uses the old pattern of checking whether it is an add or an update form to provide dedicated messages.
Proposed resolution
Split ShortcutSetForm
into ShortcutSetAddForm
and ShortcutSetEditForm
instead.
Remaining tasks
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#9 | 2324877-9.patch | 6.39 KB | naveenvalecha |
Comments
Comment #1
JeroenTComment #2
JeroenTI removed the ShortcutSetform, created a ShortcutAddForm and shortcutEditForm and moved them to the form folder.
Patch attached.
Comment #3
tim.plunkettWhy are we doing this? Is there a meta issue for these where this was decided to be a good idea?
All I see is code duplication and 2x the work for devs.
Comment #4
jibranRelated issue for background info #2324873: Split ShortcutForm into ShortcutAddForm and ShortcutEditForm.
Comment #7
naveenvalechaThe patch in #2 did not apply so no interdiff.
Here's the patch as #2428003: Move all shortcut forms to \Drupal\shortcut\Form this has been closed as duplicate
Comment #9
naveenvalechaFixed the failures.
Comment #10
jibranNice work @naveenvalecha
It seems like we have
ShortcutSetsTest::testShortcutSetAdd
andShortcutSetsTest::testShortcutSetEdit
Let's assert these strings as well in these methods.
Comment #12
jibranNW #10.