H. Westphal
932c144534
Added a class to the logs ol element to prevent hiding it when toggling an exception ( fixes #2589 ).
2011-11-10 10:20:28 +01:00
Fabien Potencier
47b888a957
added the real template name when an error occurs in a Twig template
2011-11-07 20:48:18 +01:00
Fabien Potencier
842ac36f33
added Stopwatch support in debug mode, added a timeline representing the stopwatch events in the web profiler
...
Enjoy!
2011-10-21 07:45:12 +02:00
Fabien Potencier
beda03ba96
updated all HttpKernel event listeners to implement EventSubscriberInterface
2011-10-10 14:54:49 +02:00
Michel Salib
ef322f680d
-- add command that extracts translation messages from templates
...
-- add missing files
-- tweak translation command files
-- dumpers are now responsive for writting the files
-- moved the twig extractor the bridge
-- clear temp files after unit tests
-- check the presence of dumper in translation writer
-- General cleaning of the code
-- clean phpDoc
-- fix PHPDoc
-- fixing class name in configuration
-- add unit tests for extractors (php and twig)
-- moved test to correct location
-- polish the code
-- polish the code
2011-09-09 10:23:54 +02:00
Fabien Potencier
5d9bd6da4f
[TwigBundle] fixed XSS in the exception template
2011-07-22 13:42:59 +02:00
Fabien Potencier
3749ad43f4
moved the Exception listener from FrameworkBundle to TwigBundle as it relies on Twig being enabled
...
This commit also fixes exception pages when Twig is not enabled as a templating engine.
Instead of just displaying the raw Twig template as before, we now fallback to the default
exception handler introduced some time ago.
2011-07-21 19:24:04 +02:00
Fabien Potencier
ca013311bd
[TwigBundle] fixed XSD
2011-06-11 08:00:55 +02:00
Fabien Potencier
96045739b1
[TwigBundle] removed the extensions setting
2011-06-11 07:50:14 +02:00
Fabien Potencier
89f544afb6
moved Twig form templates to the Twig bridge
2011-06-07 16:38:23 +02:00
Fabien Potencier
6737bd36bd
[TwigBundle] made table_layout.html.twig useable as a trait
2011-06-07 13:52:58 +02:00
Fabien Potencier
96fc666454
simplified cache warmers
...
Here are the new simplified rules:
* Required cache warmers are *always* executed when the Kernel boots for the first time;
* Optional cache warmers are *only* executed from the CLI via cache:warmup
These new rules means that all the configuration settings for the cache
warmers have been removed. So, if you want the best performance, remember to
warmup the cache when going to production.
This also fixed quite a few bugs.
2011-06-07 11:42:27 +02:00
Victor Berchet
ef8cb967f5
Merge branch 'master' into form-collection-rendering
2011-06-06 14:39:18 +02:00
Victor Berchet
bca17fe6a3
[Form] Fix collection rendering
2011-06-06 14:21:49 +02:00
Victor Berchet
6711a184fd
[TwigBundle][Form] Simplify templates
...
The Repeated and Collection types extend the Form type so there is no need to explicitely render the parent section.
2011-06-06 12:53:19 +02:00
Victor Berchet
181fb56925
[Form][Twig] Reorganized the form template
2011-06-06 12:32:08 +02:00
stloyd
cb22ccc516
[Form] Added missing feature for adding attributes to an field label
2011-05-31 17:01:28 +02:00
Miha Vrhovnik
b8144c62ad
DateType single-text should be single_text
2011-05-27 16:23:59 +02:00
Fabien Potencier
923c234160
fixed form_rest() for embedded forms (refs #1051 , #1115 )
2011-05-27 08:12:39 +02:00
Kris Wallsmith
4018040bbb
[TwigBundle] reverted to lazy-loading of templating helpers ( fixes #1066 )
2011-05-24 09:09:47 -07:00
alexandresalome
dfdd26d6c4
[TwigBundle] Move all class names to parameters of DIC
2011-05-24 10:56:45 +02:00
alexandresalome
f13798fa5e
[TwigBundle] Rename TemplatingExtension to AssetsExtension
...
This extension now only contains assets functions
2011-05-24 10:56:45 +02:00
alexandresalome
f83c1376a1
[TwigBundle] Move the code filters to a dedicated extensions
...
A dedicated extension now exists for the code-related filters for Twig.
The dependency to service_container was also removed, to use CodeHelper, instead
2011-05-24 10:56:45 +02:00
alexandresalome
73bd9c72af
[TwigBundle] Change the dependency of ActionsExtension to the actions helper
...
The logical of moving $attributes to a value of $options is already present
in the PHP templating helper.
2011-05-24 10:56:45 +02:00
alexandresalome
3cdf371c2b
[TwigBundle] Move the {% render ... %} node to a dedicated extension + Remove service container
...
The purpose of the TemplatingExtension is ambigous. This first step move the actions logical
to a dedicated extension and reduce the dependency to the HTTP Kernel.
2011-05-24 10:56:45 +02:00
Bernhard Schussek
dcc61a9a98
Merge remote branch 'shieldo/search_field' into shieldo_merge
2011-05-19 01:41:59 +02:00
Bernhard Schussek
216d7e415d
Merge remote branch 'mweimerskirch/form_pattern_attribute' into mweimerskirch_merge
...
Conflicts:
src/Symfony/Bundle/TwigBundle/Resources/views/Form/div_layout.html.twig
src/Symfony/Component/Form/Extension/Core/Type/FieldType.php
src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php
2011-05-18 22:49:27 +02:00
Bernhard Schussek
f467317bab
[Form] Renamed view variable "name" to "full_name"
...
The variable "name" now contains the local, short name (equivalent to $form->getName()).
2011-05-18 22:16:16 +02:00
Fabien Potencier
3d85008141
Merge remote branch 'danielholmes/widget_templates'
...
* danielholmes/widget_templates:
[TwigBundle] fixed form templates so divs won't have all the input attributes, some of which are invalid (such as required, maxlength, name, etc)
2011-05-17 09:19:03 +02:00
Douglas Greenshields
bf2f9d2a02
[Form] Added a search form field type
2011-05-15 18:31:36 +01:00
Bernhard Schussek
e0ff61949e
[Form] Renamed the value "text" of the "widget" option of the "date" type to "single-text"
2011-05-13 19:17:28 +02:00
Daniel Holmes
b98f786d66
[TwigBundle] fixed form templates so divs won't have all the input attributes, some of which are invalid (such as required, maxlength, name, etc)
2011-05-05 11:20:08 +10:00
Michel Weimerskirch
476644a92c
[Form] Support for the HTML5 "pattern" attribute, see http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute
...
If you use the MinLength validator with your entities, the ValidatorTypeGuesser gets the value, stored as "minlength". Then, the FormFactory generates a "pattern" attribute out of minlength and maxlength.
Modern browsers such as Chrome use this attribute to validate the form before submitting.
a "pattern" attribute is generated that validates the
2011-05-04 23:16:41 +02:00
Bernhard Schussek
74cca63938
[Form] CSRF fields are not included in the children of a FormView anymore if the view is not the root
2011-05-04 18:27:20 +02:00
Bernhard Schussek
bf1dfbbe99
[Form] Added test for last commit by kriswallsmith and improved dealing with original names
...
The form component should now guarantee to always pass an UploadedFile object to your model. There you can call getOriginalName() to retrieve the original name of the uploaded file. For security reasons, the real file name is a generated hash value.
2011-05-04 17:04:44 +02:00
Fabien Potencier
a487c5200e
Revert "[TwigBundle] removed the extends tags from the table layout (it's not needed anymore)"
...
This reverts commit 66a01855f7
.
2011-04-29 11:03:45 +02:00
Fabien Potencier
66a01855f7
[TwigBundle] removed the extends tags from the table layout (it's not needed anymore)
2011-04-29 10:25:01 +02:00
Victor Berchet
33dd89fd02
[Template cache warmers] Factorize common code
2011-04-23 11:24:28 +02:00
Fabien Potencier
de8f10e236
Merge remote branch 'Infranology/framework-bundle-updated-method-call' into form
...
* Infranology/framework-bundle-updated-method-call: (91 commits)
[FrameworkBundle] updated method call
moved DoctrineMongoDBBundle to its own repository
[AsseticBundle] fixed unit tests
[FrameworkBundle] removed unneeded files in tests
updated vendors
[FrameworkBundle] removed the need to boot a Kernel in a unit test file
[FrameworkBundle] removed the need to boot a Kernel in a unit test file
[Routing] added getContext() accessor
[HttpFoundation] fixed a potential security problem in Request
updated vendors
Added 201 to the possible status codes that indicate a response is a redirect.
[FrameworkBundle] made ESI URL relative as allowed by the spec (no need to generate absolute URLs)
[AsseticBundle] fixed router and controller
[AsseticBundle] removed fake front controller from URL before creating route
[AsseticBundle] updated twig integration to check debug mode at runtime rather than compile time since twig cannot vary its cache by debug mode
[Routing] the global parameters must not be added in the QS when generating URLs
removed the possibility to pass a message to the trans tag
simplified exceptions as Twig is now smart enough to automatically add line information
made the %count% variable automatically available when using the transchoice filter (similar to how the tag works)
[Container] Added function array_unique on getServiceIds to return only one service name
...
2011-04-22 09:35:11 +02:00
Eriksen Costa
589b0ab4ed
Merge branch 'master' into form-frameworkbundle-form-guessers-fix
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddFormGuessersPass.php
src/Symfony/Component/Form/MoneyField.php
2011-04-21 23:03:40 -03:00
Ryan Weaver
f98916dcc8
[TwigBundle] Removing dbug text in form template
2011-04-21 19:49:45 -05:00
Fabien Potencier
9694ac77a7
[Form] fixed translations escaping
2011-04-21 07:48:12 +02:00
Bernhard Schussek
273d72ef75
[Form] Changed separator for Twig blocks from double underscore to single underscore to match the PHP template separator
2011-04-18 14:28:01 +02:00
Miha Vrhovnik
50011fa344
Added html5 email input to the forms
2011-04-18 11:17:41 +02:00
Bernhard Schussek
7b1bf621e1
[Form] Removed obsolete code from div_layout.html.twig
2011-04-15 16:40:28 +02:00
Bernhard Schussek
990bef8afb
[Form][FrameworkBundle][TwigBundle] Fixed: CSRF fields are not rendered for nested forms anymore
2011-04-15 14:05:33 +02:00
Henrik Bjørnskov
5547243f53
[Form] Starting to bring back resouces as configurable
2011-04-14 18:32:34 +02:00
Fabien Potencier
44edd8fe96
[TwigBundle] renamed default widget files
2011-04-14 16:47:44 +02:00
Bernhard Schussek
c6fe6a750d
[Form] Added functional test for the 'size' attribute in the select tags of a time field
2011-04-14 15:29:55 +02:00
Bernhard Schussek
72b17cd67c
[Form] Renamed TemplateContext to FormView
2011-04-14 15:02:51 +02:00
Bernhard Schussek
4907c7d81d
[Form] Added test coverage for expanded choice fields
2011-04-14 14:18:25 +02:00
Bernhard Schussek
4c0d53a7b6
[TwigBundle] Merged div_layout.html.twig and widget.html.twig
2011-04-14 13:46:11 +02:00
Bernhard Schussek
602846f386
[Form] Added tests for table_layout.html.twig
2011-04-14 03:38:19 +02:00
Bernhard Schussek
96f040cec1
[Form] Added extensive test coverage for div_layout.html.twig
2011-04-14 03:15:56 +02:00
Kris Wallsmith
672291087c
removed a lot of special normalization logic in the configuration by using xml values instead of attributes
2011-04-13 05:59:46 -07:00
Fabien Potencier
7f2294395c
[Form] reverted the templating part to be similar to what we have today
2011-04-11 16:42:51 +02:00
Bernhard Schussek
67582c9a5c
Merge remote branch 'symfony/master' into experimental
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
2011-04-06 16:06:26 +02:00
Bernhard Schussek
bfa3c71140
[Form] Added Bundle suffixes again
2011-04-04 15:33:21 +02:00
Bernhard Schussek
d3b7c4e8c1
[Form] Moved getLabel(), isChoiceSelected() and isChoiceGroup() from ChoiceListInterface to ThemeRenderer
2011-04-02 14:14:18 +02:00
Bernhard Schussek
37e8e1270c
[Form][FrameworkBundle][TwigBundle] Renamed view variable 'disabled' to 'read_only' to match with the according FormInterface methods
2011-04-02 12:18:43 +02:00
Bernhard Schussek
544f763c2c
[FrameworkBundle][TwigBundle] Adapted bundle references to latest symfony/master changes
2011-03-28 22:58:05 +02:00
Bernhard Schussek
53838abf3f
Merge remote branch 'symfony/master' into experimental
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_field.html.php
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_field.html.php
src/Symfony/Component/Form/Resources/config/validation.xml
2011-03-28 22:52:15 +02:00
Victor Berchet
95f5ba1ccd
[TwigBundle] Update the cache warmer
2011-03-28 22:04:39 +02:00
Fabien Potencier
faf9782e6f
renamed Twig TransExtension to TranslationExtension
2011-03-28 16:16:54 +02:00
Bernhard Schussek
b21929423e
[Form] Completely removed the fields variable in the renderer. The renderer itself supports ArrayAccess and Traversable
2011-03-27 13:48:36 +02:00
Bernhard Schussek
fae319e77a
[Form] Renderers are now created explicitely using FormFactory::createRenderer(). This improves performance on requests where a form does not need to be rendered
2011-03-26 16:03:34 +01:00
Bernhard Schussek
d84d167b71
[Form] Fixed display of enctype for file fields in Twig theme
2011-03-25 00:16:30 +01:00
Benjamin Eberlei
8d6dd2b9af
[Form] Add Arbitrary Attribute Support to Form Rendering.
2011-03-24 22:08:08 +01:00
Bernhard Schussek
9839aafb7d
Merge remote branch 'symfony/master' into experimental
2011-03-23 19:18:38 +01:00
Fabien Potencier
82dec51b30
moved integration between the Yaml component and Twig to a Symfony Bridge
2011-03-23 15:50:55 +01:00
Fabien Potencier
e912b347f0
moved integration between the Translation component and Twig to a Symfony Bridge
2011-03-23 15:23:52 +01:00
Fabien Potencier
3e5bd67dac
moved integration between Routing and Twig to a Symfony Bridge
2011-03-23 15:16:57 +01:00
John Wards
31647d3662
[TwigBundle] Changed twig variable from 'this' to 'renderer'
2011-03-21 20:46:19 +00:00
Benjamin Eberlei
32e1a7c8f9
Merge bschussek/experimental into branch forms.
2011-03-19 15:18:52 +01:00
Bernhard Schussek
3e17b26105
[Form] Moved CSRF protection into separate field
2011-03-19 15:06:54 +01:00
Bernhard Schussek
89215d167d
Merge remote branch 'symfony/master' into experimental
2011-03-19 13:25:41 +01:00
Benjamin Eberlei
bb8c2a9b9d
Rename this to renderer to be able to use it in Php Templating
2011-03-19 11:54:46 +01:00
Victor Berchet
d959a3ed4b
[TwigBundle] Rename the cache warmer service
2011-03-18 15:48:34 +01:00
Victor Berchet
7f523466f4
[TwigBundle] Fix the cache warmer
2011-03-18 11:23:23 +01:00
Bernhard Schussek
1c9a00733f
Merge branch 'event-manager' into experimental
...
Conflicts:
src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
2011-03-17 13:38:24 +01:00
Christophe Coevoet
61abc3d01f
Added the global variable in PHP templates too
2011-03-16 13:11:29 +01:00
Bernhard Schussek
0bf566310c
Merge branch 'event-manager' into experimental
...
Conflicts:
src/Symfony/Component/Form/BirthdayField.php
src/Symfony/Component/Form/CheckboxField.php
src/Symfony/Component/Form/ChoiceField.php
src/Symfony/Component/Form/ChoiceList/TimeZoneChoiceList.php
src/Symfony/Component/Form/CollectionField.php
src/Symfony/Component/Form/DateField.php
src/Symfony/Component/Form/DateTimeField.php
src/Symfony/Component/Form/EntityChoiceField.php
src/Symfony/Component/Form/Events.php
src/Symfony/Component/Form/FieldFactory/FieldFactory.php
src/Symfony/Component/Form/FieldFactory/FieldFactoryInterface.php
src/Symfony/Component/Form/FileField.php
src/Symfony/Component/Form/Filters.php
src/Symfony/Component/Form/FormContext.php
src/Symfony/Component/Form/FormContextInterface.php
src/Symfony/Component/Form/FormFactoryInterface.php
src/Symfony/Component/Form/HybridField.php
src/Symfony/Component/Form/IntegerField.php
src/Symfony/Component/Form/LanguageField.php
src/Symfony/Component/Form/LocaleField.php
src/Symfony/Component/Form/MoneyField.php
src/Symfony/Component/Form/NumberField.php
src/Symfony/Component/Form/PasswordField.php
src/Symfony/Component/Form/PercentField.php
src/Symfony/Component/Form/RepeatedField.php
src/Symfony/Component/Form/TextField.php
src/Symfony/Component/Form/TimeField.php
src/Symfony/Component/Form/ToggleField.php
src/Symfony/Component/Form/UrlField.php
src/Symfony/Component/HttpFoundation/File/UploadedFile.php
tests/Symfony/Tests/Component/Form/FileFieldTest.php
tests/Symfony/Tests/Component/Form/FormContextTest.php
tests/Symfony/Tests/Component/Form/HiddenFieldTest.php
2011-03-13 21:04:24 +01:00
Fabien Potencier
8c423edfef
replaced symfony-project.org by symfony.com
2011-03-06 12:40:06 +01:00
Bernhard Schussek
e53c688a6b
[Form] Fixed RepeatedField, improved structure of the Twig templates
2011-03-02 16:00:31 +01:00
Bernhard Schussek
c1edf116f2
[Form] Removed notion of "hidden" fields
...
Instead, hidden fields now override the "row" template to not include a label or errors.
The "rest" (former "hidden") helper has been adapted to output any fields that were not
rendered manually. It should usually be called at the end of a form.
2011-02-28 17:01:11 +01:00
Bernhard Schussek
02d2121dcd
[Form] Improved rendering
...
Fields are not available in the templates anymore. Instead, all required information can be
accessed through view variables.
Example usage of helpers and variables in a form theme:
// use the label helper
{{ this.label('my label') }}
// use the label variable
{{ this.vars.label }}
{{ label }}
Example usage of helpers and variables in a normal template:
// use the label helper
{{ field.label('my label') }}
// use the label variable
{{ field.vars.label }}
2011-02-28 16:50:23 +01:00
Bernhard Schussek
c6e9fd97b6
[Form] Fixed various bugs
2011-02-25 00:09:10 +01:00
Bernhard Schussek
c8275c5b27
[Form] Refactored PercentField to FormFactory
2011-02-23 15:26:01 +01:00
Bernhard Schussek
68bb3ff606
[Form] Used ValuePlugin to pass displayed data to template. The order of added renderer plugins and set renderer variables is now respected
2011-02-23 14:11:18 +01:00
Bernhard Schussek
ce432e939d
[Form] Changed notion of 'parameter' to 'var' in the renderer. Merged vars and attributes into single array
2011-02-23 14:11:18 +01:00
Bernhard Schussek
2b8ca25d01
[Form] Refactored NumberField, IntegerField, HiddenField and MoneyField to FormFactory
2011-02-23 14:11:18 +01:00
Bernhard Schussek
9394ffdea1
[Form] Started to refactor TimeField to FormFactory::getTimeField(). Validation logic is still missing.
2011-02-23 14:11:18 +01:00
Bernhard Schussek
975b8ebe9b
[Form] Started to refactor DateField to FormFactory::getDateField(). Validation logic is still missing.
2011-02-23 14:11:18 +01:00
Bernhard Schussek
b148a2a7ed
[Form] Refactored ChoiceField to FormFactory::getChoiceField()
2011-02-23 14:11:18 +01:00
Bernhard Schussek
7a48c0a5c5
[Form] Refactored logic from ChoiceField into ChoicePlugin and SelectMultipleNamePlugin
2011-02-23 14:11:18 +01:00
Bernhard Schussek
f7dc71ef59
[Form] Refactored id and name generation to renderer plugins
2011-02-23 14:11:17 +01:00
Bernhard Schussek
861ff957e7
[Form] Refactored DateField pattern, fixed maxlength in TextField
2011-02-23 14:11:17 +01:00
Bernhard Schussek
ed68fd66a9
[Form] Improved the renderer implementation, added concepts of plugins and themes
2011-02-23 14:11:17 +01:00
Fabien Potencier
d94acd85f9
remove response as a service
...
The Response is not available in the DIC anymore.
When you need to create a response, create an instance of
Symfony\Component\HttpFoundation\Response instead.
As a side effect, the Controller::createResponse() and Controller::redirect()
methods have been removed and can easily be replaced as follows:
return $this->createResponse('content', 200, array('foo' => 'bar'));
return new Response('content', 200, array('foo' => 'bar'));
return $this->redirect($url);
return Response::createRedirect($url);
2011-02-21 17:36:04 +01:00
Fabien Potencier
f6e624b1e2
[TwigBundle] changed all Boolean to string in XSD as you might want to use a parameter %...%
2011-02-19 15:36:41 +01:00