github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

symfony / symfony

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
    • 1,068
    • 194
  • Source
  • Commits
  • Network
  • Pull Requests (3)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Graph
  • Members

piwifr wants someone to pull 1 commit into symfony:master from piwifr:master

  • Discussion
  • Commits 1
  • Files Changed 1
  • Reply

Showing 1 comment with 1 commit and 0 commit comments

#21 Closed

Fixes 2 errors in displaying a form

piwifr — Thu Oct 14 03:23:15 -0700 2010

Hello,

This commit fixes 2 errors when displaying a form.

Warning error : Missing argument 1 for Symfony\Bundle\FrameworkBundle\Templating\Form\Field::label()
Error fatal :
Call to undefined method
Symfony\Bundle\FrameworkBundle\Templating\Form\Field::getDisplayedData() in file Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget/textarea_field.php

piwifr added some commits

Thu Oct 14 03:00:47 -0700 2010

10ff7bd Fixes a fatal error in file Symfony/Bundle/FrameworkBundle/Resources/...

fabpot commented

Fri Oct 15 09:31:32 -0700 2010

the label() method has already been fixed in my repo (fabpot/symfony).
The other one I'm not sure about as the 'field' attribute must be the value of '$this'. To access the original field, we must use '$origin'. So, the fix should be in the template. I will commit the fix in my repo in a minute.

Comment on this pull request

You must be logged in to comment on pull requests.

Active Participants

  • piwifr
  • fabpot

Showing 1 unique commit by 1 author.

10ff7bdd piwifr Fixes a fatal error in file Symfony/Bundle/FrameworkBundle/Resour... Thu Oct 14 03:00:47 -0700 2010

Showing 1 changed files with 2 additions and 2 deletions.

M src/Symfony/Bundle/FrameworkBundle/Templating/Form/Field.php 4 ••••
Txt src/Symfony/Bundle/FrameworkBundle/Templating/Form/Field.php
  • View file @ 10ff7bd
... ...
@@ -49,14 +49,14 @@ class Field extends BaseField
49 49
         }
50 50
 
51 51
         return $this->engine->render($template, array(
52  
-            'field'      => $this,
  52
+            'field'      => $this->field,
53 53
             'origin'     => $this->field,
54 54
             'attributes' => array_merge($this->field->getAttributes(), $attributes),
55 55
             'generator'  => $this->generator,
56 56
         ));
57 57
     }
58 58
 
59  
-    public function label($label, $template = null)
  59
+    public function label($label = false, $template = null)
60 60
     {
61 61
         if (null === $template) {
62 62
             $template = 'FrameworkBundle:Form:label.php';
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • Русский
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Русский
  • Српски
  • Svenska
  • 中文

Keyboard Shortcuts

Site wide shortcuts

s
Focus site search
?
Bring up this help dialog

Commit list

j
Move selected down
k
Move selected up
t
Open tree
p
Open parent
c or o or enter
Open commit

Pull request list

j
Move selected down
k
Move selected up
o or enter
Open issue

Issues

j
Move selected down
k
Move selected up
x
Toggle select target
o or enter
Open issue
I
Mark selected as read
U
Mark selected as unread
e
Close selected
y
Remove selected from view
c
Create issue
l
Create label
i
Back to inbox
u
Back to issues
/
Focus issues search

Network Graph

← or h
Scroll left
→ or l
Scroll right
↑ or k
Scroll up
↓ or j
Scroll down
t
Toggle visibility of head labels
shift ← or shift h
Scroll all the way left
shift → or shift l
Scroll all the way right
shift ↑ or shift k
Scroll all the way up
shift ↓ or shift j
Scroll all the way down