[widget] Addition of EmailInput
authorAlain Begey <alain@unlish.com>
Fri, 11 Apr 2014 17:43:26 +0200
changeset 9716 c44224387028
parent 9714 0a6f5ac4373d
child 9717 a6834e2dcc1b
[widget] Addition of EmailInput Simple input widget with type = 'email' Closes #3741921
web/formwidgets.py
--- a/web/formwidgets.py	Mon Apr 28 18:38:24 2014 +0200
+++ b/web/formwidgets.py	Fri Apr 11 17:43:26 2014 +0200
@@ -34,6 +34,7 @@
 
 .. autoclass:: cubicweb.web.formwidgets.HiddenInput
 .. autoclass:: cubicweb.web.formwidgets.TextInput
+.. autoclass:: cubicweb.web.formwidgets.EmailInput
 .. autoclass:: cubicweb.web.formwidgets.PasswordSingleInput
 .. autoclass:: cubicweb.web.formwidgets.FileInput
 .. autoclass:: cubicweb.web.formwidgets.ButtonInput
@@ -314,6 +315,11 @@
     type = 'text'
 
 
+class EmailInput(Input):
+    """Simple <input type='email'>, will return a unicode string."""
+    type = 'email'
+
+
 class PasswordSingleInput(Input):
     """Simple <input type='password'>, will return an utf-8 encoded string.