Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit f338141

Browse files
committed
remove bogus by_reference => false from children form
1 parent c865036 commit f338141

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

Admin/AbstractMenuNodeAdmin.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,14 @@ protected function configureListFields(ListMapper $listMapper)
4040
;
4141
}
4242

43-
protected function isSubjectNotNew()
44-
{
45-
return $this->hasSubject() && null !== $this->getSubject()->getId();
46-
}
47-
4843
/**
4944
* {@inheritDoc}
5045
*/
5146
protected function configureFormFields(FormMapper $formMapper)
5247
{
5348
$formMapper
5449
->with('form.group_general')
55-
->add('name', 'text',
56-
$this->isSubjectNotNew() ? array(
57-
'attr' => array('readonly' => 'readonly')
58-
) : array()
59-
)
50+
->add('name', 'text')
6051
->add('label', 'text')
6152
->end()
6253
;

Admin/Extension/MenuNodeReferrersExtension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ public function configureFormFields(FormMapper $formMapper)
3131
->add(
3232
'menuNodes',
3333
'sonata_type_collection',
34-
array(
35-
'by_reference' => false,
36-
),
34+
array(),
3735
array(
3836
'edit' => 'inline',
3937
'inline' => 'table',

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Changelog
22
=========
33

4+
1.0.1
5+
-----
6+
7+
* **2013-10-29**: Fix MenuNodeReferrersExtension to also work when adding an
8+
additional menu item if there already exists one. Allow to edit the menu item
9+
name even after creation as in all other admins - this prevented adding
10+
another menu item in the menu tab created by the admin extension. If you want
11+
the old behaviour back, extend the admin and change the definition of the
12+
`name` field, adding back what is removed in the pull request
13+
https://github.com/symfony-cmf/MenuBundle/pull/157
14+
15+
1.0.0
16+
-----
17+
18+
First stable release.
19+
420
1.0.0-RC4
521
---------
622

0 commit comments

Comments
 (0)