File tree Expand file tree Collapse file tree 6 files changed +44
-1
lines changed
Bridge/Twig/Resources/views/Form
Bundle/FrameworkBundle/Resources/config Expand file tree Collapse file tree 6 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -1105,3 +1105,4 @@ Symfony2 is the result of the work of many people who made the code better
1105
1105
- Erik Saunier (snickers)
1106
1106
- Matej Žilák (teo_sk)
1107
1107
- Vladislav Vlastovskiy (vlastv)
1108
+ - Joshua Thijssen (jaytaph)
Original file line number Diff line number Diff line change 175
175
{{- block (' form_widget_simple' ) -}}
176
176
{%- endblock email_widget %}
177
177
178
+ {% block range_widget -%}
179
+ {% set type = type | default (' range' ) %}
180
+ {{- block (' form_widget_simple' ) -}}
181
+ {%- endblock range_widget %}
182
+
178
183
{% block button_widget -%}
179
184
{% if label is empty -%}
180
185
{% set label = name | humanize %}
Original file line number Diff line number Diff line change 113
113
<service id =" form.type.radio" class =" Symfony\Component\Form\Extension\Core\Type\RadioType" >
114
114
<tag name =" form.type" alias =" radio" />
115
115
</service >
116
+ <service id =" form.type.range" class =" Symfony\Component\Form\Extension\Core\Type\RangeType" >
117
+ <tag name =" form.type" alias =" range" />
118
+ </service >
116
119
<service id =" form.type.repeated" class =" Symfony\Component\Form\Extension\Core\Type\RepeatedType" >
117
120
<tag name =" form.type" alias =" repeated" />
118
121
</service >
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ CHANGELOG
3
3
4
4
2.6.0
5
5
-----
6
-
7
6
* added "html5" option to Date, Time and DateTimeFormType to be able to
8
7
enable/disable HTML5 input date when widget option is "single_text"
8
+ * added the html5 "range" FormType
9
9
10
10
2.5.0
11
11
------
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ protected function loadTypes()
42
42
new Type \PasswordType (),
43
43
new Type \PercentType (),
44
44
new Type \RadioType (),
45
+ new Type \RangeType (),
45
46
new Type \RepeatedType (),
46
47
new Type \SearchType (),
47
48
new Type \TextareaType (),
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Symfony \Component \Form \Extension \Core \Type ;
13
+
14
+ use Symfony \Component \Form \AbstractType ;
15
+
16
+ class RangeType extends AbstractType
17
+ {
18
+ /**
19
+ * {@inheritdoc}
20
+ */
21
+ public function getParent ()
22
+ {
23
+ return 'text ' ;
24
+ }
25
+
26
+ /**
27
+ * {@inheritdoc}
28
+ */
29
+ public function getName ()
30
+ {
31
+ return 'range ' ;
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments