Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Form] Do not render default ID attribute on empty form name
Bug fix: no Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: - Todo: - This is cleanup after enabling empty form names, now form with empty name will not render the default `id="form"` container attribute. Developers can extend/override this behaviour by standard form theming methods.
- Loading branch information
Showing
3 changed files
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
id="<?php echo $view->escape($id) ?>" | ||
<?php if (!empty($id)): ?>id="<?php echo $view->escape($id) ?>" <?php endif; ?> | ||
<?php foreach($attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters