Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added html5 email input to the forms
- Loading branch information
Miha Vrhovnik
committed
Apr 18, 2011
1 parent
4bb823f
commit 50011fa
Showing
4 changed files
with
51 additions
and
6 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
7 changes: 7 additions & 0 deletions
7
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<input type="email" | ||
<?php echo $view['form']->attributes() ?> | ||
name="<?php echo $view->escape($name) ?>" | ||
value="<?php echo $view->escape($value) ?>" | ||
<?php if ($read_only): ?>disabled="disabled"<?php endif ?> | ||
<?php if ($required): ?>required="required"<?php endif ?> | ||
/> |
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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien.potencier@symfony-project.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Form\Type; | ||
|
||
use Symfony\Component\Form\FormBuilder; | ||
use Symfony\Component\Form\FormInterface; | ||
|
||
class EmailType extends AbstractType | ||
{ | ||
public function getParent(array $options) | ||
{ | ||
return 'field'; | ||
} | ||
|
||
public function getName() | ||
{ | ||
return 'email'; | ||
} | ||
} |